3、不再提示按钮默认不勾选;用户手动点击菜单栏中的说明按钮,弹出的弹窗中,不带这个文字提示按钮

This commit is contained in:
CG 2025-01-19 20:46:56 +08:00
parent ec04dd22ef
commit 8c575de0fa
4 changed files with 12 additions and 9 deletions

View File

@ -31,6 +31,7 @@ namespace ZXK.LouDiXvMuNiu
//輝念app報炎痩樗業 //輝念app報炎痩樗業
[System.NonSerialized] [System.NonSerialized]
public float _CurMouseFlexible = 50.0f; public float _CurMouseFlexible = 50.0f;
[System.NonSerialized]
public bool _loopPopExplain = true; public bool _loopPopExplain = true;
public bool _IsFirstFreeCamera = true; public bool _IsFirstFreeCamera = true;

View File

@ -119,7 +119,7 @@ namespace ZXK.LouDiXvMuNiu
if (GameManager.Instance._loopPopExplain) if (GameManager.Instance._loopPopExplain)
{ {
GameObject explainContainGeo = UI_Manage.Instance.ShowPanel("ExplainContainPanel", System.Type.GetType("ZXK.LouDiXvMuNiu.ExplainContainPanel"), UIGroup.Tip); GameObject explainContainGeo = UI_Manage.Instance.ShowPanel("ExplainContainPanel", System.Type.GetType("ZXK.LouDiXvMuNiu.ExplainContainPanel"), UIGroup.Tip);
explainContainGeo.GetComponent<ExplainContainPanel>()._IsFirstEnter = true; explainContainGeo.GetComponent<ExplainContainPanel>().InitUIState(true);
} }
} }
private void Update() private void Update()

View File

@ -95,7 +95,7 @@ namespace ZXK.LouDiXvMuNiu
{ {
PopUpMng._TriAble = false; PopUpMng._TriAble = false;
GameObject explainContainGeo = UI_Manage.Instance.ShowPanel("ExplainContainPanel", System.Type.GetType("ZXK.LouDiXvMuNiu.ExplainContainPanel"), UIGroup.Tip); GameObject explainContainGeo = UI_Manage.Instance.ShowPanel("ExplainContainPanel", System.Type.GetType("ZXK.LouDiXvMuNiu.ExplainContainPanel"), UIGroup.Tip);
explainContainGeo.GetComponent<ExplainContainPanel>()._IsFirstEnter = false; explainContainGeo.GetComponent<ExplainContainPanel>().InitUIState(false);
}); });
_setBtn.onClick.AddListener(() => _setBtn.onClick.AddListener(() =>
{ {

View File

@ -18,8 +18,8 @@ namespace ZXK.LouDiXvMuNiu
private Button _closeBtn = null; private Button _closeBtn = null;
private Toggle _popLoop = null; private Toggle _popLoop = null;
public bool _IsFirstEnter = false; private bool _isFirstEnter = false;
public int _clickNumber = 0; private int _clickNumber = 0;
protected override void Awake() protected override void Awake()
{ {
@ -30,17 +30,19 @@ namespace ZXK.LouDiXvMuNiu
_handlerGeo = GetWedage("HandlerExplainBG_N"); _handlerGeo = GetWedage("HandlerExplainBG_N");
_closeBtn = GetWedage("CloseBtn_N").GetComponent<Button>(); _closeBtn = GetWedage("CloseBtn_N").GetComponent<Button>();
_popLoop = GetWedage("LoopPopSet_N").GetComponent<Toggle>(); _popLoop = GetWedage("LoopPopSet_N").GetComponent<Toggle>();
InitUIState(); //InitUIState();
CG.UTility.PopUpMng._TriAble = false; CG.UTility.PopUpMng._TriAble = false;
_clickNumber = 0; _clickNumber = 0;
_popLoop.isOn = GameManager.Instance._loopPopExplain; _popLoop.isOn = !GameManager.Instance._loopPopExplain;
} }
private void InitUIState() public void InitUIState(bool AutoPop)
{ {
_isFirstEnter = AutoPop;
_popLoop.gameObject.SetActive(AutoPop);
_popLoop.onValueChanged.AddListener((isOn) => _popLoop.onValueChanged.AddListener((isOn) =>
{ {
GameManager.Instance._loopPopExplain = isOn; GameManager.Instance._loopPopExplain = !isOn;
}); });
_trainTog.onValueChanged.AddListener((isOn) => _trainTog.onValueChanged.AddListener((isOn) =>
{ {
@ -56,7 +58,7 @@ namespace ZXK.LouDiXvMuNiu
}); });
_closeBtn.onClick.AddListener(() => _closeBtn.onClick.AddListener(() =>
{ {
if (_IsFirstEnter) if (_isFirstEnter)
{ {
if (_clickNumber > 0) if (_clickNumber > 0)
{ {