home_modules_more.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { _decorator, Component, Node } from 'cc';
  2. import { base_ui } from '../../fw/base_ui';
  3. import { uiManager } from '../../manager/uiManager';
  4. import { config } from '../../config';
  5. const { ccclass, property } = _decorator;
  6. @ccclass('home_modules_more')
  7. export class home_modules_more extends base_ui {
  8. @property(Node) btn_youjian:Node = null
  9. @property(Node) btn_gonggao:Node = null
  10. @property(Node) btn_fankui:Node = null
  11. @property(Node) btn_shezhi:Node = null
  12. @property(Node) img_dot_youjian:Node = null
  13. @property(Node) img_dot_gonggao:Node = null
  14. start() {
  15. this.onButtonListen(this.btn_youjian, ()=>{
  16. uiManager.Instance().showUi(config.UI.ui_mailbox)
  17. })
  18. this.onButtonListen(this.btn_gonggao, ()=>{
  19. uiManager.Instance().showUi(config.UI.ui_announcement)
  20. })
  21. this.onButtonListen(this.btn_fankui, ()=>{
  22. uiManager.Instance().showUi(config.UI.ui_feedback)
  23. })
  24. this.onButtonListen(this.btn_shezhi, ()=>{
  25. uiManager.Instance().showUi(config.UI.ui_setting)
  26. })
  27. }
  28. public showRedDotYoujian(is_show:boolean) {
  29. this.img_dot_youjian.active = is_show
  30. }
  31. public showRedDotGonggao(is_show:boolean) {
  32. this.img_dot_gonggao.active = is_show
  33. }
  34. public getDotAllShow():boolean {
  35. let is_show = true
  36. if(this.img_dot_youjian.active==false && this.img_dot_gonggao.active==false) {
  37. return false
  38. }
  39. return is_show
  40. }
  41. }