Merge branch 'develop' of git://github.com/flokuep/Vocaluxe into Better_Graphics_Handling

Conflicts:
	Vocaluxe/COSFunctions.cs
	VocaluxeLib/CHelper.cs
	VocaluxeLib/Menu/CStatic.cs
	VocaluxeLib/Structs.cs
This commit is contained in:
Flamefire committed 2014-09-25 18:49:18 +02:00
commit c156fa69ab
550 files changed
+22434 -23687

No files matched your search

+23 -18
View File
@@ -17,11 +17,12 @@
using System;
using System.Xml;
using System.Xml.Serialization;
using VocaluxeLib.Draw;
namespace VocaluxeLib.Menu
{
enum ESettingType
public enum ESettingType
{
Int,
String,
@@ -29,10 +30,14 @@ namespace VocaluxeLib.Menu
Texture
}
struct SScreenSetting
[XmlType("ScreenSetting")]
public struct SScreenSetting
{
[XmlAttributeAttribute(AttributeName = "Name")]
public string Name;
[XmlElement("Value")]
public string Value;
[XmlElement("Type")]
public ESettingType Type;
}
@@ -51,6 +56,11 @@ namespace VocaluxeLib.Menu
return _Theme.Name;
}
public bool ThemeLoaded
{
get { return _ThemeLoaded; }
}
public CScreenSetting(int partyModeID)
{
_PartyModeID = partyModeID;
@@ -58,6 +68,12 @@ namespace VocaluxeLib.Menu
_ThemeLoaded = false;
}
public CScreenSetting(SScreenSetting theme, int partyModeID)
{
_PartyModeID = partyModeID;
_Theme = theme;
}
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader, int skinIndex)
{
string item = xmlPath + "/" + elementName;
@@ -71,22 +87,6 @@ namespace VocaluxeLib.Menu
return _ThemeLoaded;
}
public bool SaveTheme(XmlWriter writer)
{
if (_ThemeLoaded)
{
writer.WriteStartElement(_Theme.Name);
writer.WriteComment("<Type>: Type of theme-setting-value: " + CHelper.ListStrings(Enum.GetNames(typeof(ESettingType))));
writer.WriteElementString("Type", Enum.GetName(typeof(ESettingType), _Theme.Type));
writer.WriteComment("<Value>: Value of theme-setting");
writer.WriteElementString("Value", _Theme.Value);
writer.WriteEndElement();
return true;
}
return false;
}
public object GetValue()
{
switch (_Theme.Type)
@@ -113,6 +113,11 @@ namespace VocaluxeLib.Menu
public void ReloadTextures() {}
public SScreenSetting GetTheme()
{
return _Theme;
}
#region Private
private int _GetIntValue(string value)
{