Rename LoadTextures to LoadSkin

(Its also Colors, not only textures!)
This commit is contained in:
Flamefire committed 2014-10-18 10:42:35 +02:00
1 parent 9a699f4cb5
commit d8cce13211
25 files changed
+176 -181

No files matched your search

+5 -5
View File
@@ -85,7 +85,7 @@ namespace Vocaluxe.Base
_Cursor.Rect.Y = y; _Cursor.Rect.Y = y;
} }
public void LoadTextures() public void LoadSkin()
{ {
SThemeCursor theme = CThemes.GetCursorTheme(); SThemeCursor theme = CThemes.GetCursorTheme();
_Cursor = CDraw.CopyTexture(CThemes.GetSkinTexture(theme.SkinName, -1)); _Cursor = CDraw.CopyTexture(CThemes.GetSkinTexture(theme.SkinName, -1));
@@ -96,17 +96,17 @@ namespace Vocaluxe.Base
_Cursor.Rect.Z = CSettings.ZNear; _Cursor.Rect.Z = CSettings.ZNear;
} }
public void UnloadTextures() public void UnloadSkin()
{ {
CDraw.RemoveTexture(ref _Cursor); CDraw.RemoveTexture(ref _Cursor);
} }
public void ReloadTextures() public void ReloadSkin()
{ {
int x = X; int x = X;
int y = Y; int y = Y;
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
UpdatePosition(x, y); UpdatePosition(x, y);
} }
+6 -6
View File
@@ -121,7 +121,7 @@ namespace Vocaluxe.Base
public static void LoadTheme() public static void LoadTheme()
{ {
_Cursor.LoadTextures(); _Cursor.LoadSkin();
for (int i = 0; i < _Screens.Count; i++) for (int i = 0; i < _Screens.Count; i++)
{ {
@@ -140,7 +140,7 @@ namespace Vocaluxe.Base
public static void ReloadTheme() public static void ReloadTheme()
{ {
_Cursor.ReloadTextures(); _Cursor.ReloadSkin();
foreach (IMenu screen in _Screens) foreach (IMenu screen in _Screens)
screen.ReloadTheme(CThemes.GetThemeScreensPath(screen.PartyModeID)); screen.ReloadTheme(CThemes.GetThemeScreensPath(screen.PartyModeID));
@@ -152,14 +152,14 @@ namespace Vocaluxe.Base
public static void ReloadSkin() public static void ReloadSkin()
{ {
_Cursor.ReloadTextures(); _Cursor.ReloadSkin();
foreach (IMenu menu in _Screens) foreach (IMenu menu in _Screens)
menu.ReloadTextures(); menu.ReloadSkin();
foreach (IMenu menu in _PopupScreens) foreach (IMenu menu in _PopupScreens)
menu.ReloadTextures(); menu.ReloadSkin();
CParty.ReloadTextures(); CParty.ReloadSkin();
} }
public static void SaveTheme() public static void SaveTheme()
+2 -2
View File
@@ -94,10 +94,10 @@ namespace Vocaluxe.Base
pm.PartyMode.ReloadTheme(); pm.PartyMode.ReloadTheme();
} }
public static void ReloadTextures() public static void ReloadSkin()
{ {
foreach (SPartyMode pm in _PartyModes.Values) foreach (SPartyMode pm in _PartyModes.Values)
pm.PartyMode.ReloadTextures(); pm.PartyMode.ReloadSkin();
} }
public static void SaveThemes() public static void SaveThemes()
+2 -2
View File
@@ -246,9 +246,9 @@ namespace Vocaluxe.Screens
public override void SaveTheme() {} public override void SaveTheme() {}
public override void UnloadTextures() {} public override void UnloadSkin() {}
public override void ReloadTextures() {} public override void ReloadSkin() {}
public override bool HandleInput(SKeyEvent keyEvent) public override bool HandleInput(SKeyEvent keyEvent)
{ {
+7 -7
View File
@@ -82,7 +82,7 @@ namespace VocaluxeLib.Menu
_Theme = theme; _Theme = theme;
_PartyModeID = partyModeID; _PartyModeID = partyModeID;
LoadTextures(); LoadSkin();
} }
#endregion Constructors #endregion Constructors
@@ -128,7 +128,7 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded) if (_ThemeLoaded)
{ {
_Theme.Name = elementName; _Theme.Name = elementName;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -172,13 +172,13 @@ namespace VocaluxeLib.Menu
_DrawColor(); _DrawColor();
} }
public void UnloadTextures() public void UnloadSkin()
{ {
_SlideShowTextures.Clear(); _SlideShowTextures.Clear();
CBase.Video.Close(ref _VideoStream); CBase.Video.Close(ref _VideoStream);
} }
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
@@ -210,10 +210,10 @@ namespace VocaluxeLib.Menu
_SlideShowTextures.Clear(); _SlideShowTextures.Clear();
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeBackground GetTheme() public SThemeBackground GetTheme()
+10 -10
View File
@@ -129,7 +129,7 @@ namespace VocaluxeLib.Menu
Selected = false; Selected = false;
EditMode = false; EditMode = false;
LoadTextures(); LoadSkin();
} }
public CButton(CButton button) public CButton(CButton button)
@@ -243,7 +243,7 @@ namespace VocaluxeLib.Menu
_Theme.Text = Text.GetTheme(); _Theme.Text = Text.GetTheme();
_Theme.SText = _SelText.GetTheme(); _Theme.SText = _SelText.GetTheme();
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -304,20 +304,20 @@ namespace VocaluxeLib.Menu
Selected = CHelper.IsInBounds(Rect, x, y); Selected = CHelper.IsInBounds(Rect, x, y);
} }
public void UnloadTextures() public void UnloadSkin()
{ {
Text.UnloadTextures(); Text.UnloadSkin();
} }
public void LoadTextures() public void LoadSkin()
{ {
Text = new CText(_Theme.Text, _PartyModeID); Text = new CText(_Theme.Text, _PartyModeID);
Text.LoadTextures(); Text.LoadSkin();
if (_Theme.STextSpecified) if (_Theme.STextSpecified)
{ {
_SelText = new CText(_Theme.SText, _PartyModeID); _SelText = new CText(_Theme.SText, _PartyModeID);
_SelText.LoadTextures(); _SelText.LoadSkin();
} }
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
@@ -343,10 +343,10 @@ namespace VocaluxeLib.Menu
Text.Z = _Theme.Rect.Z; Text.Z = _Theme.Rect.Z;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeButton GetTheme() public SThemeButton GetTheme()
+7 -7
View File
@@ -105,7 +105,7 @@ namespace VocaluxeLib.Menu
Visible = true; Visible = true;
ScreenHandles = false; ScreenHandles = false;
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -169,7 +169,7 @@ namespace VocaluxeLib.Menu
_Theme.Name = elementName; _Theme.Name = elementName;
_Theme.Color.Color = Color; _Theme.Color.Color = Color;
_Theme.MaxColor.Color = MaxColor; _Theme.MaxColor.Color = MaxColor;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -243,9 +243,9 @@ namespace VocaluxeLib.Menu
} }
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
_Theme.MaxColor.Get(_PartyModeID, out MaxColor); _Theme.MaxColor.Get(_PartyModeID, out MaxColor);
@@ -264,10 +264,10 @@ namespace VocaluxeLib.Menu
_Bars[i] = 0f; _Bars[i] = 0f;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeEqualizer GetTheme() public SThemeEqualizer GetTheme()
+7 -7
View File
@@ -127,7 +127,7 @@ namespace VocaluxeLib.Menu
LyricStyle = ELyricStyle.Fill; LyricStyle = ELyricStyle.Fill;
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -166,7 +166,7 @@ namespace VocaluxeLib.Menu
_Theme.Name = elementName; _Theme.Name = elementName;
_Theme.Color.Color = _Color; _Theme.Color.Color = _Color;
_Theme.SColor.Color = _ColorProcessed; _Theme.SColor.Color = _ColorProcessed;
LoadTextures(); LoadSkin();
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty); _Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty);
} }
return _ThemeLoaded; return _ThemeLoaded;
@@ -441,9 +441,9 @@ namespace VocaluxeLib.Menu
} }
#endregion draw #endregion draw
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out _Color); _Theme.Color.Get(_PartyModeID, out _Color);
_Theme.SColor.Get(_PartyModeID, out _ColorProcessed); _Theme.SColor.Get(_PartyModeID, out _ColorProcessed);
@@ -452,10 +452,10 @@ namespace VocaluxeLib.Menu
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty); _Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", _Color, String.Empty);
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeLyrics GetTheme() public SThemeLyrics GetTheme()
+29 -29
View File
@@ -398,88 +398,88 @@ namespace VocaluxeLib.Menu
} }
} }
public virtual void ReloadTextures() public virtual void ReloadSkin()
{ {
foreach (CBackground background in _Backgrounds) foreach (CBackground background in _Backgrounds)
background.ReloadTextures(); background.ReloadSkin();
foreach (CButton button in _Buttons) foreach (CButton button in _Buttons)
button.ReloadTextures(); button.ReloadSkin();
foreach (CText text in _Texts) foreach (CText text in _Texts)
text.ReloadTextures(); text.ReloadSkin();
foreach (CStatic stat in _Statics) foreach (CStatic stat in _Statics)
stat.ReloadTextures(); stat.ReloadSkin();
foreach (CSelectSlide slide in _SelectSlides) foreach (CSelectSlide slide in _SelectSlides)
slide.ReloadTextures(); slide.ReloadSkin();
foreach (CSongMenu sm in _SongMenus) foreach (CSongMenu sm in _SongMenus)
sm.ReloadTextures(); sm.ReloadSkin();
foreach (CLyric lyric in _Lyrics) foreach (CLyric lyric in _Lyrics)
lyric.ReloadTextures(); lyric.ReloadSkin();
foreach (CSingNotes sn in _SingNotes) foreach (CSingNotes sn in _SingNotes)
sn.ReloadTextures(); sn.ReloadSkin();
foreach (CNameSelection ns in _NameSelections) foreach (CNameSelection ns in _NameSelections)
ns.ReloadTextures(); ns.ReloadSkin();
foreach (CEqualizer eq in _Equalizers) foreach (CEqualizer eq in _Equalizers)
eq.ReloadTextures(); eq.ReloadSkin();
foreach (CPlaylist pls in _Playlists) foreach (CPlaylist pls in _Playlists)
pls.ReloadTextures(); pls.ReloadSkin();
foreach (CParticleEffect pe in _ParticleEffects) foreach (CParticleEffect pe in _ParticleEffects)
pe.ReloadTextures(); pe.ReloadSkin();
foreach (CScreenSetting se in _ScreenSettings) foreach (CScreenSetting se in _ScreenSettings)
se.ReloadTextures(); se.ReloadSkin();
} }
public virtual void UnloadTextures() public virtual void UnloadSkin()
{ {
foreach (CBackground background in _Backgrounds) foreach (CBackground background in _Backgrounds)
background.UnloadTextures(); background.UnloadSkin();
foreach (CButton button in _Buttons) foreach (CButton button in _Buttons)
button.UnloadTextures(); button.UnloadSkin();
foreach (CText text in _Texts) foreach (CText text in _Texts)
text.UnloadTextures(); text.UnloadSkin();
foreach (CStatic stat in _Statics) foreach (CStatic stat in _Statics)
stat.UnloadTextures(); stat.UnloadSkin();
foreach (CSelectSlide slide in _SelectSlides) foreach (CSelectSlide slide in _SelectSlides)
slide.UnloadTextures(); slide.UnloadSkin();
foreach (CSongMenu sm in _SongMenus) foreach (CSongMenu sm in _SongMenus)
sm.UnloadTextures(); sm.UnloadSkin();
foreach (CLyric lyric in _Lyrics) foreach (CLyric lyric in _Lyrics)
lyric.UnloadTextures(); lyric.UnloadSkin();
foreach (CSingNotes sn in _SingNotes) foreach (CSingNotes sn in _SingNotes)
sn.UnloadTextures(); sn.UnloadSkin();
foreach (CNameSelection ns in _NameSelections) foreach (CNameSelection ns in _NameSelections)
ns.UnloadTextures(); ns.UnloadSkin();
foreach (CPlaylist pls in _Playlists) foreach (CPlaylist pls in _Playlists)
pls.UnloadTextures(); pls.UnloadSkin();
foreach (CEqualizer eq in _Equalizers) foreach (CEqualizer eq in _Equalizers)
eq.UnloadTextures(); eq.UnloadSkin();
foreach (CParticleEffect pe in _ParticleEffects) foreach (CParticleEffect pe in _ParticleEffects)
pe.UnloadTextures(); pe.UnloadSkin();
foreach (CScreenSetting se in _ScreenSettings) foreach (CScreenSetting se in _ScreenSettings)
se.UnloadTextures(); se.UnloadSkin();
} }
public virtual void ReloadTheme(string xmlPath) public virtual void ReloadTheme(string xmlPath)
@@ -487,7 +487,7 @@ namespace VocaluxeLib.Menu
if (ThemePath == "") if (ThemePath == "")
return; return;
UnloadTextures(); UnloadSkin();
_ClearElements(); _ClearElements();
LoadTheme(xmlPath); LoadTheme(xmlPath);
} }
+7 -7
View File
@@ -134,7 +134,7 @@ namespace VocaluxeLib.Menu
_VisibleProfiles = new List<int>(); _VisibleProfiles = new List<int>();
_UsedProfiles = new List<int>(); _UsedProfiles = new List<int>();
LoadTextures(); LoadSkin();
} }
public void Init() public void Init()
@@ -206,7 +206,7 @@ namespace VocaluxeLib.Menu
_Theme.Name = elementName; _Theme.Name = elementName;
_Theme.Tiles.Name.Color.Color = _ColorNameTile; _Theme.Tiles.Name.Color.Color = _ColorNameTile;
_Theme.ColorEmptyTile.Color = _ColorEmptyTile; _Theme.ColorEmptyTile.Color = _ColorEmptyTile;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -422,9 +422,9 @@ namespace VocaluxeLib.Menu
return new CStatic(_PartyModeID); return new CStatic(_PartyModeID);
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_TextureEmptyTile = CBase.Themes.GetSkinTexture(_Theme.SkinEmptyTile, _PartyModeID); _TextureEmptyTile = CBase.Themes.GetSkinTexture(_Theme.SkinEmptyTile, _PartyModeID);
_TextureTileSelected = CBase.Themes.GetSkinTexture(_Theme.SkinTileSelected, _PartyModeID); _TextureTileSelected = CBase.Themes.GetSkinTexture(_Theme.SkinTileSelected, _PartyModeID);
@@ -435,10 +435,10 @@ namespace VocaluxeLib.Menu
Rect = _Theme.Rect; Rect = _Theme.Rect;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
_PrepareTiles(); _PrepareTiles();
} }
+7 -7
View File
@@ -387,7 +387,7 @@ namespace VocaluxeLib.Menu
_NextSpawnTime = 0f; _NextSpawnTime = 0f;
Visible = true; Visible = true;
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -421,7 +421,7 @@ namespace VocaluxeLib.Menu
{ {
_Theme.Name = elementName; _Theme.Name = elementName;
_Theme.Color.Color = Color; _Theme.Color.Color = Color;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -568,12 +568,12 @@ namespace VocaluxeLib.Menu
} }
} }
public void UnloadTextures() public void UnloadSkin()
{ {
Texture = null; Texture = null;
} }
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
@@ -583,10 +583,10 @@ namespace VocaluxeLib.Menu
Rect = _Theme.Rect; Rect = _Theme.Rect;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeParticleEffect GetTheme() public SThemeParticleEffect GetTheme()
+27 -27
View File
@@ -275,7 +275,7 @@ namespace VocaluxeLib.Menu
Visible = false; Visible = false;
Selected = false; Selected = false;
LoadTextures(); LoadSkin();
} }
public void Init() public void Init()
@@ -354,7 +354,7 @@ namespace VocaluxeLib.Menu
_Theme.ButtonPlaylistSave = ButtonPlaylistSave.GetTheme(); _Theme.ButtonPlaylistSave = ButtonPlaylistSave.GetTheme();
_Theme.ButtonPlaylistDelete = ButtonPlaylistDelete.GetTheme(); _Theme.ButtonPlaylistDelete = ButtonPlaylistDelete.GetTheme();
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -390,51 +390,51 @@ namespace VocaluxeLib.Menu
return CHelper.IsInBounds(CompleteRect, mouseEvent) || _Interactions.IsMouseOver(mouseEvent); return CHelper.IsInBounds(CompleteRect, mouseEvent) || _Interactions.IsMouseOver(mouseEvent);
} }
public void UnloadTextures() public void UnloadSkin()
{ {
Text1.UnloadTextures(); Text1.UnloadSkin();
ButtonPlaylistClose.UnloadTextures(); ButtonPlaylistClose.UnloadSkin();
ButtonPlaylistDelete.UnloadTextures(); ButtonPlaylistDelete.UnloadSkin();
ButtonPlaylistName.UnloadTextures(); ButtonPlaylistName.UnloadSkin();
ButtonPlaylistSave.UnloadTextures(); ButtonPlaylistSave.UnloadSkin();
ButtonPlaylistSing.UnloadTextures(); ButtonPlaylistSing.UnloadSkin();
StaticCover.UnloadTextures(); StaticCover.UnloadSkin();
StaticPlaylistFooter.UnloadTextures(); StaticPlaylistFooter.UnloadSkin();
StaticPlaylistHeader.UnloadTextures(); StaticPlaylistHeader.UnloadSkin();
SelectSlideGameMode.UnloadTextures(); SelectSlideGameMode.UnloadSkin();
} }
public void LoadTextures() public void LoadSkin()
{ {
_Theme.ColorBackground.Get(_PartyModeID, out BackgroundColor); _Theme.ColorBackground.Get(_PartyModeID, out BackgroundColor);
_Theme.SelColorBackground.Get(_PartyModeID, out BackgroundSelColor); _Theme.SelColorBackground.Get(_PartyModeID, out BackgroundSelColor);
Rect = _Theme.Rect; Rect = _Theme.Rect;
Text1.LoadTextures(); Text1.LoadSkin();
ButtonPlaylistClose.LoadTextures(); ButtonPlaylistClose.LoadSkin();
ButtonPlaylistDelete.LoadTextures(); ButtonPlaylistDelete.LoadSkin();
ButtonPlaylistName.LoadTextures(); ButtonPlaylistName.LoadSkin();
ButtonPlaylistSave.LoadTextures(); ButtonPlaylistSave.LoadSkin();
ButtonPlaylistSing.LoadTextures(); ButtonPlaylistSing.LoadSkin();
StaticCover.LoadTextures(); StaticCover.LoadSkin();
StaticPlaylistFooter.LoadTextures(); StaticPlaylistFooter.LoadSkin();
StaticPlaylistHeader.LoadTextures(); StaticPlaylistHeader.LoadSkin();
SelectSlideGameMode.LoadTextures(); SelectSlideGameMode.LoadSkin();
_UpdateRect(); _UpdateRect();
Init(); Init();
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public bool HandleInput(SKeyEvent keyEvent) public bool HandleInput(SKeyEvent keyEvent)
+3 -3
View File
@@ -104,11 +104,11 @@ namespace VocaluxeLib.Menu
return null; return null;
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() {} public void LoadSkin() {}
public void ReloadTextures() {} public void ReloadSkin() {}
public SScreenSetting GetTheme() public SScreenSetting GetTheme()
{ {
+7 -7
View File
@@ -269,7 +269,7 @@ namespace VocaluxeLib.Menu
_ValueNames = new List<string>(); _ValueNames = new List<string>();
_ValuePartyModeIDs = new List<int>(); _ValuePartyModeIDs = new List<int>();
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -396,7 +396,7 @@ namespace VocaluxeLib.Menu
_Theme.SColor.Color = SelColor; _Theme.SColor.Color = SelColor;
_Theme.TextColor.Color = TextColor; _Theme.TextColor.Color = TextColor;
_Theme.TextSColor.Color = SelTextColor; _Theme.TextSColor.Color = SelTextColor;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -691,9 +691,9 @@ namespace VocaluxeLib.Menu
return _Theme; return _Theme;
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
_Theme.SColor.Get(_PartyModeID, out SelColor); _Theme.SColor.Get(_PartyModeID, out SelColor);
@@ -715,10 +715,10 @@ namespace VocaluxeLib.Menu
MaxW = _Theme.TextMaxW; MaxW = _Theme.TextMaxW;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public object Clone() public object Clone()
+7 -7
View File
@@ -114,7 +114,7 @@ namespace VocaluxeLib.Menu
_PartyModeID = partyModeID; _PartyModeID = partyModeID;
_Theme = theme; _Theme = theme;
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -158,7 +158,7 @@ namespace VocaluxeLib.Menu
if (_ThemeLoaded) if (_ThemeLoaded)
{ {
_Theme.Name = elementName; _Theme.Name = elementName;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -191,9 +191,9 @@ namespace VocaluxeLib.Menu
CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect); CBase.Drawing.DrawRect(new SColorF(1f, 1f, 1f, 0.5f), rect);
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
@@ -206,10 +206,10 @@ namespace VocaluxeLib.Menu
} }
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeStatic GetTheme() public SThemeStatic GetTheme()
+7 -7
View File
@@ -318,7 +318,7 @@ namespace VocaluxeLib.Menu
_ButtonText = buttonText; _ButtonText = buttonText;
LoadTextures(); LoadSkin();
} }
public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader) public bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader)
@@ -393,7 +393,7 @@ namespace VocaluxeLib.Menu
_PositionNeedsUpdate = true; _PositionNeedsUpdate = true;
if (_ThemeLoaded) if (_ThemeLoaded)
LoadTextures(); LoadSkin();
return _ThemeLoaded; return _ThemeLoaded;
} }
@@ -453,9 +453,9 @@ namespace VocaluxeLib.Menu
Y -= ry; Y -= ry;
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
_Theme.SColor.Get(_PartyModeID, out SelColor); _Theme.SColor.Get(_PartyModeID, out SelColor);
@@ -480,10 +480,10 @@ namespace VocaluxeLib.Menu
_ThemeLoaded = true; _ThemeLoaded = true;
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeText GetTheme() public SThemeText GetTheme()
+2 -2
View File
@@ -25,8 +25,8 @@ namespace VocaluxeLib.Menu
void LoadTheme(string xmlPath); void LoadTheme(string xmlPath);
void SaveTheme(); void SaveTheme();
void ReloadTextures(); void ReloadSkin();
void UnloadTextures(); void UnloadSkin();
void ReloadTheme(string xmlPath); void ReloadTheme(string xmlPath);
bool HandleInput(SKeyEvent keyEvent); bool HandleInput(SKeyEvent keyEvent);
+3 -3
View File
@@ -25,9 +25,9 @@ namespace VocaluxeLib.Menu
bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader); bool LoadTheme(string xmlPath, string elementName, CXMLReader xmlReader);
void UnloadTextures(); void UnloadSkin();
void LoadTextures(); void LoadSkin();
void ReloadTextures(); void ReloadSkin();
void MoveElement(int stepX, int stepY); void MoveElement(int stepX, int stepY);
void ResizeElement(int stepW, int stepH); void ResizeElement(int stepW, int stepH);
+7 -7
View File
@@ -106,7 +106,7 @@ namespace VocaluxeLib.Menu.SingNotes
BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()]; BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()];
LoadTextures(); LoadSkin();
} }
public string GetThemeName() public string GetThemeName()
@@ -158,7 +158,7 @@ namespace VocaluxeLib.Menu.SingNotes
if (_ThemeLoaded) if (_ThemeLoaded)
{ {
_Theme.Name = elementName; _Theme.Name = elementName;
LoadTextures(); LoadSkin();
} }
return _ThemeLoaded; return _ThemeLoaded;
@@ -411,9 +411,9 @@ namespace VocaluxeLib.Menu.SingNotes
perfnote.Draw(); perfnote.Draw();
} }
public void UnloadTextures() {} public void UnloadSkin() {}
public void LoadTextures() public void LoadSkin()
{ {
foreach (SBarPosition bp in _Theme.BarPos) foreach (SBarPosition bp in _Theme.BarPos)
{ {
@@ -424,10 +424,10 @@ namespace VocaluxeLib.Menu.SingNotes
} }
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public SThemeSingBar GetTheme() public SThemeSingBar GetTheme()
+6 -6
View File
@@ -161,19 +161,19 @@ namespace VocaluxeLib.Menu.SongMenu
return _SongMenu.LoadTheme(xmlPath, elementName, xmlReader); return _SongMenu.LoadTheme(xmlPath, elementName, xmlReader);
} }
public void UnloadTextures() public void UnloadSkin()
{ {
_SongMenu.UnloadTextures(); _SongMenu.UnloadSkin();
} }
public void LoadTextures() public void LoadSkin()
{ {
_SongMenu.LoadTextures(); _SongMenu.LoadSkin();
} }
public void ReloadTextures() public void ReloadSkin()
{ {
_SongMenu.ReloadTextures(); _SongMenu.ReloadSkin();
} }
public void MoveElement(int stepX, int stepY) public void MoveElement(int stepX, int stepY)
@@ -168,7 +168,7 @@ namespace VocaluxeLib.Menu.SongMenu
_PartyModeID = partyModeID; _PartyModeID = partyModeID;
_Theme = theme; _Theme = theme;
LoadTextures(); LoadSkin();
} }
#region Theme #region Theme
@@ -231,7 +231,7 @@ namespace VocaluxeLib.Menu.SongMenu
{ {
_Theme.Name = elementName; _Theme.Name = elementName;
LoadTextures(); LoadSkin();
Init(); Init();
} }
@@ -321,19 +321,19 @@ namespace VocaluxeLib.Menu.SongMenu
_PreviewNr = _SelectionNr; _PreviewNr = _SelectionNr;
} }
public virtual void UnloadTextures() {} public virtual void UnloadSkin() {}
public virtual void LoadTextures() public virtual void LoadSkin()
{ {
Init(); Init();
_Theme.Color.Get(_PartyModeID, out _ColorInternal); _Theme.Color.Get(_PartyModeID, out _ColorInternal);
} }
public void ReloadTextures() public void ReloadSkin()
{ {
UnloadTextures(); UnloadSkin();
LoadTextures(); LoadSkin();
} }
public bool EnterSelectedCategory() public bool EnterSelectedCategory()
@@ -153,7 +153,7 @@ namespace VocaluxeLib.Menu.SongMenu
_Theme.SongMenuTileBoard.StaticTextBG = _TextBG.GetTheme(); _Theme.SongMenuTileBoard.StaticTextBG = _TextBG.GetTheme();
_Theme.SongMenuTileBoard.StaticVideoIcon = _VideoIcon.GetTheme(); _Theme.SongMenuTileBoard.StaticVideoIcon = _VideoIcon.GetTheme();
LoadTextures(); LoadSkin();
Init(); Init();
} }
@@ -610,9 +610,9 @@ namespace VocaluxeLib.Menu.SongMenu
_Offset = offset; _Offset = offset;
} }
public override void LoadTextures() public override void LoadSkin()
{ {
base.LoadTextures(); base.LoadSkin();
_Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID); _Artist = new CText(_Theme.SongMenuTileBoard.TextArtist, _PartyModeID);
_Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID); _Title = new CText(_Theme.SongMenuTileBoard.TextTitle, _PartyModeID);
+4 -9
View File
@@ -25,17 +25,16 @@ namespace VocaluxeLib.PartyModes
{ {
private readonly string _Folder; private readonly string _Folder;
public int ID { get; private set; } public int ID { get; private set; }
protected SScreenSongOptions _ScreenSongOptions = new SScreenSongOptions { Selection = new SSelectionOptions(), Sorting = new SSortingOptions() }; protected SScreenSongOptions _ScreenSongOptions = new SScreenSongOptions {Selection = new SSelectionOptions(), Sorting = new SSortingOptions()};
protected readonly Dictionary<string, CMenuParty> _Screens = new Dictionary<string, CMenuParty>(); protected readonly Dictionary<string, CMenuParty> _Screens = new Dictionary<string, CMenuParty>();
protected CPartyMode(int id,string folder) protected CPartyMode(int id, string folder)
{ {
ID = id; ID = id;
_Folder = folder; _Folder = folder;
} }
#region Implementation #region Implementation
public virtual bool Init() public virtual bool Init()
{ {
return false; return false;
@@ -51,21 +50,17 @@ namespace VocaluxeLib.PartyModes
} }
} }
public void ReloadTextures() public void ReloadSkin()
{ {
foreach (CMenuParty menu in _Screens.Values) foreach (CMenuParty menu in _Screens.Values)
{ menu.ReloadSkin();
menu.ReloadTextures();
}
} }
public void ReloadTheme() public void ReloadTheme()
{ {
string xmlPath = CBase.Themes.GetThemeScreensPath(ID); string xmlPath = CBase.Themes.GetThemeScreensPath(ID);
foreach (CMenuParty menu in _Screens.Values) foreach (CMenuParty menu in _Screens.Values)
{
menu.ReloadTheme(xmlPath); menu.ReloadTheme(xmlPath);
}
} }
public void AddScreen(CMenuParty screen, string screenName) public void AddScreen(CMenuParty screen, string screenName)
+2 -2
View File
@@ -43,11 +43,11 @@ namespace VocaluxeLib.PartyModes
public override void ReloadTheme(string xmlPath) {} public override void ReloadTheme(string xmlPath) {}
public override void ReloadTextures() {} public override void ReloadSkin() {}
public override void SaveTheme() {} public override void SaveTheme() {}
public override void UnloadTextures() {} public override void UnloadSkin() {}
public override bool HandleInput(SKeyEvent keyEvent) public override bool HandleInput(SKeyEvent keyEvent)
{ {
+2 -2
View File
@@ -85,8 +85,8 @@ namespace VocaluxeLib.PartyModes
int ID { get; } int ID { get; }
bool Init(); bool Init();
void LoadTheme(); void LoadTheme();
void ReloadTextures(); void ReloadSkin();
void ReloadTheme(); void ReloadTheme();
void AddScreen(CMenuParty screen, string screenName); void AddScreen(CMenuParty screen, string screenName);