diff options
Diffstat (limited to 'src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs')
-rw-r--r-- | src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs b/src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs deleted file mode 100644 index a4d3d8d0..00000000 --- a/src/StardewModdingAPI/Inheritance/Menus/SGameMenu.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; -using StardewValley.Menus; - -namespace StardewModdingAPI.Inheritance.Menus -{ - public class SGameMenu : GameMenu - { - public GameMenu BaseGameMenu { get; private set; } - - public List<ClickableComponent> tabs - { - get { return (List<ClickableComponent>) GetBaseFieldInfo("tabs").GetValue(BaseGameMenu); } - set { GetBaseFieldInfo("tabs").SetValue(BaseGameMenu, value); } - } - - public List<IClickableMenu> pages - { - get { return (List<IClickableMenu>) GetBaseFieldInfo("pages").GetValue(BaseGameMenu); } - set { GetBaseFieldInfo("pages").SetValue(BaseGameMenu, value); } - } - - public static SGameMenu ConstructFromBaseClass(GameMenu baseClass) - { - var s = new SGameMenu {BaseGameMenu = baseClass}; - return s; - } - - public override void receiveRightClick(int x, int y, bool playSound = true) - { - if (pages[currentTab] is InventoryPage) - { - Log.AsyncY("INV SCREEN"); - } - base.receiveRightClick(x, y, playSound); - } - - public static FieldInfo[] GetPrivateFields() - { - return typeof(GameMenu).GetFields(BindingFlags.Instance | BindingFlags.NonPublic); - } - - public static FieldInfo GetBaseFieldInfo(string name) - { - return typeof(GameMenu).GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); - } - } -}
\ No newline at end of file |