예제 #1
0
 private void Initialize()
 {
     this.transHallChat = base.transform.Find("HallChat");
     this.sendBtn       = this.transHallChat.Find("LoudSpeaker/SendBtn");
     this.emojiBtn      = this.transHallChat.Find("LoudSpeaker/Emoji").GetComponent <UISprite>();
     this.broadcastBtn  = this.transHallChat.Find("LoudSpeaker/Turmpet");
     this.transBlock    = this.transHallChat.Find("LoudSpeaker/Input");
     this.usv           = this.transHallChat.Find("MessageBox").GetComponent <UIScrollView>();
     this.usvPanel      = this.usv.GetComponent <UIPanel>();
     this.transGrid     = this.transHallChat.Find("MessageBox/Grid").GetComponent <UIGrid>();
     this.content       = this.transHallChat.Find("LoudSpeaker/InputField").GetComponent <UIInput>();
     this.myChatItem    = Resources.Load <ChatItem>("Prefab/UI/HomeChat/MyChatText");
     this.otherChatItem = Resources.Load <ChatItem>("Prefab/UI/HomeChat/OthersChatText");
     this.emojiItem     = Resources.Load <EmojiItem>("Prefab/UI/HomeChat/emojiItem");
     this.bar           = this.transHallChat.Find("ScrollBar").GetComponent <UIScrollBar>();
     this.emojiList     = base.transform.Find("EmojiLst");
     this.emoGrid       = this.emojiList.Find("Scroll View/Grid").GetComponent <UIGrid>();
     this.emojiBG       = base.transform.Find("Panel/EmojiBG");
     this.coroutine     = new CoroutineManager();
     this.queueChat     = new Queue <ChatItem>();
     UIEventListener.Get(this.sendBtn.gameObject).onClick      = new UIEventListener.VoidDelegate(this.SendChat);
     UIEventListener.Get(this.emojiBtn.gameObject).onClick     = new UIEventListener.VoidDelegate(this.ShowEmotionPanel);
     UIEventListener.Get(this.broadcastBtn.gameObject).onClick = new UIEventListener.VoidDelegate(this.ShowTrumpetView);
     EventDelegate.Add(this.content.onChange, new EventDelegate.Callback(this.IsChange));
     this.content.label.color = new Color32(0, 85, 134, 255);
     this.content.defaultText = "点此输入文字";
     this.boc = this.content.GetComponent <BoxCollider>();
     this.GetSetCollider(false);
 }
예제 #2
0
 private void FillEmojiToField(GameObject obj, EmojiItem ei)
 {
     if (null != obj)
     {
         if ((this.task_countDown != null && !this.task_countDown.Running) || this.task_countDown == null)
         {
             UIInput expr_38 = this.content;
             expr_38.value += ei.EmojiName;
         }
         this.GetSetEmojiPanelState(false);
     }
 }