Skip to content

Commit

Permalink
- add: async ui support. and async load delegate & sync delegate bind.
Browse files Browse the repository at this point in the history
- add: async show ui support.(need check)
- mod: simplify some function \ values and enum.
  • Loading branch information
chiuan committed Sep 22, 2015
1 parent 6008001 commit 915def2
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Assets/Sample/UIMainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class UIMainPage : TTUIPage {

public UIMainPage() : base(UIWindowType.Normal, UIWindowShowMode.HideOther, UIWindowColliderMode.None)
public UIMainPage() : base(UIType.Normal, UIMode.HideOther, UICollider.None)
{
uiPath = "UIPrefab/UIMain";
}
Expand Down
6 changes: 4 additions & 2 deletions Assets/Sample/UINotice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

public class UINotice : TTUIPage
{

public UINotice() : base(UIWindowType.PopUp, UIWindowShowMode.DoNothing, UIWindowColliderMode.Normal)
public UINotice() : base(UIType.PopUp, UIMode.DoNothing, UICollider.Normal)
{
uiPath = "UIPrefab/Notice";
}
Expand All @@ -19,5 +18,8 @@ public override void Awake()
});
}

public override void Refresh()
{

}
}
2 changes: 1 addition & 1 deletion Assets/Sample/UISkillPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class UISkillPage : TTUIPage {

public UISkillPage() : base(UIWindowType.Normal, UIWindowShowMode.HideOther, UIWindowColliderMode.None)
public UISkillPage() : base(UIType.Normal, UIMode.HideOther, UICollider.None)
{
uiPath = "UIPrefab/UISkill";
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Sample/UITopBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class UITopBar : TTUIPage {

public UITopBar() : base(UIWindowType.Fixed, UIWindowShowMode.DoNothing, UIWindowColliderMode.None)
public UITopBar() : base(UIType.Fixed, UIMode.DoNothing, UICollider.None)
{
uiPath = "UIPrefab/Topbar";
}
Expand Down
27 changes: 27 additions & 0 deletions Assets/UIFramework/Source/TTUIBind.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace TinyTeam.UI
{
using UnityEngine;
using System.Collections;

/// <summary>
/// Bind Some Delegate Func For Yours.
/// </summary>
public class TTUIBind : MonoBehaviour
{
static bool isBind = false;

public static void Bind()
{
if (!isBind)
{
isBind = true;
//Debug.LogWarning("Bind For UI Framework.");

//bind for your loader api to load UI.
TTUIPage.delegateSyncLoadUI = Resources.Load;
//TTUIPage.delegateAsyncLoadUI =

}
}
}
}
12 changes: 12 additions & 0 deletions Assets/UIFramework/Source/TTUIBind.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 915def2

Please sign in to comment.