Fix Color description in Theme

Fix typo
Allow loading themes from file multiple times (e.g. for party modes)
This commit is contained in:
Flamefire committed 2014-10-08 22:39:48 +02:00
1 parent ae8a3c61d5
commit b7ca304322
3 files changed
+4 -5

No files matched your search

+1 -1
View File
@@ -11,6 +11,6 @@
<Skin>Cursor</Skin> <Skin>Cursor</Skin>
<W>40,000</W> <W>40,000</W>
<H>40,000</H> <H>40,000</H>
<Color>StaticColor</Color> <Color><Name>StaticColor</Name></Color>
</Cursor> </Cursor>
</root> </root>
+1 -1
View File
@@ -108,7 +108,7 @@ namespace Vocaluxe.Base.ThemeSystem
} }
// load colors // load colors
if (_LoadColors(xmlReader)) if (!_LoadColors(xmlReader))
return false; return false;
_IsLoaded = true; _IsLoaded = true;
+2 -3
View File
@@ -118,8 +118,6 @@ namespace Vocaluxe.Base.ThemeSystem
public static bool ReadThemesFromFolder(string path, int partyModeID) public static bool ReadThemesFromFolder(string path, int partyModeID)
{ {
Debug.Assert(_Themes.Count == 0);
List<string> files = CHelper.ListFiles(path, "*.xml", false, true); List<string> files = CHelper.ListFiles(path, "*.xml", false, true);
List<CTheme> newThemes = new List<CTheme>(); List<CTheme> newThemes = new List<CTheme>();
@@ -175,7 +173,8 @@ namespace Vocaluxe.Base.ThemeSystem
public static CTextureRef GetSkinTexture(string textureName, int partyModeID) public static CTextureRef GetSkinTexture(string textureName, int partyModeID)
{ {
Debug.Assert(!String.IsNullOrEmpty(textureName)); if (String.IsNullOrEmpty(textureName))
return null;
CTheme theme = _GetTheme(partyModeID); CTheme theme = _GetTheme(partyModeID);
CTextureRef texture = theme.CurrentSkin.GetTexture(textureName); CTextureRef texture = theme.CurrentSkin.GetTexture(textureName);
if (texture == null && partyModeID >= 0) if (texture == null && partyModeID >= 0)