Make CSettings contain only constant values to avoid accidental misuse. Everything changeable is in CConfig
This commit is contained in:
1 parent
cd79704c00
commit
eba5deba2b
30 files changed
+217
-243
No files matched your search
@@ -276,7 +276,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw(bool forceDraw = false)
|
||||
{
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !forceDraw)
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
|
||||
return;
|
||||
|
||||
CTexture texture;
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace VocaluxeLib.Menu
|
||||
#region draw
|
||||
public void Draw(float actualBeat)
|
||||
{
|
||||
if (Visible || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (Visible || CBase.Settings.GetProgramState() == EProgramState.EditTheme)
|
||||
{
|
||||
switch (LyricStyle)
|
||||
{
|
||||
|
||||
@@ -968,7 +968,7 @@ namespace VocaluxeLib.Menu
|
||||
float z = CBase.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((CBase.Settings.GetGameState() != EGameState.EditTheme) && (_Interactions[i].ThemeEditorOnly || !_IsVisible(i) || !_IsEnabled(i)))
|
||||
if ((CBase.Settings.GetProgramState() != EProgramState.EditTheme) && (_Interactions[i].ThemeEditorOnly || !_IsVisible(i) || !_IsEnabled(i)))
|
||||
continue;
|
||||
if (!_IsMouseOver(x, y, _Interactions[i]))
|
||||
continue;
|
||||
@@ -1043,7 +1043,7 @@ namespace VocaluxeLib.Menu
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -1070,7 +1070,7 @@ namespace VocaluxeLib.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
|
||||
@@ -470,7 +470,7 @@ namespace VocaluxeLib.Menu
|
||||
float z = CBase.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((CBase.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
if ((CBase.Settings.GetProgramState() == EProgramState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -553,7 +553,7 @@ namespace VocaluxeLib.Menu
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -580,7 +580,7 @@ namespace VocaluxeLib.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
|
||||
@@ -416,7 +416,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
if (_PlaylistElements.Count <= 0)
|
||||
LoadPlaylist(0);
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !forceDraw)
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < _PlaylistElements.Count; i++)
|
||||
|
||||
@@ -710,7 +710,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
return;
|
||||
|
||||
CTexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
@@ -733,7 +733,7 @@ namespace VocaluxeLib.Menu
|
||||
else
|
||||
CBase.Drawing.DrawTexture(texture, Rect, Color);
|
||||
|
||||
if (_Selection > 0 || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection > 0 || CBase.Settings.GetProgramState() == EProgramState.EditTheme)
|
||||
{
|
||||
if (_ArrowLeftSelected)
|
||||
CBase.Drawing.DrawTexture(selTextureArrowLeft, RectArrowLeft, SelColorArrow);
|
||||
@@ -741,7 +741,7 @@ namespace VocaluxeLib.Menu
|
||||
CBase.Drawing.DrawTexture(textureArrowLeft, RectArrowLeft, ColorArrow);
|
||||
}
|
||||
|
||||
if (_Selection < _ValueNames.Count - 1 || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection < _ValueNames.Count - 1 || CBase.Settings.GetProgramState() == EProgramState.EditTheme)
|
||||
{
|
||||
if (_ArrowRightSelected)
|
||||
CBase.Drawing.DrawTexture(selTextureArrowRight, RectArrowRight, SelColorArrow);
|
||||
|
||||
@@ -227,14 +227,14 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
|
||||
var color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha);
|
||||
if (Visible || forceDraw || (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Visible || forceDraw || (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
{
|
||||
CBase.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
if (Reflection)
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
CBase.Drawing.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect);
|
||||
}
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw(bool forceDraw = false)
|
||||
{
|
||||
if (!forceDraw && !Visible && CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!forceDraw && !Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
return;
|
||||
|
||||
// Update Text
|
||||
@@ -474,7 +474,7 @@ namespace VocaluxeLib.Menu
|
||||
if (ReflectionHeight > 0)
|
||||
CBase.Fonts.DrawTextReflection(_Text, Rect.H, Rect.X, Rect.Y, Z, color, ReflectionSpace, ReflectionHeight);
|
||||
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(Rect.X, Rect.Y, Rect.W, Rect.H, Z));
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ namespace VocaluxeLib.Menu
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetProgramState() == EProgramState.EditTheme))
|
||||
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(X, Y, Rect.W, Rect.H, Z));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user