|
@@ -42,7 +42,7 @@ namespace GFGGame
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
_ui.m_btnBack.onClick.Add(OnBtnBackClick);
|
|
_ui.m_btnRule.onClick.Add(OnBtnRuleClick);
|
|
_ui.m_btnRule.onClick.Add(OnBtnRuleClick);
|
|
- _ui.m_btnSend.onClick.Add(OnBtnSendClick);
|
|
|
|
|
|
+ _ui.m_btnSend.target.onClick.Add(OnBtnSendClick);
|
|
|
|
|
|
_ui.m_listResult.itemRenderer = RenderListResultItem;
|
|
_ui.m_listResult.itemRenderer = RenderListResultItem;
|
|
_ui.m_listJoin.itemRenderer = RenderListJoinItem;
|
|
_ui.m_listJoin.itemRenderer = RenderListJoinItem;
|
|
@@ -125,16 +125,36 @@ namespace GFGGame
|
|
}
|
|
}
|
|
private async void OnBtnSendClick()
|
|
private async void OnBtnSendClick()
|
|
{
|
|
{
|
|
|
|
+ if (_ui.m_btnSend.m_c1.selectedIndex == 1)
|
|
|
|
+ {
|
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("消息发送频繁");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (string.IsNullOrEmpty(_ui.m_txtChat.text))
|
|
if (string.IsNullOrEmpty(_ui.m_txtChat.text))
|
|
{
|
|
{
|
|
PromptController.Instance.ShowFloatTextPrompt("还没有输入想发送的内容哦");
|
|
PromptController.Instance.ShowFloatTextPrompt("还没有输入想发送的内容哦");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
bool result = await ChatSProxy.ReqSendChatMsg(ChatType.LeagueQuestion, _ui.m_txtChat.text);
|
|
bool result = await ChatSProxy.ReqSendChatMsg(ChatType.LeagueQuestion, _ui.m_txtChat.text);
|
|
if (result)
|
|
if (result)
|
|
{
|
|
{
|
|
_ui.m_txtChat.text = "";
|
|
_ui.m_txtChat.text = "";
|
|
UpdateChatList();
|
|
UpdateChatList();
|
|
|
|
+
|
|
|
|
+ int num = GlobalCfgArray.globalCfg.chatTime;
|
|
|
|
+ _ui.m_btnSend.m_timeStr.text = num.ToString();
|
|
|
|
+ _ui.m_btnSend.m_c1.selectedIndex = 1;
|
|
|
|
+ Timers.inst.Add(1, 10, (param) =>
|
|
|
|
+ {
|
|
|
|
+ num--;
|
|
|
|
+ _ui.m_btnSend.m_timeStr.text = num.ToString();
|
|
|
|
+ if (num == 0)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_btnSend.m_c1.selectedIndex = 0;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
private void UpdateActiveTime(object param)
|
|
private void UpdateActiveTime(object param)
|