1
This commit is contained in:
@@ -32,6 +32,12 @@ public class UIHome_BY_BackPackPanel : SubUIBase
|
||||
public GameObject changNamePanel;
|
||||
public TMP_InputField tMPText_NewName;
|
||||
public Button btn_ChangeName;
|
||||
|
||||
[Header("大喇叭")]//使用大喇叭后,弹出输入框,输入弹幕,点击确定按钮,发送请求
|
||||
public GameObject DaLaBaPanel;
|
||||
public TMP_InputField tMPText_DaLaBaLabel;
|
||||
public Button btn_FaSong;
|
||||
|
||||
// 刷新时保存的状态
|
||||
//private Vector2 savedScrollPos;
|
||||
private string savedPropID;
|
||||
@@ -48,6 +54,29 @@ public class UIHome_BY_BackPackPanel : SubUIBase
|
||||
// 改名面板默认关闭
|
||||
if (changNamePanel != null)
|
||||
changNamePanel.SetActive(false);
|
||||
|
||||
// 大喇叭
|
||||
if (DaLaBaPanel != null)
|
||||
DaLaBaPanel.SetActive(false);
|
||||
if (btn_FaSong != null)
|
||||
btn_FaSong.onClick.AddListener(OnClickFaSong);
|
||||
}
|
||||
|
||||
private void OnClickFaSong()
|
||||
{
|
||||
string msg = "广播:"+ tMPText_DaLaBaLabel?.text?.Trim();
|
||||
if (string.IsNullOrEmpty(msg))
|
||||
{
|
||||
UIManager.Instance.ShowBoardError("请输入广播内容");
|
||||
return;
|
||||
}
|
||||
|
||||
APIRequestList.SendBroadcast(msg, (result) =>
|
||||
{
|
||||
//UIManager.Instance.ShowBoardGongGao($"广播: {msg}");
|
||||
tMPText_DaLaBaLabel.text = "";
|
||||
DaLaBaPanel.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
private void OnClickConfirmChangeName()
|
||||
@@ -172,7 +201,10 @@ public class UIHome_BY_BackPackPanel : SubUIBase
|
||||
if (changNamePanel != null)
|
||||
changNamePanel.SetActive(true);
|
||||
break;
|
||||
case PropEnum.大喇叭: break;
|
||||
case PropEnum.大喇叭:
|
||||
if (DaLaBaPanel != null)
|
||||
DaLaBaPanel.SetActive(true);
|
||||
break;
|
||||
case PropEnum.技能: break;
|
||||
case PropEnum.召唤卡: break;
|
||||
default: break;
|
||||
|
||||
Reference in New Issue
Block a user