Merge branch 'master' into LouDi_Quan
This commit is contained in:
commit
18092474ad
@ -308,6 +308,17 @@ UIKit.GetPanel(""UIHomePanel"");
|
||||
|
||||
return retPanel as T;
|
||||
}
|
||||
public static UIPanel GetPanel(Type type)
|
||||
{
|
||||
var panelSearchKeys = PanelSearchKeys.Allocate();
|
||||
panelSearchKeys.PanelType = type;
|
||||
|
||||
var retPanel = UIManager.Instance.GetUI(panelSearchKeys);
|
||||
|
||||
panelSearchKeys.Recycle2Cache();
|
||||
|
||||
return retPanel;
|
||||
}
|
||||
|
||||
#region 给脚本层用的 api
|
||||
|
||||
|
||||
@ -16,7 +16,10 @@ public class ActionHelper
|
||||
{ "UIBtns", typeof(QFramework.Example.UIBtns) },
|
||||
{ "UITools", typeof(QFramework.Example.UITools) },
|
||||
{ "UIHint", typeof(QFramework.Example.UIHint) },
|
||||
{ "UIPointQuestion", typeof(QFramework.Example.UIPointQuestion) },
|
||||
{ "UIBtns", typeof(QFramework.Example.UIPointQuestion) },
|
||||
{ "UICameraSwitch", typeof(QFramework.Example.UICameraSwitch) },
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -53,7 +53,11 @@ public class UIShowAction : IAction
|
||||
}
|
||||
else
|
||||
{
|
||||
UIKit.HidePanel(ActionHelper.typeDict[uiName]);
|
||||
if (UIKit.GetPanel(ActionHelper.typeDict[uiName]) != null)
|
||||
{
|
||||
UIKit.HidePanel(ActionHelper.typeDict[uiName]);
|
||||
}
|
||||
|
||||
this.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,8 @@ using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using static OperationController;
|
||||
using System;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -16,6 +18,12 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UIBtnsData ?? new UIBtnsData();
|
||||
// please add init code here
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
|
||||
@ -3,6 +3,7 @@ using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using DG.Tweening;
|
||||
using System.Runtime.CompilerServices;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -20,8 +21,13 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UIHintData ?? new UIHintData();
|
||||
SetItem(0);
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UIHintData ?? new UIHintData();
|
||||
|
||||
@ -2,6 +2,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using System.Collections.Generic;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -16,6 +17,12 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UIPointQuestionData ?? new UIPointQuestionData();
|
||||
// please add init code here
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
|
||||
@ -3,6 +3,7 @@ using UnityEngine.UI;
|
||||
using QFramework;
|
||||
using TMPro;
|
||||
using System;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -19,8 +20,13 @@ namespace QFramework.Example
|
||||
mData = uiData as UIResultTipData ?? new UIResultTipData();
|
||||
Right.gameObject.SetActive(false);
|
||||
Wrong.gameObject.SetActive(false);
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
Right.gameObject.SetActive(false);
|
||||
|
||||
@ -6,6 +6,7 @@ using TMPro;
|
||||
using System;
|
||||
using Microsoft.SqlServer.Server;
|
||||
using XMLTool;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -32,8 +33,13 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
||||
// please add init code here
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
{
|
||||
mData = uiData as UITextQuestionData ?? new UITextQuestionData();
|
||||
|
||||
@ -4,6 +4,7 @@ using QFramework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -24,6 +25,12 @@ namespace QFramework.Example
|
||||
mData = uiData as UITipWindowData ?? new UITipWindowData();
|
||||
// please add init code here
|
||||
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
|
||||
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using static OperationController;
|
||||
|
||||
namespace QFramework.Example
|
||||
{
|
||||
@ -29,6 +30,12 @@ namespace QFramework.Example
|
||||
{
|
||||
mData = uiData as UIToolsData ?? new UIToolsData();
|
||||
// please add init code here
|
||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||
}
|
||||
|
||||
private void OnStepChanged(StepStatusOnChange change)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
protected override void OnOpen(IUIData uiData = null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user