Fix wrong theme stuff

This commit is contained in:
Flamefire committed 2014-10-16 23:47:52 +02:00
1 parent 3f76d039b6
commit 8109d77ab1
10 files changed
+118 -4878

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -385,10 +385,10 @@
</Rect>
<SkinEmptyTile>CoverTile</SkinEmptyTile>
<ColorEmptyTile>
<R>1</R>
<G>1</G>
<B>1</B>
<A>0.2</A>
<R>1</R>
<G>1</G>
<B>1</B>
<A>0.2</A>
</ColorEmptyTile>
<SkinTileSelected>PlayerSelector</SkinTileSelected>
<Tiles>
@@ -526,731 +526,6 @@
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
<Button>
<Skin>CoverTile</Skin>
<SkinSelected>CoverTile</SkinSelected>
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
</Rect>
<Color />
<SelColor />
<Text>
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<H>0</H>
<MaxW>0</MaxW>
<Color />
<SColor />
<Align>Left</Align>
<ResizeAlign>Top</ResizeAlign>
<Style>Normal</Style>
<Reflection Enabled="false" />
</Text>
<STextSpecified>false</STextSpecified>
<Reflection Enabled="false" />
<SelReflection Enabled="false" />
</Button>
</Buttons>
<SongMenus />
<Lyrics />
+35 -28
View File
@@ -46,7 +46,7 @@
</Static>
<Static Name="StaticOptionsBG">
<Skin>SongMenuBG</Skin>
<Color Name="White">
<Color Name="White"/>
<Rect>
<X>40</X>
<Y>40</Y>
@@ -1354,40 +1354,47 @@
<SelReflection Enabled="false" />
</ButtonPlaylistSing>
<SelectSlideGameMode>
<Skin>Button</Skin>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected />
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<SkinHighlighted />
<Rect>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
<Y>28</Y>
<W>293</W>
<H>24</H>
<Z>-1.01</Z>
</Rect>
<RectArrowLeft>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
<X>54</X>
<Y>30</Y>
<W>20</W>
<H>20</H>
<Z>-1.02</Z>
</RectArrowLeft>
<RectArrowRight>
<X>0</X>
<Y>0</Y>
<W>0</W>
<H>0</H>
<Z>0</Z>
<X>271</X>
<Y>30</Y>
<W>20</W>
<H>20</H>
<Z>-1.02</Z>
</RectArrowRight>
<Color />
<SColor />
<HColor />
<ArrowColor />
<ArrowSColor />
<TextColor />
<TextSColor />
<TextH>0</TextH>
<TextRelativeX>0</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>0</TextMaxW>
<TextStyle>Normal</TextStyle>
<NumVisible>0</NumVisible>
<Color Name="ButtonColor" />
<SColor Name="ButtonSColor" />
<HColor Name="SelectSlideHColor" />
<ArrowColor Name="ArrowColor" />
<ArrowSColor Name="ArrowSColor" />
<TextColor Name="TextColor" />
<TextSColor Name="TextSColor" />
<TextH>22.00</TextH>
<TextRelativeX>25.00</TextRelativeX>
<TextMaxW>230.00</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>1</NumVisible>
</SelectSlideGameMode>
</Playlist>
</Playlists>
-2
View File
@@ -174,7 +174,6 @@ namespace Vocaluxe.Base.ThemeSystem
public virtual CVideoStream GetVideo(string videoName, bool loop)
{
Debug.Assert(_Parent.Name != "Default" || _RequiredVideos.Contains(videoName));
CVideoSkinElement sk;
if (_Videos.TryGetValue(videoName, out sk))
{
@@ -190,7 +189,6 @@ namespace Vocaluxe.Base.ThemeSystem
public virtual CTextureRef GetTexture(string name)
{
Debug.Assert(_Parent.Name != "Default" || _RequiredTextures.Contains(name));
CTextureRef texture;
_Textures.TryGetValue(name, out texture);
return texture;
+5 -4
View File
@@ -70,7 +70,8 @@ namespace VocaluxeLib.Menu
set
{
Text.EditMode = value;
_SelText.EditMode = value;
if (_SelText != null)
_SelText.EditMode = value;
}
}
@@ -123,7 +124,7 @@ namespace VocaluxeLib.Menu
_Theme = theme;
Text = new CText(_Theme.Text, _PartyModeID, buttonText);
_SelText = new CText(_Theme.SText, _PartyModeID, buttonText);
_SelText = _Theme.STextSpecified ? new CText(_Theme.SText, _PartyModeID, buttonText) : null;
Selected = false;
EditMode = false;
@@ -147,7 +148,7 @@ namespace VocaluxeLib.Menu
SelTexture = button.SelTexture;
Text = new CText(button.Text);
_SelText = new CText(button._SelText);
_SelText = _SelText == null ? null : new CText(button._SelText);
Selected = false;
EditMode = false;
_Enabled = button._Enabled;
@@ -282,7 +283,7 @@ namespace VocaluxeLib.Menu
else
Text.DrawRelative(Rect.X, Rect.Y);
}
else if (_Theme.STextSpecified)
else
{
texture = SelTexture ?? CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID);
+1 -1
View File
@@ -385,7 +385,7 @@ namespace VocaluxeLib.Menu
try
{
TextWriter textWriter = new StreamWriter(@Path.Combine(ThemePath, ThemeName + ".xml"));
TextWriter textWriter = new StreamWriter(Path.Combine(ThemePath, ThemeName + ".xml"));
XmlSerializer serializer = new XmlSerializer(typeof(STheme));
serializer.Serialize(textWriter, Theme);
+19 -4
View File
@@ -323,10 +323,18 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/HA", ref HighlightColor.A);
}
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextH", ref _Theme.TextH);
xmlReader.TryGetFloatValue(item + "/TextRelativeX", ref _Theme.TextRelativeX);
xmlReader.TryGetFloatValue(item + "/TextRelativeY", ref _Theme.TextRelativeY);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextMaxW", ref _Theme.TextMaxW);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowLeftX", ref RectArrowLeft.X);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowLeftY", ref RectArrowLeft.Y);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowLeftZ", ref RectArrowLeft.Z);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowLeftW", ref RectArrowLeft.W);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowLeftH", ref RectArrowLeft.H);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightX", ref RectArrowRight.X);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightY", ref RectArrowRight.Y);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightZ", ref RectArrowRight.Z);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightW", ref RectArrowRight.W);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/ArrowRightH", ref RectArrowRight.H);
if (xmlReader.GetValue(item + "/ArrowColor", out _Theme.ArrowColor.Name, String.Empty))
_ThemeLoaded &= _Theme.ArrowColor.Get(_PartyModeID, out ColorArrow);
else
@@ -366,6 +374,11 @@ namespace VocaluxeLib.Menu
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextSB", ref SelTextColor.B);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextSA", ref SelTextColor.A);
}
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextH", ref _Theme.TextH);
xmlReader.TryGetFloatValue(item + "/TextRelativeX", ref _Theme.TextRelativeX);
xmlReader.TryGetFloatValue(item + "/TextRelativeY", ref _Theme.TextRelativeY);
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/TextMaxW", ref _Theme.TextMaxW);
_ThemeLoaded &= xmlReader.GetValue(item + "/TextFont", out _Theme.TextFont, "Normal");
_ThemeLoaded &= xmlReader.TryGetEnumValue(item + "/TextStyle", ref _Theme.TextStyle);
@@ -378,6 +391,8 @@ namespace VocaluxeLib.Menu
_Theme.ArrowSColor.Color = SelColorArrow;
_Theme.Color.Color = Color;
_Theme.HColor.Color = HighlightColor;
_Theme.RectArrowLeft = RectArrowLeft;
_Theme.RectArrowRight = RectArrowRight;
_Theme.SColor.Color = SelColor;
_Theme.TextColor.Color = TextColor;
_Theme.TextSColor.Color = SelTextColor;
+54 -10
View File
@@ -102,27 +102,71 @@ namespace VocaluxeLib
[XmlRoot("Color")]
public struct SThemeColor
{
public SColorF Color;
public string Name;
[XmlAttribute] public string Name;
public float? R;
public float? G;
public float? B;
public float? A;
//Needed for serialization
public bool ColorSpecified
{
get { return String.IsNullOrEmpty(Name); }
}
public bool NameSpecified
{
get { return !String.IsNullOrEmpty(Name); }
}
public bool RSpecified
{
get { return R.HasValue; }
}
public bool GSpecified
{
get { return G.HasValue; }
}
public bool BSpecified
{
get { return B.HasValue; }
}
public bool ASpecified
{
get { return A.HasValue; }
}
/// <summary>
/// Use only for old code! Remove when removing old LoadTheme()
/// </summary>
[XmlIgnore]
public SColorF Color
{
set
{
if (NameSpecified)
return;
R = value.R;
G = value.G;
B = value.B;
A = value.A;
}
}
public bool Get(int partyModeId, out SColorF color)
{
if (String.IsNullOrEmpty(Name))
bool ok;
if (!String.IsNullOrEmpty(Name))
ok = CBase.Themes.GetColor(Name, partyModeId, out color);
else
{
color = Color;
return true;
Debug.Assert(R.HasValue && G.HasValue && B.HasValue && A.HasValue);
ok = true;
color = new SColorF(1, 1, 1, 1);
}
return CBase.Themes.GetColor(Name, partyModeId, out color);
if (R.HasValue)
color.R = R.Value;
if (G.HasValue)
color.G = G.Value;
if (B.HasValue)
color.B = B.Value;
if (A.HasValue)
color.A = A.Value;
return ok;
}
}