CTheme and CText changes

This commit is contained in:
Flamefire committed 2013-03-19 23:01:04 +01:00
1 parent 6380c739aa
commit 7469e86617
16 files changed
+96 -162

No files matched your search

@@ -1,5 +1,13 @@
ScreenSong ScreenSong
++++++++++
Version 5:
Add:
<ButtonOptionsOpenSelectedItem>
Remove:
ButtonOptionsOpenPlaylist
++++++++++ ++++++++++
Version 4: Version 4:
+2 -2
View File
@@ -247,9 +247,9 @@ namespace Vocaluxe.Base
return CTheme.GetColor(ColorName, PartyModeID); return CTheme.GetColor(ColorName, PartyModeID);
} }
public bool GetColor(string ColorName, int SkinIndex, ref SColorF Color) public bool GetColor(string ColorName, int SkinIndex, out SColorF Color)
{ {
return CTheme.GetColor(ColorName, SkinIndex, ref Color); return CTheme.GetColor(ColorName, SkinIndex, out Color);
} }
public SColorF GetPlayerColor(int PlayerNr) public SColorF GetPlayerColor(int PlayerNr)
+8 -28
View File
@@ -855,25 +855,15 @@ namespace Vocaluxe.Base
#region Color Handling #region Color Handling
public static SColorF GetColor(string ColorName, int PartyModeID) public static SColorF GetColor(string ColorName, int PartyModeID)
{ {
SColorF color = new SColorF(1f, 1f, 1f, 1f); SColorF color;
int SkinIndex = GetSkinIndex(PartyModeID); int SkinIndex = GetSkinIndex(PartyModeID);
foreach (SColorScheme scheme in _Skins[SkinIndex].ThemeColors.ColorSchemes)
{
if (scheme.Name == ColorName)
{
color.R = scheme.Color.R;
color.G = scheme.Color.G;
color.B = scheme.Color.B;
color.A = scheme.Color.A;
return color; GetColor(ColorName, SkinIndex, out color);
} return color;
}
return GetPlayerColor(ColorName);
} }
public static bool GetColor(string ColorName, int SkinIndex, ref SColorF Color) public static bool GetColor(string ColorName, int SkinIndex, out SColorF Color)
{ {
foreach (SColorScheme scheme in _Skins[SkinIndex].ThemeColors.ColorSchemes) foreach (SColorScheme scheme in _Skins[SkinIndex].ThemeColors.ColorSchemes)
{ {
@@ -885,7 +875,7 @@ namespace Vocaluxe.Base
} }
bool success; bool success;
GetPlayerColor(ColorName, GetSkinIndex(-1), out success); Color = GetPlayerColor(ColorName, GetSkinIndex(-1), out success);
return success; return success;
} }
@@ -909,19 +899,9 @@ namespace Vocaluxe.Base
public static SColorF GetPlayerColor(string PlayerNrString, int SkinIndex, out bool success) public static SColorF GetPlayerColor(string PlayerNrString, int SkinIndex, out bool success)
{ {
SColorF color = new SColorF(1f, 1f, 1f, 1f); int selection = 0;
if (_Skins[SkinIndex].PartyModeID != -1) if (PlayerNrString.StartsWith("Player"))
SkinIndex = GetSkinIndex(-1); int.TryParse(PlayerNrString.Substring(6), out selection);
int selection = -1;
for (int i = 0; i < _Skins[SkinIndex].ThemeColors.Player.Length; i++)
{
if (PlayerNrString == "Player" + (i + 1).ToString())
{
selection = i + 1;
break;
}
}
return GetPlayerColor(selection, SkinIndex, out success); return GetPlayerColor(selection, SkinIndex, out success);
} }
+1 -1
View File
@@ -60,7 +60,7 @@ namespace Vocaluxe.Screens
private string _SearchText = String.Empty; private string _SearchText = String.Empty;
private bool _SearchActive = false; private bool _SearchActive = false;
private List<string> ButtonsJoker = new List<string>(); private readonly List<string> ButtonsJoker = new List<string>();
private List<string> TextsPlayer = new List<string>(); private List<string> TextsPlayer = new List<string>();
private bool _SongOptionsActive = false; private bool _SongOptionsActive = false;
private bool _PlaylistActive = false; private bool _PlaylistActive = false;
+1 -1
View File
@@ -65,7 +65,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
+2 -2
View File
@@ -147,7 +147,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
@@ -159,7 +159,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty)) if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, out SColor);
} }
else else
{ {
+2 -2
View File
@@ -93,7 +93,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
@@ -105,7 +105,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/MaxColor", ref _Theme.MaxColorName, String.Empty)) if (xmlReader.GetValue(item + "/MaxColor", ref _Theme.MaxColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
+2 -2
View File
@@ -118,7 +118,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
@@ -130,7 +130,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty)) if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, out ColorProcessed);
} }
else else
{ {
+2 -2
View File
@@ -119,7 +119,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/ColorEmptyTile", ref _Theme.ColorEmptyTileName, String.Empty)) if (xmlReader.GetValue(item + "/ColorEmptyTile", ref _Theme.ColorEmptyTileName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, out ColorEmptyTile);
} }
else else
{ {
@@ -143,7 +143,7 @@ namespace Vocaluxe.Menu
_ThemeLoaded &= xmlReader.TryGetEnumValue<EStyle>(item + "/Tiles/Name/Style", ref _Theme.NameStyle); _ThemeLoaded &= xmlReader.TryGetEnumValue<EStyle>(item + "/Tiles/Name/Style", ref _Theme.NameStyle);
if (xmlReader.GetValue(item + "/Tiles/Name/Color", ref _Theme.NameColorName, String.Empty)) if (xmlReader.GetValue(item + "/Tiles/Name/Color", ref _Theme.NameColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.NameColorName, SkinIndex, out _Theme.NameColor);
} }
else else
{ {
+1 -1
View File
@@ -388,7 +388,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
+2 -2
View File
@@ -245,7 +245,7 @@ namespace Vocaluxe.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H); _ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
if (xmlReader.GetValue(item + "/ColorBackground", ref _Theme.ColorBackgroundName, String.Empty)) if (xmlReader.GetValue(item + "/ColorBackground", ref _Theme.ColorBackgroundName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, ref BackgroundColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, out BackgroundColor);
} }
else else
{ {
@@ -256,7 +256,7 @@ namespace Vocaluxe.Menu
} }
if (xmlReader.GetValue(item + "/SColorBackground", ref _Theme.SColorBackgroundName, String.Empty)) if (xmlReader.GetValue(item + "/SColorBackground", ref _Theme.SColorBackgroundName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, ref BackgroundSColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, out BackgroundSColor);
} }
else else
{ {
+8 -10
View File
@@ -254,7 +254,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
@@ -266,7 +266,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty)) if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, out SColor);
} }
else else
{ {
@@ -278,7 +278,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/HColor", ref _Theme.HColorName, String.Empty)) if (xmlReader.GetValue(item + "/HColor", ref _Theme.HColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.HColorName, SkinIndex, ref HColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.HColorName, SkinIndex, out HColor);
} }
else else
{ {
@@ -302,7 +302,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/ArrowColor", ref _Theme.ArrowColorName, String.Empty)) if (xmlReader.GetValue(item + "/ArrowColor", ref _Theme.ArrowColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, ref ColorArrow); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, out ColorArrow);
} }
else else
{ {
@@ -314,7 +314,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/ArrowSColor", ref _Theme.SArrowColorName, String.Empty)) if (xmlReader.GetValue(item + "/ArrowSColor", ref _Theme.SArrowColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, ref SColorArrow); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, out SColorArrow);
} }
else else
{ {
@@ -326,7 +326,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/TextColor", ref _Theme.TextColorName, String.Empty)) if (xmlReader.GetValue(item + "/TextColor", ref _Theme.TextColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColorName, SkinIndex, ref TextColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColorName, SkinIndex, out TextColor);
} }
else else
{ {
@@ -338,7 +338,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/TextSColor", ref _Theme.STextColorName, String.Empty)) if (xmlReader.GetValue(item + "/TextSColor", ref _Theme.STextColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.STextColorName, SkinIndex, ref STextColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.STextColorName, SkinIndex, out STextColor);
} }
else else
{ {
@@ -780,9 +780,7 @@ namespace Vocaluxe.Menu
_ValueBounds.Clear(); _ValueBounds.Clear();
for (int i = 0; i < numvis; i++) for (int i = 0; i < numvis; i++)
{ {
CText Text = new CText(0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, String.Empty); CText Text = new CText(0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, _ValueNames[i + offset], _ValuePartyModeIDs[i + offset]);
Text.PartyModeID = _ValuePartyModeIDs[i + offset];
Text.Text = _ValueNames[i + offset];
SColorF Alpha = new SColorF(1f, 1f, 1f, 0.35f); SColorF Alpha = new SColorF(1f, 1f, 1f, 0.35f);
if (i + offset == _Selection) if (i + offset == _Selection)
+1 -1
View File
@@ -141,7 +141,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
+54 -106
View File
@@ -36,16 +36,16 @@ namespace Vocaluxe.Menu
public class CText : IMenuElement public class CText : IMenuElement
{ {
private SThemeText _Theme; private SThemeText _Theme;
private bool _ThemeLoaded; private bool _ThemeLoaded=false;
private int _PartyModeID; private int _PartyModeID=-1;
private int _TranslationID; private int _TranslationID=-1;
public string GetThemeName() public string GetThemeName()
{ {
return _Theme.Name; return _Theme.Name;
} }
private bool _ButtonText; private bool _ButtonText=false;
private bool _PositionNeedsUpdate = true; private bool _PositionNeedsUpdate = true;
private STextPosition _DrawPosition = new STextPosition(0); private STextPosition _DrawPosition = new STextPosition(0);
@@ -82,14 +82,7 @@ namespace Vocaluxe.Menu
public float Z public float Z
{ {
get { return _Z; } get { return _Z; }
set set { _Z = value; }
{
if (_Z != value)
{
_Z = value;
_PositionNeedsUpdate = true;
}
}
} }
private float _Height = 0f; private float _Height = 0f;
@@ -198,7 +191,7 @@ namespace Vocaluxe.Menu
public SColorF Color; //normal Color public SColorF Color; //normal Color
public SColorF SColor; //selected Color for Buttons public SColorF SColor; //selected Color for Buttons
public bool Reflection; public bool Reflection=false;
public float ReflectionSpace; public float ReflectionSpace;
public float ReflectionHeight; public float ReflectionHeight;
@@ -221,13 +214,6 @@ namespace Vocaluxe.Menu
public int PartyModeID public int PartyModeID
{ {
get { return _PartyModeID; } get { return _PartyModeID; }
set
{
_Text = CBase.Language.Translate(_Text, value);
_PositionNeedsUpdate = true;
_PartyModeID = value;
_TranslationID = value;
}
} }
public int TranslationID public int TranslationID
@@ -235,67 +221,56 @@ namespace Vocaluxe.Menu
get { return _TranslationID; } get { return _TranslationID; }
set set
{ {
_Text = CBase.Language.Translate(_Text, value); if (_TranslationID != value)
_PositionNeedsUpdate = true; {
_TranslationID = value; _Text = CBase.Language.Translate(_Text, value);
_TranslationID = value;
_PositionNeedsUpdate = true;
}
} }
} }
public bool Selected; public bool Selected=false;
public bool Visible = true; public bool Visible = true;
public bool EditMode = false; private bool _EditMode = false;
public bool EditMode
{
get { return _EditMode; }
set
{
if (_EditMode != value)
{
_Text = (value) ? _Text + "|" : _Text.Substring(0, _Text.Length - 1);
_EditMode = value;
_PositionNeedsUpdate = true;
}
}
}
public float Alpha = 1f; public float Alpha = 1f;
public CText(int PartyModeID) public CText(int PartyModeID)
{ {
_Theme = new SThemeText();
_ThemeLoaded = false;
_ButtonText = false;
_PartyModeID = PartyModeID; _PartyModeID = PartyModeID;
_TranslationID = _PartyModeID; _TranslationID = _PartyModeID;
_Font = "Normal";
X = 0f;
Y = 0f;
Z = 0f;
Height = 1f;
MaxWidth = 0f;
Bounds = new SRectF();
Align = EAlignment.Left;
HAlign = EHAlignment.Center;
Style = EStyle.Normal;
Font = "Normal";
Color = new SColorF();
SColor = new SColorF();
Reflection = false;
ReflectionSpace = 0f;
ReflectionHeight = 0f;
Text = String.Empty;
Selected = false;
Visible = true;
Alpha = 1f;
} }
public CText(CText text) public CText(CText text)
{ {
_Theme = new SThemeText();
_ThemeLoaded = false;
_ButtonText = false;
_PartyModeID = text._PartyModeID; _PartyModeID = text._PartyModeID;
_TranslationID = text._TranslationID; _TranslationID = text._TranslationID;
X = text._X; _X = text._X;
Y = text._Y; _Y = text._Y;
Z = text._Z; _Z = text._Z;
Height = text._Height; _Height = text._Height;
MaxWidth = text._MaxWidth; _MaxWidth = text._MaxWidth;
Bounds = new SRectF(text._Bounds); _Bounds = new SRectF(text._Bounds);
Align = text._Align; _Align = text._Align;
HAlign = text._HAlign; _HAlign = text._HAlign;
Style = text._Style; _Style = text._Style;
Font = text._Font; _Font = text._Font;
Color = new SColorF(text.Color); Color = new SColorF(text.Color);
SColor = new SColorF(text.SColor); SColor = new SColorF(text.SColor);
@@ -303,12 +278,12 @@ namespace Vocaluxe.Menu
ReflectionSpace = text.ReflectionSpace; ReflectionSpace = text.ReflectionSpace;
ReflectionHeight = text.ReflectionHeight; ReflectionHeight = text.ReflectionHeight;
Text = text._Text; _Text = text._Text;
Selected = text.Selected; Selected = text.Selected;
Visible = text.Visible; Visible = text.Visible;
Alpha = text.Alpha; Alpha = text.Alpha;
EditMode = text.EditMode; _EditMode = text._EditMode;
} }
public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight) public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight)
@@ -426,13 +401,13 @@ namespace Vocaluxe.Menu
ReflectionHeight = rheight; ReflectionHeight = rheight;
} }
public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text) public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text, int PartyModeID = -1)
{ {
_Theme = new SThemeText(); _Theme = new SThemeText();
_ThemeLoaded = false; _ThemeLoaded = false;
_ButtonText = false; _ButtonText = false;
_PartyModeID = -1; _PartyModeID = PartyModeID;
_TranslationID = -1; _TranslationID = _PartyModeID;
X = x; X = x;
Y = y; Y = y;
@@ -484,7 +459,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out Color);
} }
else else
{ {
@@ -496,7 +471,7 @@ namespace Vocaluxe.Menu
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty)) if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, out SColor);
} }
else else
{ {
@@ -525,28 +500,18 @@ namespace Vocaluxe.Menu
Reflection = false; Reflection = false;
// Set values // Set values
X = _X; _Theme.Name = ElementName;
Y = _Y; _ButtonText = ButtonText;
Z = _Z; _PositionNeedsUpdate = true;
Height = _Height;
MaxWidth = _MaxWidth;
Text = _Theme.Text;
Font = _Font;
Align = _Align;
HAlign = _HAlign;
Style = _Style;
if (_ThemeLoaded) if (_ThemeLoaded)
{ {
_Theme.Name = ElementName;
LoadTextures(); LoadTextures();
if (MaxWidth > 0) if (MaxWidth > 0)
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f); Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
else else
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f); Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
_ButtonText = ButtonText;
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -667,10 +632,7 @@ namespace Vocaluxe.Menu
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha); SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
if (!EditMode) CBase.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
CBase.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
else
CBase.Fonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
if (Reflection) if (Reflection)
{ {
@@ -689,10 +651,7 @@ namespace Vocaluxe.Menu
default: default:
break; break;
} }
if (!EditMode) CBase.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
CBase.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
else
CBase.Fonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
} }
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme)) if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
@@ -730,10 +689,7 @@ namespace Vocaluxe.Menu
CBase.Fonts.SetFont(Font); CBase.Fonts.SetFont(Font);
CBase.Fonts.SetStyle(Style); CBase.Fonts.SetStyle(Style);
if (!EditMode) CBase.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
CBase.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
else
CBase.Fonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
if (Reflection) if (Reflection)
{ {
@@ -816,20 +772,14 @@ namespace Vocaluxe.Menu
CBase.Fonts.SetFont(Font); CBase.Fonts.SetFont(Font);
CBase.Fonts.SetStyle(Style); CBase.Fonts.SetStyle(Style);
if (!EditMode) CBase.Fonts.DrawText(_Text, h, x, y, Z, color);
CBase.Fonts.DrawText(_Text, h, x, y, Z, color);
else
CBase.Fonts.DrawText(_Text + "|", h, x, y, Z, color);
if (reflection) if (reflection)
{ {
float space = (rectHeight - Y - bounds.Height) * 2f + reflectionSpace; float space = (rectHeight - Y - bounds.Height) * 2f + reflectionSpace;
float height = reflectionHeight - (rectHeight - Y) + bounds.Height; float height = reflectionHeight - (rectHeight - Y) + bounds.Height;
if (!EditMode) CBase.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
CBase.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
else
CBase.Fonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
} }
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme)) if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
@@ -916,8 +866,6 @@ namespace Vocaluxe.Menu
case EAlignment.Right: case EAlignment.Right:
x = X - bounds.Width; x = X - bounds.Width;
break; break;
default:
break;
} }
_DrawPosition.X = x; _DrawPosition.X = x;
+1 -1
View File
@@ -114,7 +114,7 @@ namespace Vocaluxe.Menu
void SkinVideoPause(string VideoName, int PartyModeID); void SkinVideoPause(string VideoName, int PartyModeID);
SColorF GetColor(string ColorName, int PartyModeID); SColorF GetColor(string ColorName, int PartyModeID);
bool GetColor(string ColorName, int SkinIndex, ref SColorF Color); bool GetColor(string ColorName, int SkinIndex, out SColorF Color);
SColorF GetPlayerColor(int PlayerNr); SColorF GetPlayerColor(int PlayerNr);
void UnloadSkins(); void UnloadSkins();
@@ -270,7 +270,7 @@ namespace Vocaluxe.Menu.SongMenu
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty)) if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color); _ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, out _Color);
} }
else else
{ {