added IMenu, moved CGraphics to Base
This commit is contained in:
1 parent
bc7aa797fa
commit
7676840932
4 files changed
+54
-6
No files matched your search
@@ -8,6 +8,7 @@ using System.Windows.Forms;
|
|||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Lib.Draw;
|
using Vocaluxe.Lib.Draw;
|
||||||
using Vocaluxe.Screens;
|
using Vocaluxe.Screens;
|
||||||
|
using Vocaluxe.Screens.PartyScreens;
|
||||||
|
|
||||||
namespace Vocaluxe.Menu
|
namespace Vocaluxe.Menu
|
||||||
{
|
{
|
||||||
@@ -199,8 +200,8 @@ namespace Vocaluxe.Menu
|
|||||||
private static EScreens _NextScreen;
|
private static EScreens _NextScreen;
|
||||||
private static EPopupScreens _CurrentPopupScreen;
|
private static EPopupScreens _CurrentPopupScreen;
|
||||||
|
|
||||||
private static List<CMenu> _Screens = new List<CMenu>();
|
private static List<IMenu> _Screens = new List<IMenu>();
|
||||||
private static List<CMenu> _PopupScreens = new List<CMenu>();
|
private static List<IMenu> _PopupScreens = new List<IMenu>();
|
||||||
|
|
||||||
private static float _SavedBackgroundMusicVolume;
|
private static float _SavedBackgroundMusicVolume;
|
||||||
private static float _SavedPreviewMusicVolume;
|
private static float _SavedPreviewMusicVolume;
|
||||||
@@ -591,7 +592,7 @@ namespace Vocaluxe.Menu
|
|||||||
|
|
||||||
UpdateMousePosition(MouseEvent.X, MouseEvent.Y);
|
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 (PopupPlayerControlAllowed && isOverPopupPlayerControl)
|
||||||
{
|
{
|
||||||
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
||||||
@@ -601,7 +602,7 @@ namespace Vocaluxe.Menu
|
|||||||
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
|
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
|
||||||
HidePopup(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 (PopupVolumeControlAllowed && isOverPopupVolumeControl)
|
||||||
{
|
{
|
||||||
if (_CurrentPopupScreen == EPopupScreens.NoPopup)
|
if (_CurrentPopupScreen == EPopupScreens.NoPopup)
|
||||||
@@ -22,7 +22,7 @@ namespace Vocaluxe.Menu
|
|||||||
public float z;
|
public float z;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class CMenu
|
abstract class CMenu : IMenu
|
||||||
{
|
{
|
||||||
private List<CInteraction> _Interactions;
|
private List<CInteraction> _Interactions;
|
||||||
private int _Selection = 0;
|
private int _Selection = 0;
|
||||||
@@ -81,6 +81,11 @@ namespace Vocaluxe.Menu
|
|||||||
get { return _ScreenArea; }
|
get { return _ScreenArea; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SRectF GetScreenArea()
|
||||||
|
{
|
||||||
|
return _ScreenArea;
|
||||||
|
}
|
||||||
|
|
||||||
public int ThemeScreenVersion
|
public int ThemeScreenVersion
|
||||||
{
|
{
|
||||||
get { return _ScreenVersion; }
|
get { return _ScreenVersion; }
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
<Compile Include="Menu\CBackground.cs" />
|
<Compile Include="Menu\CBackground.cs" />
|
||||||
<Compile Include="Menu\CButton.cs" />
|
<Compile Include="Menu\CButton.cs" />
|
||||||
<Compile Include="Menu\CEqualizer.cs" />
|
<Compile Include="Menu\CEqualizer.cs" />
|
||||||
<Compile Include="Menu\CGraphics.cs" />
|
<Compile Include="Base\CGraphics.cs" />
|
||||||
<Compile Include="Menu\CNameSelection.cs" />
|
<Compile Include="Menu\CNameSelection.cs" />
|
||||||
<Compile Include="Menu\CLyric.cs" />
|
<Compile Include="Menu\CLyric.cs" />
|
||||||
<Compile Include="Menu\CMenu.cs" />
|
<Compile Include="Menu\CMenu.cs" />
|
||||||
@@ -239,6 +239,7 @@
|
|||||||
<Compile Include="Menu\CSelectSlide.cs" />
|
<Compile Include="Menu\CSelectSlide.cs" />
|
||||||
<Compile Include="Menu\CStatic.cs" />
|
<Compile Include="Menu\CStatic.cs" />
|
||||||
<Compile Include="Menu\CText.cs" />
|
<Compile Include="Menu\CText.cs" />
|
||||||
|
<Compile Include="Menu\IMenu.cs" />
|
||||||
<Compile Include="Menu\IMenuElement.cs" />
|
<Compile Include="Menu\IMenuElement.cs" />
|
||||||
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
|
<Compile Include="Menu\SingNotes\CSingNotes.cs" />
|
||||||
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
|
<Compile Include="Menu\SingNotes\CSingNotesClassic.cs" />
|
||||||
|
|||||||
Reference in new issue
Block a user