Rename CTheme to CThemes

This commit is contained in:
Flamefire committed 2014-10-05 17:27:45 +02:00
1 parent 355d7b4b5f
commit 9e5011374f
28 files changed
+110 -111

No files matched your search

@@ -382,7 +382,7 @@ namespace VocaluxeLib.PartyModes.Challenge
int id = _GameState.ProfileIDs[_GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]]; int id = _GameState.ProfileIDs[_GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]];
_NextPlayerStatics[i].Texture = CBase.Profiles.GetAvatar(id); _NextPlayerStatics[i].Texture = CBase.Profiles.GetAvatar(id);
_NextPlayerTexts[i].Text = CBase.Profiles.GetPlayerName(id); _NextPlayerTexts[i].Text = CBase.Profiles.GetPlayerName(id);
_NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor(i + 1); _NextPlayerTexts[i].Color = CBase.Themes.GetPlayerColor(i + 1);
} }
} }
else else
@@ -382,7 +382,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
int id = _GameState.ProfileIDs[_GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]]; int id = _GameState.ProfileIDs[_GameState.Combs[_GameState.CurrentRoundNr - 1].Player[i]];
_NextPlayerStatics[i].Texture = CBase.Profiles.GetAvatar(id); _NextPlayerStatics[i].Texture = CBase.Profiles.GetAvatar(id);
_NextPlayerTexts[i].Text = CBase.Profiles.GetPlayerName(id); _NextPlayerTexts[i].Text = CBase.Profiles.GetPlayerName(id);
_NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor(i + 1); _NextPlayerTexts[i].Color = CBase.Themes.GetPlayerColor(i + 1);
} }
} }
else else
@@ -349,7 +349,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_Texts[_TextTeamChoosing].Visible = false; _Texts[_TextTeamChoosing].Visible = false;
if (winner > 0) if (winner > 0)
{ {
_Texts[_TextFinishMessage].Color = CBase.Theme.GetPlayerColor(winner); _Texts[_TextFinishMessage].Color = CBase.Themes.GetPlayerColor(winner);
_Texts[_TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + _Texts[_TextFinishMessage].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " +
winner; winner;
} }
@@ -448,8 +448,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
{ {
_Fields[i].Button.Enabled = false; _Fields[i].Button.Enabled = false;
_Fields[i].Button.Texture = CBase.Songs.GetSongByID(_Fields[i].Content.SongID).CoverTextureBig; _Fields[i].Button.Texture = CBase.Songs.GetSongByID(_Fields[i].Content.SongID).CoverTextureBig;
_Fields[i].Button.Color = CBase.Theme.GetPlayerColor(_Fields[i].Content.Winner); _Fields[i].Button.Color = CBase.Themes.GetPlayerColor(_Fields[i].Content.Winner);
_Fields[i].Button.SelColor = CBase.Theme.GetPlayerColor(_Fields[i].Content.Winner); _Fields[i].Button.SelColor = CBase.Themes.GetPlayerColor(_Fields[i].Content.Winner);
} }
if (_Status == EStatus.FieldSelected && _SelectedField == i) if (_Status == EStatus.FieldSelected && _SelectedField == i)
{ {
@@ -460,7 +460,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
} }
if (_Status == EStatus.JokerRetry && _Fields[i].Content.Finished) if (_Status == EStatus.JokerRetry && _Fields[i].Content.Finished)
{ {
_Fields[i].Button.SelColor = CBase.Theme.GetPlayerColor(_GameData.Team + 1); _Fields[i].Button.SelColor = CBase.Themes.GetPlayerColor(_GameData.Team + 1);
_Fields[i].Button.Enabled = true; _Fields[i].Button.Enabled = true;
} }
if (_Status == EStatus.JokerRetry && !_Fields[i].Content.Finished) if (_Status == EStatus.JokerRetry && !_Fields[i].Content.Finished)
@@ -600,7 +600,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private void _UpdateTeamChoosingMessage() private void _UpdateTeamChoosingMessage()
{ {
_Texts[_TextTeamChoosing].Color = CBase.Theme.GetPlayerColor(_GameData.Team + 1); _Texts[_TextTeamChoosing].Color = CBase.Themes.GetPlayerColor(_GameData.Team + 1);
_Texts[_TextTeamChoosing].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (_GameData.Team + 1) + "! " + _Texts[_TextTeamChoosing].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (_GameData.Team + 1) + "! " +
CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID); CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
if (_Status == EStatus.JokerRetry || _Status == EStatus.FieldChoosing) if (_Status == EStatus.JokerRetry || _Status == EStatus.FieldChoosing)
+4 -4
View File
@@ -86,11 +86,11 @@ namespace Vocaluxe.Base
public void LoadTextures() public void LoadTextures()
{ {
_Cursor = CDraw.CopyTexture(CTheme.GetSkinTexture(CTheme.Cursor.SkinName, -1)); _Cursor = CDraw.CopyTexture(CThemes.GetSkinTexture(CThemes.Cursor.SkinName, -1));
CTheme.Cursor.Color.Get(-1, out _Cursor.Color); CThemes.Cursor.Color.Get(-1, out _Cursor.Color);
_Cursor.Rect.W = CTheme.Cursor.W; _Cursor.Rect.W = CThemes.Cursor.W;
_Cursor.Rect.H = CTheme.Cursor.H; _Cursor.Rect.H = CThemes.Cursor.H;
_Cursor.Rect.Z = CSettings.ZNear; _Cursor.Rect.Z = CSettings.ZNear;
} }
+5 -5
View File
@@ -128,14 +128,14 @@ namespace Vocaluxe.Base
{ {
CLog.StartBenchmark("Load Theme " + Enum.GetNames(typeof(EScreens))[i]); CLog.StartBenchmark("Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
_Screens[i].Init(); _Screens[i].Init();
_Screens[i].LoadTheme(CTheme.GetThemeScreensPath(-1)); _Screens[i].LoadTheme(CThemes.GetThemeScreensPath(-1));
CLog.StopBenchmark("Load Theme " + Enum.GetNames(typeof(EScreens))[i]); CLog.StopBenchmark("Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
} }
foreach (IMenu popup in _PopupScreens) foreach (IMenu popup in _PopupScreens)
{ {
popup.Init(); popup.Init();
popup.LoadTheme(CTheme.GetThemeScreensPath(-1)); popup.LoadTheme(CThemes.GetThemeScreensPath(-1));
} }
} }
@@ -143,10 +143,10 @@ namespace Vocaluxe.Base
{ {
_Cursor.ReloadTextures(); _Cursor.ReloadTextures();
foreach (IMenu screen in _Screens) foreach (IMenu screen in _Screens)
screen.ReloadTheme(CTheme.GetThemeScreensPath(-1)); screen.ReloadTheme(CThemes.GetThemeScreensPath(-1));
foreach (IMenu popup in _PopupScreens) foreach (IMenu popup in _PopupScreens)
popup.ReloadTheme(CTheme.GetThemeScreensPath(-1)); popup.ReloadTheme(CThemes.GetThemeScreensPath(-1));
} }
public static void ReloadSkin() public static void ReloadSkin()
@@ -161,7 +161,7 @@ namespace Vocaluxe.Base
public static void SaveTheme() public static void SaveTheme()
{ {
CTheme.SaveTheme(); CThemes.SaveTheme();
foreach (CMenu screen in _Screens) foreach (CMenu screen in _Screens)
{ {
if (screen.ThemePath == null || screen.ThemeName == "ScreenTest") if (screen.ThemePath == null || screen.ThemeName == "ScreenTest")
+13 -13
View File
@@ -34,7 +34,7 @@ namespace Vocaluxe.Base
{ {
private static readonly IConfig _Config = new CBconfig(); private static readonly IConfig _Config = new CBconfig();
private static readonly ISettings _Settings = new CBsettings(); private static readonly ISettings _Settings = new CBsettings();
private static readonly ITheme _Theme = new CBtheme(); private static readonly IThemes _Themes = new CBtheme();
private static readonly IBackgroundMusic _BackgroundMusic = new CBbackgroundMusic(); private static readonly IBackgroundMusic _BackgroundMusic = new CBbackgroundMusic();
private static readonly IDrawing _Draw = new CBdraw(); private static readonly IDrawing _Draw = new CBdraw();
private static readonly IGraphics _Graphics = new CBGraphics(); private static readonly IGraphics _Graphics = new CBGraphics();
@@ -54,7 +54,7 @@ namespace Vocaluxe.Base
public static void Init() public static void Init()
{ {
CBase.Assign(_Config, _Settings, _Theme, _Log, _BackgroundMusic, _Draw, _Graphics, _Fonts, _Language, CBase.Assign(_Config, _Settings, _Themes, _Log, _BackgroundMusic, _Draw, _Graphics, _Fonts, _Language,
_Game, _Profiles, _Record, _Songs, _Video, _Sound, _Cover, _DataBase, _Controller, _Playlist); _Game, _Profiles, _Record, _Songs, _Video, _Sound, _Cover, _DataBase, _Controller, _Playlist);
} }
} }
@@ -265,56 +265,56 @@ namespace Vocaluxe.Base
} }
} }
class CBtheme : ITheme class CBtheme : IThemes
{ {
public string GetThemeScreensPath(int partyModeID) public string GetThemeScreensPath(int partyModeID)
{ {
return CTheme.GetThemeScreensPath(partyModeID); return CThemes.GetThemeScreensPath(partyModeID);
} }
public int GetSkinIndex(int partyModeID) public int GetSkinIndex(int partyModeID)
{ {
return CTheme.GetSkinIndex(partyModeID); return CThemes.GetSkinIndex(partyModeID);
} }
public CTextureRef GetSkinTexture(string textureName, int partyModeID) public CTextureRef GetSkinTexture(string textureName, int partyModeID)
{ {
return CTheme.GetSkinTexture(textureName, partyModeID); return CThemes.GetSkinTexture(textureName, partyModeID);
} }
public CVideoStream GetSkinVideo(string videoName, int partyModeID, bool loop) public CVideoStream GetSkinVideo(string videoName, int partyModeID, bool loop)
{ {
return CTheme.GetSkinVideo(videoName, partyModeID, loop); return CThemes.GetSkinVideo(videoName, partyModeID, loop);
} }
public bool GetColor(string colorName, int partyModeID, out SColorF color) public bool GetColor(string colorName, int partyModeID, out SColorF color)
{ {
return CTheme.GetColor(colorName, partyModeID, out color); return CThemes.GetColor(colorName, partyModeID, out color);
} }
public SColorF GetPlayerColor(int playerNr) public SColorF GetPlayerColor(int playerNr)
{ {
return CTheme.GetPlayerColor(playerNr); return CThemes.GetPlayerColor(playerNr);
} }
public void UnloadSkins() public void UnloadSkins()
{ {
CTheme.UnloadSkins(); CThemes.UnloadSkins();
} }
public void ListSkins() public void ListSkins()
{ {
CTheme.ListSkins(); CThemes.ListSkins();
} }
public void LoadSkins() public void LoadSkins()
{ {
CTheme.LoadSkins(); CThemes.LoadSkins();
} }
public void LoadTheme() public void LoadTheme()
{ {
CTheme.LoadTheme(); CThemes.LoadTheme();
} }
} }
+6 -6
View File
@@ -311,17 +311,17 @@ namespace Vocaluxe.Base
pm.PartyMode.Initialize(); pm.PartyMode.Initialize();
pm.PartyMode.SetFolder(pathToPm); pm.PartyMode.SetFolder(pathToPm);
if (!CTheme.AddTheme(Path.Combine(pathToPm, "Theme.xml"), pm.PartyModeID)) if (!CThemes.AddTheme(Path.Combine(pathToPm, "Theme.xml"), pm.PartyModeID))
return pm; return pm;
int themeIndex = CTheme.GetThemeIndex(pm.PartyModeID); int themeIndex = CThemes.GetThemeIndex(pm.PartyModeID);
CTheme.ListSkins(themeIndex); CThemes.ListSkins(themeIndex);
int skinIndex = CTheme.GetSkinIndex(pm.PartyModeID); int skinIndex = CThemes.GetSkinIndex(pm.PartyModeID);
if (!CTheme.LoadSkin(skinIndex)) if (!CThemes.LoadSkin(skinIndex))
return pm; return pm;
if (!CTheme.LoadTheme(themeIndex)) if (!CThemes.LoadTheme(themeIndex))
return pm; return pm;
foreach (string screenfile in pm.ScreenFiles) foreach (string screenfile in pm.ScreenFiles)
@@ -21,7 +21,6 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Xml; using System.Xml;
using Vocaluxe.Base.Fonts; using Vocaluxe.Base.Fonts;
using Vocaluxe.Lib.Video;
using VocaluxeLib; using VocaluxeLib;
using VocaluxeLib.Draw; using VocaluxeLib.Draw;
using VocaluxeLib.Xml; using VocaluxeLib.Xml;
@@ -54,7 +53,7 @@ namespace Vocaluxe.Base
} }
#endregion Structs #endregion Structs
static class CTheme static class CThemes
{ {
// Version number for main theme and skin files. Increment it, if you've changed something on the theme files! // Version number for main theme and skin files. Increment it, if you've changed something on the theme files!
private const int _ThemeSystemVersion = 5; private const int _ThemeSystemVersion = 5;
+1 -1
View File
@@ -24,7 +24,7 @@ namespace Vocaluxe.Base
public void Load(string videoName) public void Load(string videoName)
{ {
_VideoStream = CTheme.GetSkinVideo(videoName, -1, false); _VideoStream = CThemes.GetSkinVideo(videoName, -1, false);
_Loaded = true; _Loaded = true;
CVideo.Pause(_VideoStream); CVideo.Pause(_VideoStream);
} }
+2 -2
View File
@@ -183,7 +183,7 @@ namespace Vocaluxe
// Theme System // Theme System
CLog.StartBenchmark("Init Theme"); CLog.StartBenchmark("Init Theme");
if (!CTheme.Init()) if (!CThemes.Init())
throw new CLoadingException("theme"); throw new CLoadingException("theme");
CLog.StopBenchmark("Init Theme"); CLog.StopBenchmark("Init Theme");
@@ -264,7 +264,7 @@ namespace Vocaluxe
CController.Close(); CController.Close();
CVocaluxeServer.Close(); CVocaluxeServer.Close();
CGraphics.Close(); CGraphics.Close();
CTheme.Close(); CThemes.Close();
CCover.Close(); CCover.Close();
CFonts.Close(); CFonts.Close();
CBackgroundMusic.Close(); CBackgroundMusic.Close();
+2 -2
View File
@@ -397,8 +397,8 @@ namespace Vocaluxe.Screens
private void _SetPlayerColors() private void _SetPlayerColors()
{ {
_Texts[_TextChannel1].Color = CTheme.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel1].Selection); _Texts[_TextChannel1].Color = CThemes.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel1].Selection);
_Texts[_TextChannel2].Color = CTheme.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel2].Selection); _Texts[_TextChannel2].Color = CThemes.GetPlayerColor(_SelectSlides[_SelectSlideRecordChannel2].Selection);
} }
private void _SetMicConfig() private void _SetMicConfig()
+21 -21
View File
@@ -68,11 +68,11 @@ namespace Vocaluxe.Screens
{ {
base.LoadTheme(xmlPath); base.LoadTheme(xmlPath);
_SelectSlides[_SelectSlideTheme].AddValues(CTheme.ThemeNames); _SelectSlides[_SelectSlideTheme].AddValues(CThemes.ThemeNames);
_SelectSlides[_SelectSlideTheme].Selection = CTheme.GetThemeIndex(-1); _SelectSlides[_SelectSlideTheme].Selection = CThemes.GetThemeIndex(-1);
_SelectSlides[_SelectSlideSkin].AddValues(CTheme.SkinNames); _SelectSlides[_SelectSlideSkin].AddValues(CThemes.SkinNames);
_SelectSlides[_SelectSlideSkin].Selection = CTheme.GetSkinIndex(-1); _SelectSlides[_SelectSlideSkin].Selection = CThemes.GetSkinIndex(-1);
_SelectSlides[_SelectSlideCover].AddValues(CCover.CoverThemes); _SelectSlides[_SelectSlideCover].AddValues(CCover.CoverThemes);
_SelectSlides[_SelectSlideCover].Selection = CCover.GetCoverThemeIndex(); _SelectSlides[_SelectSlideCover].Selection = CCover.GetCoverThemeIndex();
@@ -141,8 +141,8 @@ namespace Vocaluxe.Screens
base.OnShow(); base.OnShow();
_OldCoverTheme = CCover.GetCoverThemeIndex(); _OldCoverTheme = CCover.GetCoverThemeIndex();
_OldTheme = CTheme.GetThemeIndex(-1); _OldTheme = CThemes.GetThemeIndex(-1);
_OldSkin = CTheme.GetSkinIndex(-1); _OldSkin = CThemes.GetSkinIndex(-1);
} }
public override bool UpdateGame() public override bool UpdateGame()
@@ -164,8 +164,8 @@ namespace Vocaluxe.Screens
private void _SaveConfig() private void _SaveConfig()
{ {
CConfig.Theme = CTheme.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection]; CConfig.Theme = CThemes.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection];
CConfig.Skin = CTheme.SkinNames[_SelectSlides[_SelectSlideSkin].Selection]; CConfig.Skin = CThemes.SkinNames[_SelectSlides[_SelectSlideSkin].Selection];
CConfig.CoverTheme = CCover.CoverThemes[_SelectSlides[_SelectSlideCover].Selection]; CConfig.CoverTheme = CCover.CoverThemes[_SelectSlides[_SelectSlideCover].Selection];
CConfig.DrawNoteLines = (EOffOn)_SelectSlides[_SelectSlideNoteLines].Selection; CConfig.DrawNoteLines = (EOffOn)_SelectSlides[_SelectSlideNoteLines].Selection;
CConfig.DrawToneHelper = (EOffOn)_SelectSlides[_SelectSlideToneHelper].Selection; CConfig.DrawToneHelper = (EOffOn)_SelectSlides[_SelectSlideToneHelper].Selection;
@@ -180,19 +180,19 @@ namespace Vocaluxe.Screens
if (_OldTheme != _SelectSlides[_SelectSlideTheme].Selection) if (_OldTheme != _SelectSlides[_SelectSlideTheme].Selection)
{ {
CConfig.Theme = CTheme.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection]; CConfig.Theme = CThemes.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection];
_OldTheme = _SelectSlides[_SelectSlideTheme].Selection; _OldTheme = _SelectSlides[_SelectSlideTheme].Selection;
CTheme.UnloadSkins(); CThemes.UnloadSkins();
CFonts.UnloadThemeFonts(CConfig.Theme); CFonts.UnloadThemeFonts(CConfig.Theme);
CTheme.ListSkins(); CThemes.ListSkins();
CConfig.Skin = CTheme.SkinNames[0]; CConfig.Skin = CThemes.SkinNames[0];
_OldSkin = 0; _OldSkin = 0;
CConfig.SaveConfig(); CConfig.SaveConfig();
CTheme.LoadSkins(); CThemes.LoadSkins();
CTheme.LoadTheme(); CThemes.LoadTheme();
CGraphics.ReloadTheme(); CGraphics.ReloadTheme();
} }
} }
@@ -201,19 +201,19 @@ namespace Vocaluxe.Screens
{ {
if (_OldTheme != _SelectSlides[_SelectSlideTheme].Selection) if (_OldTheme != _SelectSlides[_SelectSlideTheme].Selection)
{ {
CConfig.Theme = CTheme.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection]; CConfig.Theme = CThemes.ThemeNames[_SelectSlides[_SelectSlideTheme].Selection];
_OldTheme = _SelectSlides[_SelectSlideTheme].Selection; _OldTheme = _SelectSlides[_SelectSlideTheme].Selection;
CTheme.UnloadSkins(); CThemes.UnloadSkins();
CFonts.UnloadThemeFonts(CConfig.Theme); CFonts.UnloadThemeFonts(CConfig.Theme);
CTheme.ListSkins(); CThemes.ListSkins();
CConfig.Skin = CTheme.SkinNames[0]; CConfig.Skin = CThemes.SkinNames[0];
_OldSkin = 0; _OldSkin = 0;
CConfig.SaveConfig(); CConfig.SaveConfig();
CTheme.LoadSkins(); CThemes.LoadSkins();
CTheme.LoadTheme(); CThemes.LoadTheme();
CGraphics.ReloadTheme(); CGraphics.ReloadTheme();
OnShow(); OnShow();
@@ -226,7 +226,7 @@ namespace Vocaluxe.Screens
_OldSkin = _SelectSlides[_SelectSlideSkin].Selection; _OldSkin = _SelectSlides[_SelectSlideSkin].Selection;
_PauseBG(); _PauseBG();
CConfig.Skin = CTheme.SkinNames[_OldSkin]; CConfig.Skin = CThemes.SkinNames[_OldSkin];
CGraphics.ReloadSkin(); CGraphics.ReloadSkin();
_ResumeBG(); _ResumeBG();
} }
+1 -1
View File
@@ -668,7 +668,7 @@ namespace Vocaluxe.Screens
for (int p = 0; p < CGame.NumPlayer; p++) for (int p = 0; p < CGame.NumPlayer; p++)
{ {
_NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1], CTheme.GetPlayerColor(p + 1), p); _NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1], CThemes.GetPlayerColor(p + 1), p);
if (_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1].Y + _SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1].H >= CSettings.RenderH / 2) if (_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1].Y + _SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1].H >= CSettings.RenderH / 2)
_DynamicLyricsBottom = true; _DynamicLyricsBottom = true;
else else
+1 -1
View File
@@ -263,7 +263,7 @@
<Compile Include="Base\CUtility.cs" /> <Compile Include="Base\CUtility.cs" />
<Compile Include="Base\CSettings.cs" /> <Compile Include="Base\CSettings.cs" />
<Compile Include="Base\CSongs.cs" /> <Compile Include="Base\CSongs.cs" />
<Compile Include="Base\CTheme.cs" /> <Compile Include="Base\CThemes.cs" />
<Compile Include="Base\CVideo.cs" /> <Compile Include="Base\CVideo.cs" />
<Compile Include="Base\CWebcam.cs" /> <Compile Include="Base\CWebcam.cs" />
<Compile Include="Base\Fonts\CFonts.cs" /> <Compile Include="Base\Fonts\CFonts.cs" />
+3 -3
View File
@@ -21,7 +21,7 @@ namespace VocaluxeLib
{ {
public static IConfig Config; public static IConfig Config;
public static ISettings Settings; public static ISettings Settings;
public static ITheme Theme; public static IThemes Themes;
public static ILog Log; public static ILog Log;
public static IBackgroundMusic BackgroundMusic; public static IBackgroundMusic BackgroundMusic;
public static IDrawing Drawing; public static IDrawing Drawing;
@@ -39,13 +39,13 @@ namespace VocaluxeLib
public static IControllers Controller; public static IControllers Controller;
public static IPlaylist Playlist; public static IPlaylist Playlist;
public static void Assign(IConfig config, ISettings settings, ITheme theme, ILog log, IBackgroundMusic backgroundMusic, public static void Assign(IConfig config, ISettings settings, IThemes themes, ILog log, IBackgroundMusic backgroundMusic,
IDrawing draw, IGraphics graphics, IFonts fonts, ILanguage language, IGame game, IProfiles profiles, IRecording record, IDrawing draw, IGraphics graphics, IFonts fonts, ILanguage language, IGame game, IProfiles profiles, IRecording record,
ISongs songs, IVideo video, ISound sound, ICover cover, IDataBase dataBase, IControllers controller, IPlaylist playlist) ISongs songs, IVideo video, ISound sound, ICover cover, IDataBase dataBase, IControllers controller, IPlaylist playlist)
{ {
Config = config; Config = config;
Settings = settings; Settings = settings;
Theme = theme; Themes = themes;
Log = log; Log = log;
BackgroundMusic = backgroundMusic; BackgroundMusic = backgroundMusic;
Drawing = draw; Drawing = draw;
+1 -1
View File
@@ -98,7 +98,7 @@ namespace VocaluxeLib
float GetSoundPlayerFadeTime(); float GetSoundPlayerFadeTime();
} }
public interface ITheme public interface IThemes
{ {
string GetThemeScreensPath(int partyModeID); string GetThemeScreensPath(int partyModeID);
int GetSkinIndex(int partyModeID); int GetSkinIndex(int partyModeID);
+3 -3
View File
@@ -183,10 +183,10 @@ namespace VocaluxeLib.Menu
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
foreach (string s in _Theme.SlideShowTextures) foreach (string s in _Theme.SlideShowTextures)
_SlideShowTextures.Add(CBase.Theme.GetSkinTexture(s, _PartyModeID)); _SlideShowTextures.Add(CBase.Themes.GetSkinTexture(s, _PartyModeID));
if (_Theme.Type == EBackgroundTypes.Video) if (_Theme.Type == EBackgroundTypes.Video)
_VideoStream = CBase.Theme.GetSkinVideo(_Theme.VideoName, _PartyModeID, true); _VideoStream = CBase.Themes.GetSkinVideo(_Theme.VideoName, _PartyModeID, true);
} }
public void AddSlideShowTexture(string image) public void AddSlideShowTexture(string image)
@@ -237,7 +237,7 @@ namespace VocaluxeLib.Menu
private bool _DrawTexture() private bool _DrawTexture()
{ {
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID);
if (texture != null) if (texture != null)
{ {
CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop); CBase.Drawing.DrawTexture(texture, _GetDrawRect(), EAspect.Crop);
+3 -3
View File
@@ -258,7 +258,7 @@ namespace VocaluxeLib.Menu
if (!Selected && !Pressed || !_Enabled) if (!Selected && !Pressed || !_Enabled)
{ {
texture = Texture ?? CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, Color); CBase.Drawing.DrawTexture(texture, Rect, Color);
@@ -272,7 +272,7 @@ namespace VocaluxeLib.Menu
} }
else if (!_Theme.STextSpecified) else if (!_Theme.STextSpecified)
{ {
texture = Texture ?? CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); texture = Texture ?? CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, SelColor); CBase.Drawing.DrawTexture(texture, Rect, SelColor);
@@ -286,7 +286,7 @@ namespace VocaluxeLib.Menu
} }
else if (_Theme.STextSpecified) else if (_Theme.STextSpecified)
{ {
texture = SelTexture ?? CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); texture = SelTexture ?? CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
CBase.Drawing.DrawTexture(texture, Rect, SelColor); CBase.Drawing.DrawTexture(texture, Rect, SelColor);
+6 -6
View File
@@ -196,7 +196,7 @@ namespace VocaluxeLib.Menu
ThemePath = xmlPath; ThemePath = xmlPath;
string file = Path.Combine(xmlPath, ThemeName + ".xml"); string file = Path.Combine(xmlPath, ThemeName + ".xml");
int skinIndex = CBase.Theme.GetSkinIndex(_PartyModeID); int skinIndex = CBase.Themes.GetSkinIndex(_PartyModeID);
Theme.ScreenInformation = new SScreenInformation(); Theme.ScreenInformation = new SScreenInformation();
Theme.Backgrounds = new List<SThemeBackground>(); Theme.Backgrounds = new List<SThemeBackground>();
@@ -278,7 +278,7 @@ namespace VocaluxeLib.Menu
bool versionCheck = _CheckVersion(_ScreenVersion, xmlReader); bool versionCheck = _CheckVersion(_ScreenVersion, xmlReader);
int skinIndex = CBase.Theme.GetSkinIndex(_PartyModeID); int skinIndex = CBase.Themes.GetSkinIndex(_PartyModeID);
if (versionCheck && skinIndex != -1) if (versionCheck && skinIndex != -1)
{ {
@@ -1946,10 +1946,10 @@ namespace VocaluxeLib.Menu
private void _ReloadThemeEditMode() private void _ReloadThemeEditMode()
{ {
CBase.Theme.UnloadSkins(); CBase.Themes.UnloadSkins();
CBase.Theme.ListSkins(); CBase.Themes.ListSkins();
CBase.Theme.LoadSkins(); CBase.Themes.LoadSkins();
CBase.Theme.LoadTheme(); CBase.Themes.LoadTheme();
CBase.Graphics.ReloadTheme(); CBase.Graphics.ReloadTheme();
OnShow(); OnShow();
+4 -4
View File
@@ -337,7 +337,7 @@ namespace VocaluxeLib.Menu
if (active && Selection != -1) if (active && Selection != -1)
{ {
_Player = player; _Player = player;
_PlayerSelector.Color = CBase.Theme.GetPlayerColor(player); _PlayerSelector.Color = CBase.Themes.GetPlayerColor(player);
} }
//Normal activation //Normal activation
else if (active) else if (active)
@@ -345,7 +345,7 @@ namespace VocaluxeLib.Menu
Selection = 0; Selection = 0;
_ActualSelection = 0; _ActualSelection = 0;
_Player = player; _Player = player;
_PlayerSelector.Color = CBase.Theme.GetPlayerColor(player); _PlayerSelector.Color = CBase.Themes.GetPlayerColor(player);
_PlayerSelector.Visible = true; _PlayerSelector.Visible = true;
} }
//Deactivate //Deactivate
@@ -429,8 +429,8 @@ namespace VocaluxeLib.Menu
public void LoadTextures() public void LoadTextures()
{ {
_TextureEmptyTile = CBase.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID); _TextureEmptyTile = CBase.Themes.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
_TextureTileSelected = CBase.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID); _TextureTileSelected = CBase.Themes.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
_Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile); _Theme.ColorEmptyTile.Get(_PartyModeID, out _ColorEmptyTile);
_Theme.Tiles.Name.Color.Get(_PartyModeID, out _ColorNameTile); _Theme.Tiles.Name.Color.Get(_PartyModeID, out _ColorNameTile);
+2 -2
View File
@@ -296,7 +296,7 @@ namespace VocaluxeLib.Menu
// ReSharper disable ConvertIfStatementToConditionalTernaryExpression // ReSharper disable ConvertIfStatementToConditionalTernaryExpression
if (!String.IsNullOrEmpty(_TextureName)) if (!String.IsNullOrEmpty(_TextureName))
// ReSharper restore ConvertIfStatementToConditionalTernaryExpression // ReSharper restore ConvertIfStatementToConditionalTernaryExpression
CBase.Drawing.DrawTexture(CBase.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha)); CBase.Drawing.DrawTexture(CBase.Themes.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
else else
CBase.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha)); CBase.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
} }
@@ -580,7 +580,7 @@ namespace VocaluxeLib.Menu
_Theme.Color.Get(_PartyModeID, out Color); _Theme.Color.Get(_PartyModeID, out Color);
if (!String.IsNullOrEmpty(_Theme.TextureName)) if (!String.IsNullOrEmpty(_Theme.TextureName))
Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); Texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID);
Rect = _Theme.Rect; Rect = _Theme.Rect;
} }
+3 -3
View File
@@ -371,12 +371,12 @@ namespace VocaluxeLib.Menu
{ {
if (i == CurrentPlaylistElement && _Selected) if (i == CurrentPlaylistElement && _Selected)
{ {
_PlaylistElements[i].Background.Texture = CBase.Theme.GetSkinTexture(_Theme.SelTextureBackgroundName, _PartyModeID); _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.SelTextureBackgroundName, _PartyModeID);
_PlaylistElements[i].Background.Color = BackgroundSelColor; _PlaylistElements[i].Background.Color = BackgroundSelColor;
} }
else else
{ {
_PlaylistElements[i].Background.Texture = CBase.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID); _PlaylistElements[i].Background.Texture = CBase.Themes.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
_PlaylistElements[i].Background.Color = BackgroundColor; _PlaylistElements[i].Background.Color = BackgroundColor;
} }
} }
@@ -909,7 +909,7 @@ namespace VocaluxeLib.Menu
_ChangeOrderElement.SelectSlide.RectArrowRight.Z = CBase.Settings.GetZNear(); _ChangeOrderElement.SelectSlide.RectArrowRight.Z = CBase.Settings.GetZNear();
_ChangeOrderElement.Text1.Z = CBase.Settings.GetZNear(); _ChangeOrderElement.Text1.Z = CBase.Settings.GetZNear();
_ChangeOrderElement.Background.Texture = CBase.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID); _ChangeOrderElement.Background.Texture = CBase.Themes.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
_ChangeOrderElement.Background.Color = BackgroundColor; _ChangeOrderElement.Background.Color = BackgroundColor;
_OldMousePosX = mouseEvent.X; _OldMousePosX = mouseEvent.X;
+2 -2
View File
@@ -131,13 +131,13 @@ namespace VocaluxeLib.Menu
private CTextureRef _GetTextureValue(string value) private CTextureRef _GetTextureValue(string value)
{ {
return CBase.Theme.GetSkinTexture(value, _PartyModeID); return CBase.Themes.GetSkinTexture(value, _PartyModeID);
} }
private SColorF _GetColorValue(string value) private SColorF _GetColorValue(string value)
{ {
SColorF color; SColorF color;
CBase.Theme.GetColor(value, _PartyModeID, out color); CBase.Themes.GetColor(value, _PartyModeID, out color);
return color; return color;
} }
#endregion Private #endregion Private
+7 -7
View File
@@ -598,15 +598,15 @@ namespace VocaluxeLib.Menu
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme) if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
return; return;
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); CTextureRef texture = CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID);
CTextureRef textureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID); CTextureRef textureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
CTextureRef textureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID); CTextureRef textureArrowRight = CBase.Themes.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
CTextureRef selTexture = CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID); CTextureRef selTexture = CBase.Themes.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
CTextureRef selTextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID); CTextureRef selTextureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID);
CTextureRef selTextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID); CTextureRef selTextureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID);
CTextureRef highlightTexture = CBase.Theme.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID); CTextureRef highlightTexture = CBase.Themes.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID);
if (Selected) if (Selected)
{ {
+1 -1
View File
@@ -53,7 +53,7 @@ namespace VocaluxeLib.Menu
private CTextureRef _Texture; private CTextureRef _Texture;
public CTextureRef Texture public CTextureRef Texture
{ {
get { return _Texture ?? CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); } get { return _Texture ?? CBase.Themes.GetSkinTexture(_Theme.TextureName, _PartyModeID); }
set { _Texture = value; } set { _Texture = value; }
} }
+8 -8
View File
@@ -455,9 +455,9 @@ namespace VocaluxeLib.Menu.SingNotes
var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z); var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z);
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID); CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
CTextureRef noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID); CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
CTextureRef noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID); CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
//Width of each of the ends (round parts) //Width of each of the ends (round parts)
//Need 2 of them so use minimum //Need 2 of them so use minimum
@@ -502,9 +502,9 @@ namespace VocaluxeLib.Menu.SingNotes
rect.Z rect.Z
); );
CTextureRef noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID); CTextureRef noteBackgroundBegin = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
CTextureRef noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID); CTextureRef noteBackgroundMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
CTextureRef noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID); CTextureRef noteBackgroundEnd = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
float dx = r.H * noteBackgroundBegin.OrigAspect; float dx = r.H * noteBackgroundBegin.OrigAspect;
if (2 * dx > r.W) if (2 * dx > r.W)
@@ -598,7 +598,7 @@ namespace VocaluxeLib.Menu.SingNotes
rect.Z rect.Z
); );
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID); CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
float dx = r.H * noteBegin.OrigAspect; float dx = r.H * noteBegin.OrigAspect;
if (2 * dx > r.W) if (2 * dx > r.W)
dx = r.W / 2; dx = r.W / 2;
@@ -655,7 +655,7 @@ namespace VocaluxeLib.Menu.SingNotes
_PlayerNotes[n].Color.B, _PlayerNotes[n].Color.B,
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha); _PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
CTextureRef toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID); CTextureRef toneHelper = CBase.Themes.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
CBase.Drawing.DrawTexture(toneHelper, drawRect, color); CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
@@ -187,8 +187,8 @@ namespace VocaluxeLib.Menu.SongMenu
_TileW = (int)((Rect.W - _Theme.SongMenuTileBoard.SpaceW * (_NumW - 1)) / _NumW); _TileW = (int)((Rect.W - _Theme.SongMenuTileBoard.SpaceW * (_NumW - 1)) / _NumW);
_TileH = (int)((Rect.H - _Theme.SongMenuTileBoard.SpaceH * (_NumH - 1)) / _NumH); _TileH = (int)((Rect.H - _Theme.SongMenuTileBoard.SpaceH * (_NumH - 1)) / _NumH);
_CoverBGTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID); _CoverBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
_CoverBigBGTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID); _CoverBigBGTexture = CBase.Themes.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
_Tiles = new List<CStatic>(); _Tiles = new List<CStatic>();
for (int i = 0; i < _NumH; i++) for (int i = 0; i < _NumH; i++)
+1 -1
View File
@@ -128,7 +128,7 @@ namespace VocaluxeLib
color = Color; color = Color;
return true; return true;
} }
return CBase.Theme.GetColor(Name, partyModeId, out color); return CBase.Themes.GetColor(Name, partyModeId, out color);
} }
} }