buttons converted

This commit is contained in:
Alexander Eckart committed 2012-12-13 21:56:13 +01:00
1 parent fe763e8a40
commit 2945357298
2 files changed
+15 -17

No files matched your search

+14 -17
View File
@@ -5,9 +5,6 @@ using System.Text;
using System.Xml; using System.Xml;
using System.Xml.XPath; using System.Xml.XPath;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
namespace Vocaluxe.Menu namespace Vocaluxe.Menu
{ {
struct SThemeButton struct SThemeButton
@@ -112,7 +109,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty)) if (CHelper.GetValueFromXML(item + "/Color", navigator, ref _Theme.ColorName, String.Empty))
{ {
_ThemeLoaded &= CTheme.GetColor(_Theme.ColorName, SkinIndex, ref Color); _ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
} }
else else
{ {
@@ -124,7 +121,7 @@ namespace Vocaluxe.Menu
if (CHelper.GetValueFromXML(item + "/SColor", navigator, ref _Theme.SColorName, String.Empty)) if (CHelper.GetValueFromXML(item + "/SColor", navigator, ref _Theme.SColorName, String.Empty))
{ {
_ThemeLoaded &= CTheme.GetColor(_Theme.SColorName, SkinIndex, ref SColor); _ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
} }
else else
{ {
@@ -263,41 +260,41 @@ namespace Vocaluxe.Menu
public void Draw(bool ForceDraw) public void Draw(bool ForceDraw)
{ {
if (!Visible && CSettings.GameState != EGameState.EditTheme && !ForceDraw) if (!Visible && _Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
return; return;
STexture texture = new STexture(-1); STexture texture = new STexture(-1);
if (!Selected && !Pressed) if (!Selected && !Pressed)
{ {
texture = CTheme.GetSkinTexture(_Theme.TextureName); texture = _Base.Theme.GetSkinTexture(_Theme.TextureName);
CDraw.DrawTexture(texture, Rect, Color); _Base.Drawing.DrawTexture(texture, Rect, Color);
Text.DrawRelative(Rect.X, Rect.Y); Text.DrawRelative(Rect.X, Rect.Y);
if (Reflection) if (Reflection)
{ {
CDraw.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight); _Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H); Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
} }
} }
else if(!SelText) else if(!SelText)
{ {
texture = CTheme.GetSkinTexture(_Theme.STextureName); texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
CDraw.DrawTexture(texture, Rect, SColor); _Base.Drawing.DrawTexture(texture, Rect, SColor);
Text.DrawRelative(Rect.X, Rect.Y); Text.DrawRelative(Rect.X, Rect.Y);
if (Reflection) if (Reflection)
{ {
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight); _Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H); Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
} }
} }
else if(SelText) else if(SelText)
{ {
texture = CTheme.GetSkinTexture(_Theme.STextureName); texture = _Base.Theme.GetSkinTexture(_Theme.STextureName);
CDraw.DrawTexture(texture, Rect, SColor); _Base.Drawing.DrawTexture(texture, Rect, SColor);
SText.DrawRelative(Rect.X, Rect.Y); SText.DrawRelative(Rect.X, Rect.Y);
if (Reflection) if (Reflection)
{ {
CDraw.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight); _Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H); SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
} }
} }
@@ -318,10 +315,10 @@ namespace Vocaluxe.Menu
Text.LoadTextures(); Text.LoadTextures();
if (_Theme.ColorName != String.Empty) if (_Theme.ColorName != String.Empty)
Color = CTheme.GetColor(_Theme.ColorName); Color = _Base.Theme.GetColor(_Theme.ColorName);
if (_Theme.SColorName != String.Empty) if (_Theme.SColorName != String.Empty)
SColor = CTheme.GetColor(_Theme.SColorName); SColor = _Base.Theme.GetColor(_Theme.SColorName);
} }
public void ReloadTextures() public void ReloadTextures()
+1
View File
@@ -111,6 +111,7 @@ namespace Vocaluxe.Menu
RectangleF GetTextBounds(CText text); RectangleF GetTextBounds(CText text);
void DrawTexture(STexture Texture, SRectF Rect); void DrawTexture(STexture Texture, SRectF Rect);
void DrawTexture(STexture Texture, SRectF Rect, SColorF Color);
void DrawTexture(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds); void DrawTexture(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds);
void DrawTextureReflection(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds, float ReflectionSpace, float ReflectionHeight); void DrawTextureReflection(STexture Texture, SRectF Rect, SColorF Color, SRectF Bounds, float ReflectionSpace, float ReflectionHeight);