Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddakebono committed Jun 24, 2022
2 parents 13a2e76 + 99d25c4 commit d77be37
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UI/QuickMenu/IButtonPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ public interface IButtonPage
ReCategoryPage AddCategoryPage(string text, string tooltip = "", Sprite sprite = null);
ReMenuPage GetMenuPage(string name);
ReCategoryPage GetCategoryPage(string name);
void AddCategoryPage(string text, string tooltip, Action<ReCategoryPage> onPageBuilt, Sprite sprite = null);
void AddMenuPage(string text, string tooltip, Action<ReMenuPage> onPageBuilt, Sprite sprite = null);
}
}
10 changes: 10 additions & 0 deletions UI/QuickMenu/ReMenuCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,16 @@ public ReCategoryPage AddCategoryPage(string text, string tooltip = "", Sprite s
return menu;
}

public void AddMenuPage(string text, string tooltip, Action<ReMenuPage> onPageBuilt, Sprite sprite = null)
{
onPageBuilt(AddMenuPage(text, tooltip, sprite));
}

public void AddCategoryPage(string text, string tooltip, Action<ReCategoryPage> onPageBuilt, Sprite sprite = null)
{
onPageBuilt(AddCategoryPage(text, tooltip, sprite));
}

public RectTransform RectTransform => _buttonContainer.RectTransform;

public ReMenuPage GetMenuPage(string name)
Expand Down
10 changes: 10 additions & 0 deletions UI/QuickMenu/ReMenuPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,16 @@ public ReCategoryPage AddCategoryPage(string text, string tooltip = "", Sprite s
return menu;
}

public void AddMenuPage(string text, string tooltip, Action<ReMenuPage> onPageBuilt, Sprite sprite = null)
{
onPageBuilt(AddMenuPage(text, tooltip, sprite));
}

public void AddCategoryPage(string text, string tooltip, Action<ReCategoryPage> onPageBuilt, Sprite sprite = null)
{
onPageBuilt(AddCategoryPage(text, tooltip, sprite));
}

public ReMenuPage GetMenuPage(string name)
{
var transform = QuickMenuEx.MenuParent.Find(GetCleanName($"Menu_{name}"));
Expand Down

0 comments on commit d77be37

Please sign in to comment.