diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs similarity index 98% rename from Vocaluxe/Menu/CGraphics.cs rename to Vocaluxe/Base/CGraphics.cs index 0e5ca85e..4b314ae3 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -8,6 +8,7 @@ using System.Windows.Forms; using Vocaluxe.Base; using Vocaluxe.Lib.Draw; using Vocaluxe.Screens; +using Vocaluxe.Screens.PartyScreens; namespace Vocaluxe.Menu { @@ -199,8 +200,8 @@ namespace Vocaluxe.Menu private static EScreens _NextScreen; private static EPopupScreens _CurrentPopupScreen; - private static List _Screens = new List(); - private static List _PopupScreens = new List(); + private static List _Screens = new List(); + private static List _PopupScreens = new List(); private static float _SavedBackgroundMusicVolume; private static float _SavedPreviewMusicVolume; @@ -591,7 +592,7 @@ namespace Vocaluxe.Menu UpdateMousePosition(MouseEvent.X, MouseEvent.Y); - bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].ScreenArea, MouseEvent); + bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].GetScreenArea(), MouseEvent); if (PopupPlayerControlAllowed && isOverPopupPlayerControl) { if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) @@ -601,7 +602,7 @@ namespace Vocaluxe.Menu if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl) HidePopup(EPopupScreens.PopupPlayerControl); - bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].ScreenArea, MouseEvent); + bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].GetScreenArea(), MouseEvent); if (PopupVolumeControlAllowed && isOverPopupVolumeControl) { if (_CurrentPopupScreen == EPopupScreens.NoPopup) diff --git a/Vocaluxe/Menu/CMenu.cs b/Vocaluxe/Menu/CMenu.cs index d639d91e..91fc6bf4 100644 --- a/Vocaluxe/Menu/CMenu.cs +++ b/Vocaluxe/Menu/CMenu.cs @@ -22,7 +22,7 @@ namespace Vocaluxe.Menu public float z; } - abstract class CMenu + abstract class CMenu : IMenu { private List _Interactions; private int _Selection = 0; @@ -81,6 +81,11 @@ namespace Vocaluxe.Menu get { return _ScreenArea; } } + public SRectF GetScreenArea() + { + return _ScreenArea; + } + public int ThemeScreenVersion { get { return _ScreenVersion; } diff --git a/Vocaluxe/Menu/IMenu.cs b/Vocaluxe/Menu/IMenu.cs new file mode 100644 index 00000000..cc65ede5 --- /dev/null +++ b/Vocaluxe/Menu/IMenu.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using Vocaluxe.Base; +using Vocaluxe.Lib.Draw; + +namespace Vocaluxe.Menu +{ + interface IMenu + { + void LoadTheme(); + void SaveTheme(); + void ReloadTextures(); + void UnloadTextures(); + void ReloadTheme(); + + bool HandleInput(KeyEvent KeyEvent); + bool HandleMouse(MouseEvent MouseEvent); + bool HandleInputThemeEditor(KeyEvent KeyEvent); + bool HandleMouseThemeEditor(MouseEvent MouseEvent); + + bool UpdateGame(); + void ApplyVolume(); + void OnShow(); + void OnShowFinish(); + void OnClose(); + + bool Draw(); + SRectF GetScreenArea(); + + void NextInteraction(); + void PrevInteraction(); + + bool NextElement(); + bool PrevElement(); + + void ProcessMouseClick(int x, int y); + void ProcessMouseMove(int x, int y); + } +} diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 94b05046..42c754cc 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -229,7 +229,7 @@ - + @@ -239,6 +239,7 @@ +