Layout_UIChat.ts 770 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { _decorator, Component, Node, EditBox, Prefab, Button } from 'cc';
  2. const { ccclass, property } = _decorator;
  3. @ccclass('Layout_UIChat')
  4. export class Layout_UIChat extends Component {
  5. @property(EditBox)
  6. inputChat!: EditBox;
  7. @property(Node)
  8. chatBar:Node;
  9. @property(Prefab)
  10. prefabChatMsgItem!: Prefab;
  11. @property(Node)
  12. chatMsgs!: Node;
  13. @property(Button)
  14. btnExpand:Button;
  15. @property(Button)
  16. btnFold:Button;
  17. cbInputChatReturn:Function;
  18. async onInputChatReturn(){
  19. if(this.cbInputChatReturn){
  20. this.cbInputChatReturn();
  21. }
  22. }
  23. cbBtnSendChat:Function;
  24. async onBtnSendChat(){
  25. if(this.cbBtnSendChat){
  26. await this.cbBtnSendChat();
  27. }
  28. }
  29. }