修改UI逻辑
This commit is contained in:
parent
34fffe6daa
commit
32d905a8ea
@ -13,6 +13,7 @@ namespace QFramework.Example
|
|||||||
public partial class UIInstruction : UIPanel
|
public partial class UIInstruction : UIPanel
|
||||||
{
|
{
|
||||||
bool isNo = false;
|
bool isNo = false;
|
||||||
|
bool isOperation = false;
|
||||||
protected override void OnInit(IUIData uiData = null)
|
protected override void OnInit(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
|
||||||
@ -46,8 +47,17 @@ namespace QFramework.Example
|
|||||||
});
|
});
|
||||||
ConfirmBtn.onClick.AddListener(() =>
|
ConfirmBtn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
Hide();
|
if (isOperation == false)
|
||||||
isNo = NoToggle.isOn;
|
{
|
||||||
|
Operation.isOn = true;
|
||||||
|
isOperation = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Hide();
|
||||||
|
isNo = NoToggle.isOn;
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user