From 9862542027f364ff49eb0725add1843406e1f0a1 Mon Sep 17 00:00:00 2001 From: amazingalek Date: Sat, 18 Jan 2020 18:40:18 +0100 Subject: [PATCH] Menu-framework (#65) * traverse menus and buttons * lots of methods and events --- OWML.Common/IModHelper.cs | 4 +- OWML.Common/IModMenu.cs | 11 -- OWML.Common/IModMenus.cs | 8 - OWML.Common/Menus/IModButton.cs | 32 ++++ OWML.Common/Menus/IModMainMenu.cs | 16 ++ OWML.Common/Menus/IModMenu.cs | 22 +++ OWML.Common/Menus/IModMenus.cs | 8 + OWML.Common/Menus/IModPauseMenu.cs | 13 ++ OWML.Common/{ => Menus}/IModPopupMenu.cs | 9 +- OWML.Common/Menus/IModTabMenu.cs | 7 + OWML.Common/Menus/IModTabbedMenu.cs | 15 ++ OWML.Common/OWML.Common.csproj | 11 +- OWML.Launcher/App.cs | 2 +- OWML.ModHelper.Menus/ModButton.cs | 145 ++++++++++++++++++ OWML.ModHelper.Menus/ModMainMenu.cs | 73 ++++----- OWML.ModHelper.Menus/ModMenu.cs | 88 +++++++++++ OWML.ModHelper.Menus/ModMenus.cs | 31 +++- OWML.ModHelper.Menus/ModOptionsMenu.cs | 63 ++++++++ OWML.ModHelper.Menus/ModPauseMenu.cs | 38 +++-- OWML.ModHelper.Menus/ModPopupMenu.cs | 94 +++++------- OWML.ModHelper.Menus/ModTabMenu.cs | 40 +++++ OWML.ModHelper.Menus/ModsMenu.cs | 25 +-- .../OWML.ModHelper.Menus.csproj | 6 +- OWML.ModHelper/ModHelper.cs | 1 + OWML.ModLoader/Owo.cs | 1 + .../OWML.EnableDebugMode/manifest.json | 2 +- .../OWML.LoadCustomAssets/LoadCustomAssets.cs | 38 ++--- .../OWML.LoadCustomAssets/manifest.json | 4 +- 28 files changed, 629 insertions(+), 178 deletions(-) delete mode 100644 OWML.Common/IModMenu.cs delete mode 100644 OWML.Common/IModMenus.cs create mode 100644 OWML.Common/Menus/IModButton.cs create mode 100644 OWML.Common/Menus/IModMainMenu.cs create mode 100644 OWML.Common/Menus/IModMenu.cs create mode 100644 OWML.Common/Menus/IModMenus.cs create mode 100644 OWML.Common/Menus/IModPauseMenu.cs rename OWML.Common/{ => Menus}/IModPopupMenu.cs (58%) create mode 100644 OWML.Common/Menus/IModTabMenu.cs create mode 100644 OWML.Common/Menus/IModTabbedMenu.cs create mode 100644 OWML.ModHelper.Menus/ModButton.cs create mode 100644 OWML.ModHelper.Menus/ModMenu.cs create mode 100644 OWML.ModHelper.Menus/ModOptionsMenu.cs create mode 100644 OWML.ModHelper.Menus/ModTabMenu.cs diff --git a/OWML.Common/IModHelper.cs b/OWML.Common/IModHelper.cs index bc169e33..d25e1c2f 100644 --- a/OWML.Common/IModHelper.cs +++ b/OWML.Common/IModHelper.cs @@ -1,4 +1,6 @@ -namespace OWML.Common +using OWML.Common.Menus; + +namespace OWML.Common { public interface IModHelper { diff --git a/OWML.Common/IModMenu.cs b/OWML.Common/IModMenu.cs deleted file mode 100644 index c3bb84b7..00000000 --- a/OWML.Common/IModMenu.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using UnityEngine.UI; - -namespace OWML.Common -{ - public interface IModMenu - { - List