some code reorganization
This commit is contained in:
1 parent
a29f4fb0d6
commit
521033ed97
41 files changed
+836
-842
No files matched your search
@@ -175,12 +175,12 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
_Stage = EStage.NotStarted;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
|
||||
if (_Base.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
if (CBase.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||
|
||||
ToScreenMain.ResultTable = new List<ResultTableRow>();
|
||||
@@ -204,11 +204,11 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.NumRounds = data.ScreenConfig.NumRounds;
|
||||
|
||||
_Stage = EStage.Config;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -224,11 +224,11 @@ namespace Vocaluxe.PartyModes
|
||||
_Stage = EStage.Names;
|
||||
}
|
||||
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -243,18 +243,18 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
|
||||
|
||||
if (_Stage == EStage.Singing)
|
||||
StartNextRound();
|
||||
if (_Stage == EStage.Config)
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
break;
|
||||
|
||||
default:
|
||||
_Base.Log.LogError("Error in party mode challenge. Wrong screen is sending: " + ScreenName);
|
||||
CBase.Log.LogError("Error in party mode challenge. Wrong screen is sending: " + ScreenName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ namespace Vocaluxe.PartyModes
|
||||
public override void UpdateGame()
|
||||
{
|
||||
/*
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
else
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;*/
|
||||
@@ -298,7 +298,7 @@ namespace Vocaluxe.PartyModes
|
||||
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
|
||||
if (_Screens != null)
|
||||
{
|
||||
_Base.Songs.ResetPartySongSung();
|
||||
CBase.Songs.ResetPartySongSung();
|
||||
ToScreenMain.ResultTable = new List<ResultTableRow>();
|
||||
GameData.ResultTable = new List<ResultTableRow>();
|
||||
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
||||
@@ -346,9 +346,9 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public override ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
@@ -365,8 +365,8 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (GameData.CatSongIndices != null)
|
||||
{
|
||||
if (GameData.CatSongIndices[_Base.Songs.GetCurrentCategoryIndex()] == -1)
|
||||
GameData.CatSongIndices[_Base.Songs.GetCurrentCategoryIndex()] = SongIndex;
|
||||
if (GameData.CatSongIndices[CBase.Songs.GetCurrentCategoryIndex()] == -1)
|
||||
GameData.CatSongIndices[CBase.Songs.GetCurrentCategoryIndex()] = SongIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,19 +444,19 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
_Base.Game.Reset();
|
||||
_Base.Game.ClearSongs();
|
||||
_Base.Game.AddSong(SongID, gm);
|
||||
_Base.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
CBase.Game.AddSong(SongID, gm);
|
||||
CBase.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
|
||||
|
||||
SPlayer[] player = _Base.Game.GetPlayer();
|
||||
SPlayer[] player = CBase.Game.GetPlayer();
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
if (player.Length < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
|
||||
|
||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||
@@ -478,14 +478,14 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
_Base.Songs.AddPartySongSung(SongID);
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
CBase.Songs.AddPartySongSung(SongID);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
GameData.CurrentRoundNr++;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
|
||||
private void StartNextRound()
|
||||
@@ -495,7 +495,7 @@ namespace Vocaluxe.PartyModes
|
||||
SetNumJokers();
|
||||
SetTeamNames();
|
||||
GameData.CatSongIndices = null;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSong);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSong);
|
||||
}
|
||||
|
||||
private void SetNumJokers()
|
||||
@@ -533,7 +533,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void SetTeamNames()
|
||||
{
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
if (profiles == null)
|
||||
{
|
||||
@@ -591,7 +591,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
SPlayer[] results = _Base.Game.GetPlayer();
|
||||
SPlayer[] results = CBase.Game.GetPlayer();
|
||||
if (results == null)
|
||||
return;
|
||||
|
||||
@@ -704,16 +704,16 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void CreateCatSongIndices()
|
||||
{
|
||||
if (GameData.CatSongIndices == null && _Base.Songs.GetNumCategories() > 0 && _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_ON)
|
||||
if (GameData.CatSongIndices == null && CBase.Songs.GetNumCategories() > 0 && _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
GameData.CatSongIndices = new int[_Base.Songs.GetNumCategories()];
|
||||
GameData.CatSongIndices = new int[CBase.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < GameData.CatSongIndices.Length; i++)
|
||||
{
|
||||
GameData.CatSongIndices[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
GameData.CatSongIndices = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
_MaxNumMics = CBase.Base.Config.GetMaxNumMics();
|
||||
_MaxNumMics = CBase.Config.GetMaxNumMics();
|
||||
if (_MaxNumMics > 6)
|
||||
_MaxNumMics = 6;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -331,7 +331,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateNextPlayerPositions()
|
||||
{
|
||||
float x = CBase.Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float static_y = 590;
|
||||
float text_y = 550;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
@@ -359,13 +359,13 @@ namespace Vocaluxe.PartyModes
|
||||
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
int pid = GameState.Combs[GameState.CurrentRoundNr - 1].Player[i];
|
||||
NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
|
||||
NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
|
||||
NextPlayerTexts[i].Color = CBase.Base.Theme.GetPlayerColor((i + 1));
|
||||
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor((i + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -432,7 +432,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
|
||||
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
||||
|
||||
@@ -455,8 +455,8 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
||||
{
|
||||
//Player
|
||||
float _x = x + 15 + (CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
RoundsTable[round].TextPlayer[column].X = _x;
|
||||
RoundsTable[round].TextPlayer[column].Y = y;
|
||||
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
||||
@@ -475,7 +475,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateRoundsTable()
|
||||
{
|
||||
SProfile[] profile = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profile = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < RoundsTable.Count; i++)
|
||||
{
|
||||
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
|
||||
@@ -569,7 +569,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdatePlayerTable()
|
||||
{
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < PlayerTable.Count; i++)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Vocaluxe.PartyModes
|
||||
private string GetPlayerWinString()
|
||||
{
|
||||
string s = "";
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < GameState.ResultTable.Count; i++)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -175,7 +175,7 @@ namespace Vocaluxe.PartyModes
|
||||
chooseAvatarStatic.Rect = PlayerChooseButtons[i].Button.Rect;
|
||||
chooseAvatarStatic.Rect.Z = -100;
|
||||
chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
|
||||
chooseAvatarStatic.Texture = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ namespace Vocaluxe.PartyModes
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].STexture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
}
|
||||
@@ -368,9 +368,9 @@ namespace Vocaluxe.PartyModes
|
||||
if ((i + Offset * NumButtonPlayerChoose) < PlayerChooseButtonsVisibleProfiles.Count)
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose];
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerChooseButtons[i].Button.SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerChooseButtons[i].Button.Enabled = true;
|
||||
@@ -392,11 +392,11 @@ namespace Vocaluxe.PartyModes
|
||||
private void UpdateVisibleProfiles()
|
||||
{
|
||||
PlayerChooseButtonsVisibleProfiles.Clear();
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (CBase.Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
visible = true;
|
||||
|
||||
@@ -440,9 +440,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[i].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[i].Texture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Texture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -483,9 +483,9 @@ namespace Vocaluxe.PartyModes
|
||||
//Update texture and name
|
||||
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -177,19 +177,19 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
_Stage = EStage.NotStarted;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
|
||||
if (_Base.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
if (CBase.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||
|
||||
ToScreenMain.ResultTable = new List<ResultTableRow>();
|
||||
GameData.ResultTable = new List<ResultTableRow>();
|
||||
|
||||
_Base.Songs.SortSongs(ESongSorting.TR_CONFIG_NONE, EOffOn.TR_CONFIG_OFF, EOffOn.TR_CONFIG_OFF, String.Empty, false);
|
||||
_Base.Songs.SetCategory(0);
|
||||
CBase.Songs.SortSongs(ESongSorting.TR_CONFIG_NONE, EOffOn.TR_CONFIG_OFF, EOffOn.TR_CONFIG_OFF, String.Empty, false);
|
||||
CBase.Songs.SetCategory(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -209,11 +209,11 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.NumRounds = data.ScreenConfig.NumRounds;
|
||||
|
||||
_Stage = EStage.Config;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -229,11 +229,11 @@ namespace Vocaluxe.PartyModes
|
||||
_Stage = EStage.Names;
|
||||
}
|
||||
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -248,18 +248,18 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode challenge. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
|
||||
|
||||
if (_Stage == EStage.Singing)
|
||||
StartNextRound();
|
||||
if (_Stage == EStage.Config)
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
break;
|
||||
|
||||
default:
|
||||
_Base.Log.LogError("Error in party mode challenge. Wrong screen is sending: " + ScreenName);
|
||||
CBase.Log.LogError("Error in party mode challenge. Wrong screen is sending: " + ScreenName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -267,7 +267,7 @@ namespace Vocaluxe.PartyModes
|
||||
public override void UpdateGame()
|
||||
{
|
||||
/*
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
else
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;*/
|
||||
@@ -303,7 +303,7 @@ namespace Vocaluxe.PartyModes
|
||||
_Screens.TryGetValue("PartyScreenChallengeMain", out Screen);
|
||||
if (_Screens != null)
|
||||
{
|
||||
_Base.Songs.ResetPartySongSung();
|
||||
CBase.Songs.ResetPartySongSung();
|
||||
ToScreenMain.ResultTable = new List<ResultTableRow>();
|
||||
GameData.ResultTable = new List<ResultTableRow>();
|
||||
GameData.Rounds = new ChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
||||
@@ -351,9 +351,9 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public override ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
@@ -370,8 +370,8 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (GameData.CatSongIndices != null)
|
||||
{
|
||||
if (GameData.CatSongIndices[_Base.Songs.GetCurrentCategoryIndex()] == -1)
|
||||
GameData.CatSongIndices[_Base.Songs.GetCurrentCategoryIndex()] = SongIndex;
|
||||
if (GameData.CatSongIndices[CBase.Songs.GetCurrentCategoryIndex()] == -1)
|
||||
GameData.CatSongIndices[CBase.Songs.GetCurrentCategoryIndex()] = SongIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ namespace Vocaluxe.PartyModes
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
GameData.CurrentRoundNr++;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
|
||||
private void StartNextRound()
|
||||
@@ -463,24 +463,24 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.CatSongIndices = null;
|
||||
|
||||
if (RandomizeSongs())
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
private bool RandomizeSongs()
|
||||
{
|
||||
_Base.Game.Reset();
|
||||
_Base.Game.ClearSongs();
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
|
||||
#region PlayerNames
|
||||
_Base.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
|
||||
SPlayer[] player = _Base.Game.GetPlayer();
|
||||
CBase.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
|
||||
SPlayer[] player = CBase.Game.GetPlayer();
|
||||
if (player == null)
|
||||
return false;
|
||||
|
||||
if (player.Length < GameData.NumPlayerAtOnce)
|
||||
return false;
|
||||
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Combination c = GameData.Rounds.GetRound(GameData.CurrentRoundNr - 1);
|
||||
|
||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||
@@ -504,17 +504,17 @@ namespace Vocaluxe.PartyModes
|
||||
#endregion PlayerNames
|
||||
|
||||
#region SongQueque
|
||||
if (_Base.Songs.GetNumVisibleSongs() < NumSongs)
|
||||
_Base.Songs.ResetPartySongSung();
|
||||
if (CBase.Songs.GetNumVisibleSongs() < NumSongs)
|
||||
CBase.Songs.ResetPartySongSung();
|
||||
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_MEDLEY;
|
||||
List<int> IDs = new List<int>();
|
||||
|
||||
CSong[] VisSongs = _Base.Songs.GetSongsNotSung();
|
||||
CSong[] VisSongs = CBase.Songs.GetSongsNotSung();
|
||||
if (VisSongs == null)
|
||||
{
|
||||
_Base.Log.LogError("PartyChallengeMedleyMode Error: There are no songs!");
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenParty);
|
||||
CBase.Log.LogError("PartyChallengeMedleyMode Error: There are no songs!");
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenParty);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -530,17 +530,17 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (IDs.Count == 0)
|
||||
{
|
||||
_Base.Log.LogError("PartyChallengeMedleyMode Error: There are no medley songs!");
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenParty);
|
||||
CBase.Log.LogError("PartyChallengeMedleyMode Error: There are no medley songs!");
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenParty);
|
||||
return false;
|
||||
}
|
||||
|
||||
int s = 0;
|
||||
while (s < NumSongs && IDs.Count > 0)
|
||||
{
|
||||
int SongID = IDs[_Base.Game.GetRandom(IDs.Count)];
|
||||
_Base.Game.AddSong(SongID, gm);
|
||||
_Base.Songs.AddPartySongSung(SongID);
|
||||
int SongID = IDs[CBase.Game.GetRandom(IDs.Count)];
|
||||
CBase.Game.AddSong(SongID, gm);
|
||||
CBase.Songs.AddPartySongSung(SongID);
|
||||
IDs.Remove(SongID);
|
||||
s++;
|
||||
}
|
||||
@@ -583,7 +583,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void SetTeamNames()
|
||||
{
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
if (profiles == null)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
CPoints GamePoints = _Base.Game.GetPoints();
|
||||
CPoints GamePoints = CBase.Game.GetPoints();
|
||||
if (GamePoints == null || GamePoints.NumPlayer < GameData.NumPlayerAtOnce)
|
||||
return;
|
||||
|
||||
@@ -771,16 +771,16 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void CreateCatSongIndices()
|
||||
{
|
||||
if (GameData.CatSongIndices == null && _Base.Songs.GetNumCategories() > 0 && _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_ON)
|
||||
if (GameData.CatSongIndices == null && CBase.Songs.GetNumCategories() > 0 && _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
GameData.CatSongIndices = new int[_Base.Songs.GetNumCategories()];
|
||||
GameData.CatSongIndices = new int[CBase.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < GameData.CatSongIndices.Length; i++)
|
||||
{
|
||||
GameData.CatSongIndices[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Songs.GetNumCategories() == 0 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
GameData.CatSongIndices = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -133,7 +133,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
_MaxNumMics = CBase.Base.Config.GetMaxNumMics();
|
||||
_MaxNumMics = CBase.Config.GetMaxNumMics();
|
||||
if (_MaxNumMics > 6)
|
||||
_MaxNumMics = 6;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -331,7 +331,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateNextPlayerPositions()
|
||||
{
|
||||
float x = CBase.Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float static_y = 590;
|
||||
float text_y = 550;
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
@@ -359,13 +359,13 @@ namespace Vocaluxe.PartyModes
|
||||
if (GameState.CurrentRoundNr <= GameState.Combs.Count)
|
||||
{
|
||||
Texts[htTexts(TextNextPlayerMessage)].Visible = true;
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < GameState.NumPlayerAtOnce; i++)
|
||||
{
|
||||
int pid = GameState.Combs[GameState.CurrentRoundNr - 1].Player[i];
|
||||
NextPlayerStatics[i].Texture = profiles[GameState.ProfileIDs[pid]].Avatar.Texture;
|
||||
NextPlayerTexts[i].Text = profiles[GameState.ProfileIDs[pid]].PlayerName;
|
||||
NextPlayerTexts[i].Color = CBase.Base.Theme.GetPlayerColor((i + 1));
|
||||
NextPlayerTexts[i].Color = CBase.Theme.GetPlayerColor((i + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -432,7 +432,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
|
||||
float delta = Texts[htTexts(TextRoundNumber)].Height;
|
||||
|
||||
@@ -455,8 +455,8 @@ namespace Vocaluxe.PartyModes
|
||||
for (int column = row * NumPlayerInOneRow; column < num; column++)
|
||||
{
|
||||
//Player
|
||||
float _x = x + 15 + (CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
float _x = x + 15 + (CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((CBase.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
RoundsTable[round].TextPlayer[column].X = _x;
|
||||
RoundsTable[round].TextPlayer[column].Y = y;
|
||||
RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
||||
@@ -475,7 +475,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateRoundsTable()
|
||||
{
|
||||
SProfile[] profile = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profile = CBase.Profiles.GetProfiles();
|
||||
for (int i = 0; i < RoundsTable.Count; i++)
|
||||
{
|
||||
for(int p = 0; p < RoundsTable[i].TextPlayer.Count; p++)
|
||||
@@ -569,7 +569,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdatePlayerTable()
|
||||
{
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < PlayerTable.Count; i++)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Vocaluxe.PartyModes
|
||||
private string GetPlayerWinString()
|
||||
{
|
||||
string s = "";
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < GameState.ResultTable.Count; i++)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -175,7 +175,7 @@ namespace Vocaluxe.PartyModes
|
||||
chooseAvatarStatic.Rect = PlayerChooseButtons[i].Button.Rect;
|
||||
chooseAvatarStatic.Rect.Z = -100;
|
||||
chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
|
||||
chooseAvatarStatic.Texture = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ namespace Vocaluxe.PartyModes
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].STexture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
}
|
||||
@@ -368,9 +368,9 @@ namespace Vocaluxe.PartyModes
|
||||
if ((i + Offset * NumButtonPlayerChoose) < PlayerChooseButtonsVisibleProfiles.Count)
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose];
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerChooseButtons[i].Button.SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerChooseButtons[i].Button.Enabled = true;
|
||||
@@ -392,11 +392,11 @@ namespace Vocaluxe.PartyModes
|
||||
private void UpdateVisibleProfiles()
|
||||
{
|
||||
PlayerChooseButtonsVisibleProfiles.Clear();
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (CBase.Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
visible = true;
|
||||
|
||||
@@ -440,9 +440,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[i].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[i].Texture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Texture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -483,9 +483,9 @@ namespace Vocaluxe.PartyModes
|
||||
//Update texture and name
|
||||
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -200,12 +200,12 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
_Stage = EStage.NotStarted;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
_ScreenSongOptions.Selection.SongIndex = -1;
|
||||
|
||||
if (_Base.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
if (CBase.Config.GetTabs() == EOffOn.TR_CONFIG_ON && _ScreenSongOptions.Sorting.SongSorting != ESongSorting.TR_CONFIG_NONE)
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_ON;
|
||||
|
||||
ToScreenMain.Rounds = new List<Round>();
|
||||
@@ -238,11 +238,11 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.GameMode = data.ScreenConfig.GameMode;
|
||||
|
||||
_Stage = EStage.Config;
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace Vocaluxe.PartyModes
|
||||
_Stage = EStage.NotStarted;
|
||||
else
|
||||
{
|
||||
if (_Base.Game.GetRandom(100) < 50)
|
||||
if (CBase.Game.GetRandom(100) < 50)
|
||||
GameData.Team = 0;
|
||||
else
|
||||
GameData.Team = 1;
|
||||
@@ -263,11 +263,11 @@ namespace Vocaluxe.PartyModes
|
||||
_Stage = EStage.Names;
|
||||
}
|
||||
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -291,18 +291,18 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
CBase.Log.LogError("Error in party mode TicTacToe. Can't cast received data from screen " + ScreenName + ". " + e.Message);
|
||||
}
|
||||
|
||||
|
||||
if (_Stage == EStage.Singing)
|
||||
StartRound(data.ScreenMain.SingRoundNr);
|
||||
if (_Stage == EStage.Config)
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
break;
|
||||
|
||||
default:
|
||||
_Base.Log.LogError("Error in party mode TicTacToe. Wrong screen is sending: " + ScreenName);
|
||||
CBase.Log.LogError("Error in party mode TicTacToe. Wrong screen is sending: " + ScreenName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -310,7 +310,7 @@ namespace Vocaluxe.PartyModes
|
||||
public override void UpdateGame()
|
||||
{
|
||||
/*
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1 || _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
else
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;*/
|
||||
@@ -356,7 +356,7 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Team = 0;
|
||||
else
|
||||
GameData.Team = 1;
|
||||
_Base.Songs.ResetPartySongSung();
|
||||
CBase.Songs.ResetPartySongSung();
|
||||
GameData.CurrentRoundNr = 1;
|
||||
ToScreenMain.CurrentRoundNr = 1;
|
||||
ToScreenMain.NumPlayerTeam1 = GameData.NumPlayerTeam1;
|
||||
@@ -426,9 +426,9 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public override ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
@@ -496,16 +496,16 @@ namespace Vocaluxe.PartyModes
|
||||
gm = EGameMode.TR_GAMEMODE_SHORTSONG;
|
||||
break;
|
||||
}
|
||||
_Base.Game.AddSong(SongID, gm);
|
||||
CBase.Game.AddSong(SongID, gm);
|
||||
|
||||
_Base.Songs.AddPartySongSung(SongID);
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
CBase.Songs.AddPartySongSung(SongID);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSing);
|
||||
}
|
||||
|
||||
public override void LeavingHighscore()
|
||||
{
|
||||
UpdateScores();
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenPartyDummy);
|
||||
}
|
||||
|
||||
private void CreateRounds()
|
||||
@@ -541,7 +541,7 @@ namespace Vocaluxe.PartyModes
|
||||
IDs2.Add(i);
|
||||
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs1.Count - 1) * 10);
|
||||
random = CBase.Game.GetRandom((IDs1.Count - 1) * 10);
|
||||
num = (int)Math.Round((double)random / 10);
|
||||
if (num >= IDs1.Count)
|
||||
num = IDs1.Count - 1;
|
||||
@@ -550,7 +550,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs2.Count - 1) * 20);
|
||||
random = CBase.Game.GetRandom((IDs2.Count - 1) * 20);
|
||||
num = (int)Math.Round((double)random / 20);
|
||||
if (num >= IDs2.Count)
|
||||
num = IDs2.Count - 1;
|
||||
@@ -573,7 +573,7 @@ namespace Vocaluxe.PartyModes
|
||||
IDs.Add(i);
|
||||
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs.Count - 1) * 10);
|
||||
random = CBase.Game.GetRandom((IDs.Count - 1) * 10);
|
||||
num = (int)Math.Round((double)random / 10);
|
||||
if (num >= IDs.Count)
|
||||
num = IDs.Count - 1;
|
||||
@@ -596,7 +596,7 @@ namespace Vocaluxe.PartyModes
|
||||
IDs.Add(i);
|
||||
if (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs.Count - 1) * 20);
|
||||
random = CBase.Game.GetRandom((IDs.Count - 1) * 20);
|
||||
num = (int)Math.Round((double)random / 20);
|
||||
if (num >= IDs.Count)
|
||||
num = IDs.Count - 1;
|
||||
@@ -631,38 +631,38 @@ namespace Vocaluxe.PartyModes
|
||||
switch (GameData.SongSource)
|
||||
{
|
||||
case ESongSource.TR_PLAYLIST:
|
||||
for (int i = 0; i < _Base.Playlist.GetPlaylistSongCount(GameData.PlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(GameData.PlaylistID); i++)
|
||||
{
|
||||
int id = _Base.Playlist.GetPlaylistSong(GameData.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in _Base.Songs.GetSongByID(id).AvailableGameModes)
|
||||
int id = CBase.Playlist.GetPlaylistSong(GameData.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in CBase.Songs.GetSongByID(id).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
Songs.Add(id);
|
||||
}
|
||||
break;
|
||||
|
||||
case ESongSource.TR_ALLSONGS:
|
||||
for (int i = 0; i < _Base.Songs.GetNumSongs(); i++)
|
||||
for (int i = 0; i < CBase.Songs.GetNumSongs(); i++)
|
||||
{
|
||||
foreach (EGameMode mode in _Base.Songs.GetSongByID(i).AvailableGameModes)
|
||||
foreach (EGameMode mode in CBase.Songs.GetSongByID(i).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
Songs.Add(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case ESongSource.TR_CATEGORY:
|
||||
_Base.Songs.SetCategory(GameData.CategoryID);
|
||||
for (int i = 0; i < _Base.Songs.NumSongsInCategory(GameData.CategoryID); i++)
|
||||
CBase.Songs.SetCategory(GameData.CategoryID);
|
||||
for (int i = 0; i < CBase.Songs.NumSongsInCategory(GameData.CategoryID); i++)
|
||||
{
|
||||
foreach(EGameMode mode in _Base.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
foreach(EGameMode mode in CBase.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
if(mode == gm)
|
||||
Songs.Add(_Base.Songs.GetVisibleSong(i).ID);
|
||||
Songs.Add(CBase.Songs.GetVisibleSong(i).ID);
|
||||
}
|
||||
_Base.Songs.SetCategory(-1);
|
||||
CBase.Songs.SetCategory(-1);
|
||||
break;
|
||||
}
|
||||
while(Songs.Count > 0)
|
||||
{
|
||||
GameData.Songs.Add(Songs[_Base.Game.GetRandom(Songs.Count - 1)]);
|
||||
GameData.Songs.Add(Songs[CBase.Game.GetRandom(Songs.Count - 1)]);
|
||||
Songs.Remove(GameData.Songs[GameData.Songs.Count - 1]);
|
||||
}
|
||||
}
|
||||
@@ -684,21 +684,21 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void StartRound(int RoundNr)
|
||||
{
|
||||
_Base.Game.Reset();
|
||||
_Base.Game.ClearSongs();
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
|
||||
_Base.Game.SetNumPlayer(2);
|
||||
CBase.Game.SetNumPlayer(2);
|
||||
|
||||
SPlayer[] player = _Base.Game.GetPlayer();
|
||||
SPlayer[] player = CBase.Game.GetPlayer();
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
if (player.Length < 2)
|
||||
return;
|
||||
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Round r = GameData.Rounds[RoundNr];
|
||||
bool isDuet = _Base.Songs.GetSongByID(r.SongID).IsDuet;
|
||||
bool isDuet = CBase.Songs.GetSongByID(r.SongID).IsDuet;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
@@ -765,7 +765,7 @@ namespace Vocaluxe.PartyModes
|
||||
if (!GameData.Rounds[GameData.SingRoundNr].Finished)
|
||||
GameData.CurrentRoundNr++;
|
||||
|
||||
SPlayer[] results = _Base.Game.GetPlayer();
|
||||
SPlayer[] results = CBase.Game.GetPlayer();
|
||||
if (results == null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen TicTacToe config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Log.LogError("Error in party mode screen TicTacToe config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -143,7 +143,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
base.OnShow();
|
||||
|
||||
if (CBase.Base.Config.GetMaxNumMics() >= 2)
|
||||
if (CBase.Config.GetMaxNumMics() >= 2)
|
||||
ConfigOk = true;
|
||||
|
||||
FillSlides();
|
||||
@@ -198,25 +198,25 @@ namespace Vocaluxe.PartyModes
|
||||
SelectSlides[htSelectSlides(SelectSlideSongSource)].Clear();
|
||||
SelectSlides[htSelectSlides(SelectSlideSongSource)].SetValues<ESongSource>((int)Data.ScreenConfig.SongSource);
|
||||
|
||||
string[] _Playlists = CBase.Base.Playlist.GetPlaylistNames();
|
||||
string[] _Playlists = CBase.Playlist.GetPlaylistNames();
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Clear();
|
||||
for (int i = 0; i < _Playlists.Length; i++)
|
||||
{
|
||||
string value = _Playlists[i] + " (" + CBase.Base.Playlist.GetPlaylistSongCount(i) + " " + CBase.Base.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
string value = _Playlists[i] + " (" + CBase.Playlist.GetPlaylistSongCount(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].AddValue(value);
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Selection = Data.ScreenConfig.PlaylistID;
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Visible = Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST;
|
||||
|
||||
string[] _Categories = new string[CBase.Base.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < CBase.Base.Songs.GetNumCategories(); i++ )
|
||||
string[] _Categories = new string[CBase.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < CBase.Songs.GetNumCategories(); i++ )
|
||||
{
|
||||
_Categories[i] = CBase.Base.Songs.GetCategory(i).Name;
|
||||
_Categories[i] = CBase.Songs.GetCategory(i).Name;
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Clear();
|
||||
for (int i = 0; i < _Categories.Length; i++)
|
||||
{
|
||||
string value = _Categories[i] + " (" + CBase.Base.Songs.NumSongsInCategory(i) + " " + CBase.Base.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
string value = _Categories[i] + " (" + CBase.Songs.NumSongsInCategory(i) + " " + CBase.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].AddValue(value);
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Selection = Data.ScreenConfig.CategoryID;
|
||||
@@ -262,14 +262,14 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
if (Data.ScreenConfig.SongSource == ESongSource.TR_PLAYLIST)
|
||||
{
|
||||
if (CBase.Base.Playlist.GetNumPlaylists() > 0)
|
||||
if (CBase.Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID) > 0)
|
||||
if (CBase.Playlist.GetNumPlaylists() > 0)
|
||||
if (CBase.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID) > 0)
|
||||
{
|
||||
ConfigOk = false;
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID); i++)
|
||||
{
|
||||
int id = CBase.Base.Playlist.GetPlaylistSong(Data.ScreenConfig.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetSongByID(id).AvailableGameModes)
|
||||
int id = CBase.Playlist.GetPlaylistSong(Data.ScreenConfig.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in CBase.Songs.GetSongByID(id).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
@@ -286,14 +286,14 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumCategories() > 0)
|
||||
if (CBase.Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID) > 0)
|
||||
if (CBase.Songs.GetNumCategories() > 0)
|
||||
if (CBase.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID) > 0)
|
||||
{
|
||||
CBase.Base.Songs.SetCategory(Data.ScreenConfig.CategoryID);
|
||||
CBase.Songs.SetCategory(Data.ScreenConfig.CategoryID);
|
||||
ConfigOk = false;
|
||||
for (int i = 0; i < CBase.Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID); i++)
|
||||
for (int i = 0; i < CBase.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID); i++)
|
||||
{
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
foreach (EGameMode mode in CBase.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
@@ -302,7 +302,7 @@ namespace Vocaluxe.PartyModes
|
||||
if (ConfigOk)
|
||||
break;
|
||||
}
|
||||
CBase.Base.Songs.SetCategory(-1);
|
||||
CBase.Songs.SetCategory(-1);
|
||||
}
|
||||
else
|
||||
ConfigOk = false;
|
||||
@@ -311,11 +311,11 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (Data.ScreenConfig.SongSource == ESongSource.TR_ALLSONGS)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumSongs() > 0)
|
||||
if (CBase.Songs.GetNumSongs() > 0)
|
||||
{
|
||||
for (int i = 0; i < CBase.Base.Songs.GetNumSongs(); i++)
|
||||
for (int i = 0; i < CBase.Songs.GetNumSongs(); i++)
|
||||
{
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetSongByID(i).AvailableGameModes)
|
||||
foreach (EGameMode mode in CBase.Songs.GetSongByID(i).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen TicTacToe main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen TicTacToe main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -335,13 +335,13 @@ namespace Vocaluxe.PartyModes
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = false;
|
||||
if (Winner > 0)
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = CBase.Base.Theme.GetPlayerColor(Winner);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Base.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Base.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
|
||||
Texts[htTexts(TextFinishMessage)].Color = CBase.Theme.GetPlayerColor(Winner);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
|
||||
}
|
||||
else
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = new SColorF(1, 1, 1, 1);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Base.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
}
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
|
||||
}
|
||||
@@ -363,8 +363,8 @@ namespace Vocaluxe.PartyModes
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
CBase.Base.BackgroundMusic.SetStatus(false);
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.BackgroundMusic.SetStatus(false);
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
}
|
||||
|
||||
private void CreateFields()
|
||||
@@ -383,14 +383,14 @@ namespace Vocaluxe.PartyModes
|
||||
private void UpdateFields()
|
||||
{
|
||||
int NumOneRow = (int)Math.Sqrt((double)GameData.NumFields);
|
||||
float FieldSizeY = (CBase.Base.Settings.GetRenderH() - 150 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeX = (CBase.Base.Settings.GetRenderW() - 300 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeY = (CBase.Settings.GetRenderH() - 150 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeX = (CBase.Settings.GetRenderW() - 300 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
if (FieldSizeX < FieldSizeY)
|
||||
FieldSize = FieldSizeX;
|
||||
else
|
||||
FieldSize = FieldSizeY;
|
||||
FieldFirstX = CBase.Base.Settings.GetRenderW() / 2 - (NumOneRow * FieldSize + (NumOneRow - 1) * FieldSpace) / 2;
|
||||
FieldFirstY = 140 + (CBase.Base.Settings.GetRenderH() - 140) / 2 - (NumOneRow * FieldSize + NumOneRow * FieldSpace) / 2;
|
||||
FieldFirstX = CBase.Settings.GetRenderW() / 2 - (NumOneRow * FieldSize + (NumOneRow - 1) * FieldSpace) / 2;
|
||||
FieldFirstY = 140 + (CBase.Settings.GetRenderH() - 140) / 2 - (NumOneRow * FieldSize + NumOneRow * FieldSpace) / 2;
|
||||
int row = 0;
|
||||
int column = 0;
|
||||
float x = FieldFirstX;
|
||||
@@ -436,20 +436,20 @@ namespace Vocaluxe.PartyModes
|
||||
if (Fields[i].Content.Finished)
|
||||
{
|
||||
Fields[i].Button.Enabled = false;
|
||||
Fields[i].Button.Texture = CBase.Base.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Color = CBase.Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
Fields[i].Button.SColor = CBase.Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
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.SColor = CBase.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
}
|
||||
if (Status == EStatus.FieldSelected && SelectedField == i)
|
||||
{
|
||||
Fields[i].Button.Texture = CBase.Base.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Texture = CBase.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Color = new SColorF(1, 1, 1, 1);
|
||||
Fields[i].Button.SColor = new SColorF(1, 1, 1, 1);
|
||||
Fields[i].Button.Enabled = false;
|
||||
}
|
||||
if (Status == EStatus.JokerRetry && Fields[i].Content.Finished)
|
||||
{
|
||||
Fields[i].Button.SColor = CBase.Base.Theme.GetPlayerColor(GameData.Team+1);
|
||||
Fields[i].Button.SColor = CBase.Theme.GetPlayerColor(GameData.Team+1);
|
||||
Fields[i].Button.Enabled = true;
|
||||
}
|
||||
if (Status == EStatus.JokerRetry && !Fields[i].Content.Finished)
|
||||
@@ -484,15 +484,15 @@ namespace Vocaluxe.PartyModes
|
||||
SingerTeam2 = GameData.PlayerTeam2[0];
|
||||
GameData.PlayerTeam2.RemoveAt(0);
|
||||
}
|
||||
Menu.SongMenu.CSong Song = CBase.Base.Songs.GetSongByID(SongID);
|
||||
Menu.SongMenu.CSong Song = CBase.Songs.GetSongByID(SongID);
|
||||
|
||||
CBase.Base.BackgroundMusic.SetStatus(true);
|
||||
CBase.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = CBase.Base.Sound.Load(Song.GetMP3(), false);
|
||||
CBase.Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
CBase.Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
CBase.Base.Sound.Play(PreviewStream);
|
||||
CBase.Base.Sound.Fade(PreviewStream, CBase.Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
PreviewStream = CBase.Sound.Load(Song.GetMP3(), false);
|
||||
CBase.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
CBase.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
CBase.Sound.Play(PreviewStream);
|
||||
CBase.Sound.Fade(PreviewStream, CBase.Config.GetBackgroundMusicVolume(), 1f);
|
||||
Status = EStatus.FieldSelected;
|
||||
Fields[SelectedField].Content.SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SongID = SongID;
|
||||
@@ -504,7 +504,7 @@ namespace Vocaluxe.PartyModes
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[htStatics(StaticAvatarT1)].Visible = true;
|
||||
@@ -524,14 +524,14 @@ namespace Vocaluxe.PartyModes
|
||||
private void FieldSelectedAgain()
|
||||
{
|
||||
int SongID = Fields[SelectedField].Content.SongID;
|
||||
Menu.SongMenu.CSong Song = CBase.Base.Songs.GetSongByID(SongID);
|
||||
CBase.Base.BackgroundMusic.SetStatus(true);
|
||||
Menu.SongMenu.CSong Song = CBase.Songs.GetSongByID(SongID);
|
||||
CBase.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = CBase.Base.Sound.Load(Song.GetMP3(), false);
|
||||
CBase.Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
CBase.Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
CBase.Base.Sound.Play(PreviewStream);
|
||||
CBase.Base.Sound.Fade(PreviewStream, CBase.Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
PreviewStream = CBase.Sound.Load(Song.GetMP3(), false);
|
||||
CBase.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
CBase.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
CBase.Sound.Play(PreviewStream);
|
||||
CBase.Sound.Fade(PreviewStream, CBase.Config.GetBackgroundMusicVolume(), 1f);
|
||||
Status = EStatus.FieldSelected;
|
||||
Fields[SelectedField].Content.SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SongID = SongID;
|
||||
@@ -543,7 +543,7 @@ namespace Vocaluxe.PartyModes
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Visible = true;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Visible = true;
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Profiles.GetProfiles();
|
||||
Texts[htTexts(TextNextPlayerNameT1)].Text = profiles[GameData.ProfileIDsTeam1[GameData.Rounds[SelectedField].SingerTeam1]].PlayerName;
|
||||
Texts[htTexts(TextNextPlayerNameT2)].Text = profiles[GameData.ProfileIDsTeam2[GameData.Rounds[SelectedField].SingerTeam2]].PlayerName;
|
||||
Statics[htStatics(StaticAvatarT1)].Visible = true;
|
||||
@@ -569,8 +569,8 @@ namespace Vocaluxe.PartyModes
|
||||
if (GameData.NumJokerRandom[TeamNr] > 0)
|
||||
{
|
||||
GameData.NumJokerRandom[TeamNr]--;
|
||||
if (!CBase.Base.Sound.IsFinished(PreviewStream))
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
if (!CBase.Sound.IsFinished(PreviewStream))
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
FieldSelected();
|
||||
}
|
||||
break;
|
||||
@@ -581,8 +581,8 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
GameData.NumJokerRetry[TeamNr]--;
|
||||
GameData.Team = TeamNr;
|
||||
if (!CBase.Base.Sound.IsFinished(PreviewStream))
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
if (!CBase.Sound.IsFinished(PreviewStream))
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
Status = EStatus.JokerRetry;
|
||||
OldSelectedField = SelectedField;
|
||||
SelectedField = -1;
|
||||
@@ -595,8 +595,8 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void UpdateTeamChoosingMessage()
|
||||
{
|
||||
Texts[htTexts(TextTeamChoosing)].Color = CBase.Base.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[htTexts(TextTeamChoosing)].Text = CBase.Base.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + CBase.Base.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
Texts[htTexts(TextTeamChoosing)].Color = CBase.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[htTexts(TextTeamChoosing)].Text = CBase.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + CBase.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
if (Status == EStatus.JokerRetry || Status == EStatus.FieldChoosing)
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = true;
|
||||
else
|
||||
@@ -621,7 +621,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void NextRound()
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
Data.ScreenMain.Rounds = GameData.Rounds;
|
||||
Data.ScreenMain.FadeToNameSelection = false;
|
||||
Data.ScreenMain.FadeToSinging = true;
|
||||
@@ -634,7 +634,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void EndParty()
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void Back()
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
Data.ScreenMain.FadeToNameSelection = true;
|
||||
Data.ScreenMain.FadeToSinging = false;
|
||||
Data.ScreenMain.SingRoundNr = SelectedField;
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error in party mode screen TicTacToe names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Log.LogError("Error in party mode screen TicTacToe names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -193,7 +193,7 @@ namespace Vocaluxe.PartyModes
|
||||
chooseAvatarStatic.Rect = PlayerChooseButtons[i].Button.Rect;
|
||||
chooseAvatarStatic.Rect.Z = -100;
|
||||
chooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
|
||||
chooseAvatarStatic.Texture = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ namespace Vocaluxe.PartyModes
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].STexture = chooseAvatarStatic.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
@@ -431,9 +431,9 @@ namespace Vocaluxe.PartyModes
|
||||
if ((i + Offset * NumButtonPlayerChoose) < PlayerChooseButtonsVisibleProfiles.Count)
|
||||
{
|
||||
PlayerChooseButtons[i].ProfileID = PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose];
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerChooseButtons[i].Button.SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerChooseButtons[i].Button.Enabled = true;
|
||||
@@ -455,11 +455,11 @@ namespace Vocaluxe.PartyModes
|
||||
private void UpdateVisibleProfiles()
|
||||
{
|
||||
PlayerChooseButtonsVisibleProfiles.Clear();
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (CBase.Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
visible = true;
|
||||
|
||||
@@ -526,9 +526,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[i].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[i].Texture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Texture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].PlayerName;
|
||||
PlayerDestinationButtons[i].Enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -550,9 +550,9 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Text.Text = CBase.Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].PlayerName;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Texture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Text.Text = CBase.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].PlayerName;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -593,9 +593,9 @@ namespace Vocaluxe.PartyModes
|
||||
//Update texture and name
|
||||
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
@@ -610,9 +610,9 @@ namespace Vocaluxe.PartyModes
|
||||
//Update texture and name
|
||||
PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
||||
PlayerDestinationButtons[added].SColor = new SColorF(1, 1, 1, 1);
|
||||
PlayerDestinationButtons[added].Texture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
PlayerDestinationButtons[added].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -32,9 +32,11 @@ namespace Vocaluxe.Base
|
||||
public static IInputs Input = new BInputs();
|
||||
public static IPlaylist Playlist = new BPlaylist();
|
||||
|
||||
|
||||
public static Basic Base = new Basic(
|
||||
Config, Settings, Theme, Helper, Log, BackgroundMusic, Draw, Graphics, Fonts, Language, Game, Profiles, Record, Songs, Video, Sound, Cover, DataBase, Input, Playlist);
|
||||
public static void Init()
|
||||
{
|
||||
CBase.Assign(Config, Settings, Theme, Helper, Log, BackgroundMusic, Draw, Graphics, Fonts, Language,
|
||||
Game, Profiles, Record, Songs, Video, Sound, Cover, DataBase, Input, Playlist);
|
||||
}
|
||||
}
|
||||
|
||||
class BConfig : IConfig
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Vocaluxe.Base
|
||||
SPartyMode pm = new SPartyMode();
|
||||
pm.PartyMode = new CPartyModeNone();
|
||||
pm.ScreenFiles = new List<string>();
|
||||
pm.PartyMode.Initialize(CMain.Base);
|
||||
pm.PartyMode.Initialize();
|
||||
pm.PartyModeID = _IDs.Dequeue();
|
||||
_NormalGameModeID = pm.PartyModeID;
|
||||
_PartyModes.Add(pm.PartyModeID, pm);
|
||||
@@ -297,7 +297,7 @@ namespace Vocaluxe.Base
|
||||
CLog.LogError("Error casting PartyMode file: " + file + "; " + e.Message);
|
||||
return pm;
|
||||
}
|
||||
pm.PartyMode.Initialize(CMain.Base);
|
||||
pm.PartyMode.Initialize();
|
||||
|
||||
if (!CTheme.AddTheme(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), "Theme.xml")), pm.PartyModeID))
|
||||
return pm;
|
||||
|
||||
+1
-1
@@ -38,8 +38,8 @@ namespace Vocaluxe
|
||||
{
|
||||
// Init Log
|
||||
CLog.Init();
|
||||
CBase.Base = CMain.Base;
|
||||
|
||||
CMain.Init();
|
||||
CSettings.CreateFolders();
|
||||
Application.DoEvents();
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Vocaluxe.Screens
|
||||
if (index >= _PartyModeInfos.Count)
|
||||
return;
|
||||
|
||||
if (CMain.Base.Config.GetMaxNumMics() == 0)
|
||||
if (CMain.Config.GetMaxNumMics() == 0)
|
||||
return; //TODO: Add message!
|
||||
|
||||
if (_PartyModeInfos[index].Playable)
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Vocaluxe.Screens
|
||||
base.Init();
|
||||
|
||||
ButtonsJoker.Clear();
|
||||
for (int i = 0; i < CMain.Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
|
||||
{
|
||||
ButtonsJoker.Add("ButtonJoker" + (i + 1));
|
||||
}
|
||||
@@ -105,7 +105,7 @@ namespace Vocaluxe.Screens
|
||||
blist.Add(ButtonOptionsStartMedley);
|
||||
|
||||
TextsPlayer.Clear();
|
||||
for (int i = 0; i < CMain.Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
|
||||
{
|
||||
TextsPlayer.Add("TextPlayer" + (i + 1));
|
||||
}
|
||||
@@ -824,7 +824,7 @@ namespace Vocaluxe.Screens
|
||||
if (!SongMenus[htSongMenus(SongMenu)].IsSmallView())
|
||||
SongMenus[htSongMenus(SongMenu)].SetSmallView(true);
|
||||
|
||||
for (int i = 0; i < CMain.Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
|
||||
{
|
||||
if (i < _sso.Selection.NumJokers.Length)
|
||||
{
|
||||
@@ -857,7 +857,7 @@ namespace Vocaluxe.Screens
|
||||
if (_sso.Selection.PartyMode && SongMenus[htSongMenus(SongMenu)].IsSmallView())
|
||||
SongMenus[htSongMenus(SongMenu)].SetSmallView(false);
|
||||
|
||||
for (int i = 0; i < CMain.Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Settings.GetMaxNumPlayer(); i++)
|
||||
{
|
||||
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
|
||||
Texts[htTexts(TextsPlayer[i])].Visible = false;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -127,27 +127,27 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
CBase.Base.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
CBase.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
if (_Theme.VideoName != String.Empty)
|
||||
CBase.Base.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
|
||||
CBase.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
public bool Draw()
|
||||
{
|
||||
bool ok = false;
|
||||
if (_Theme.Type == EBackgroundTypes.Video && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON &&
|
||||
CBase.Base.Config.GetVideosToBackground() == EOffOn.TR_CONFIG_ON && CBase.Base.BackgroundMusic.IsPlaying() && CBase.Base.BackgroundMusic.SongHasVideo() &&
|
||||
CBase.Base.BackgroundMusic.VideoEnabled() && !CBase.Base.BackgroundMusic.IsDisabled())
|
||||
if (_Theme.Type == EBackgroundTypes.Video && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON &&
|
||||
CBase.Config.GetVideosToBackground() == EOffOn.TR_CONFIG_ON && CBase.BackgroundMusic.IsPlaying() && CBase.BackgroundMusic.SongHasVideo() &&
|
||||
CBase.BackgroundMusic.VideoEnabled() && !CBase.BackgroundMusic.IsDisabled())
|
||||
{
|
||||
Pause();
|
||||
ok = DrawBackgroundMusicVideo();
|
||||
}
|
||||
else if (_Theme.Type == EBackgroundTypes.Video && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
else if (_Theme.Type == EBackgroundTypes.Video && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
Resume();
|
||||
ok = DrawVideo();
|
||||
@@ -155,11 +155,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (_Theme.TextureName != String.Empty &&
|
||||
(_Theme.Type == EBackgroundTypes.Texture ||
|
||||
(_Theme.Type == EBackgroundTypes.Video && (CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
|
||||
(_Theme.Type == EBackgroundTypes.Video && (CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
|
||||
ok = DrawTexture();
|
||||
|
||||
if (_Theme.Type == EBackgroundTypes.Color || _Theme.Type == EBackgroundTypes.Texture && !ok ||
|
||||
(_Theme.Type == EBackgroundTypes.Video && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF && !ok))
|
||||
(_Theme.Type == EBackgroundTypes.Video && CBase.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF && !ok))
|
||||
DrawColor();
|
||||
|
||||
return true;
|
||||
@@ -172,7 +172,7 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -185,21 +185,21 @@ namespace Vocaluxe.Menu
|
||||
#region internal
|
||||
private void DrawColor()
|
||||
{
|
||||
SRectF bounds = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), CBase.Base.Settings.GetZFar()/4);
|
||||
SRectF bounds = new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), CBase.Settings.GetZFar()/4);
|
||||
|
||||
CBase.Base.Drawing.DrawColor(Color, bounds);
|
||||
CBase.Drawing.DrawColor(Color, bounds);
|
||||
}
|
||||
|
||||
private bool DrawTexture()
|
||||
{
|
||||
STexture Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
STexture Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
if (Texture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, Texture.width, Texture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
CBase.Drawing.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -207,14 +207,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private bool DrawVideo()
|
||||
{
|
||||
STexture VideoTexture = CBase.Base.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
STexture VideoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
if (VideoTexture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
CBase.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -222,14 +222,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private bool DrawBackgroundMusicVideo()
|
||||
{
|
||||
STexture VideoTexture = CBase.Base.BackgroundMusic.GetVideoTexture();
|
||||
STexture VideoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
if (VideoTexture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
CBase.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
+43
-48
@@ -6,56 +6,51 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
public static class CBase
|
||||
{
|
||||
public static Basic Base;
|
||||
}
|
||||
public static IConfig Config;
|
||||
public static ISettings Settings;
|
||||
public static ITheme Theme;
|
||||
public static IHelper Helper;
|
||||
public static ILog Log;
|
||||
public static IBackgroundMusic BackgroundMusic;
|
||||
public static IDrawing Drawing;
|
||||
public static IGraphics Graphics;
|
||||
public static IFonts Fonts;
|
||||
public static ILanguage Language;
|
||||
public static IGame Game;
|
||||
public static IProfiles Profiles;
|
||||
public static IRecording Record;
|
||||
public static ISongs Songs;
|
||||
public static IVideo Video;
|
||||
public static ISound Sound;
|
||||
public static ICover Cover;
|
||||
public static IDataBase DataBase;
|
||||
public static IInputs Input;
|
||||
public static IPlaylist Playlist;
|
||||
|
||||
public class Basic
|
||||
{
|
||||
public IConfig Config;
|
||||
public ISettings Settings;
|
||||
public ITheme Theme;
|
||||
public IHelper Helper;
|
||||
public ILog Log;
|
||||
public IBackgroundMusic BackgroundMusic;
|
||||
public IDrawing Drawing;
|
||||
public IGraphics Graphics;
|
||||
public IFonts Fonts;
|
||||
public ILanguage Language;
|
||||
public IGame Game;
|
||||
public IProfiles Profiles;
|
||||
public IRecording Record;
|
||||
public ISongs Songs;
|
||||
public IVideo Video;
|
||||
public ISound Sound;
|
||||
public ICover Cover;
|
||||
public IDataBase DataBase;
|
||||
public IInputs Input;
|
||||
public IPlaylist Playlist;
|
||||
|
||||
public Basic(IConfig Config, ISettings Settings, ITheme Theme, IHelper Helper, ILog Log, IBackgroundMusic BackgroundMusic,
|
||||
IDrawing Draw, IGraphics Graphics, IFonts Fonts, ILanguage Language, IGame Game, IProfiles Profiles, IRecording Record,
|
||||
ISongs Songs, IVideo Video, ISound Sound, ICover Cover, IDataBase DataBase, IInputs Input, IPlaylist Playlist)
|
||||
public static void Assign(IConfig config, ISettings settings, ITheme theme, IHelper helper, ILog log, IBackgroundMusic backgroundMusic,
|
||||
IDrawing draw, IGraphics graphics, IFonts fonts, ILanguage language, IGame game, IProfiles profiles, IRecording record,
|
||||
ISongs songs, IVideo video, ISound sound, ICover cover, IDataBase dataBase, IInputs input, IPlaylist playlist)
|
||||
{
|
||||
this.Config = Config;
|
||||
this.Settings = Settings;
|
||||
this.Theme = Theme;
|
||||
this.Helper = Helper;
|
||||
this.Log = Log;
|
||||
this.BackgroundMusic = BackgroundMusic;
|
||||
this.Drawing = Draw;
|
||||
this.Graphics = Graphics;
|
||||
this.Fonts = Fonts;
|
||||
this.Language = Language;
|
||||
this.Game = Game;
|
||||
this.Profiles = Profiles;
|
||||
this.Record = Record;
|
||||
this.Songs = Songs;
|
||||
this.Video = Video;
|
||||
this.Sound = Sound;
|
||||
this.Cover = Cover;
|
||||
this.DataBase = DataBase;
|
||||
this.Input = Input;
|
||||
this.Playlist = Playlist;
|
||||
Config = config;
|
||||
Settings = settings;
|
||||
Theme = theme;
|
||||
Helper = helper;
|
||||
Log = log;
|
||||
BackgroundMusic = backgroundMusic;
|
||||
Drawing = draw;
|
||||
Graphics = graphics;
|
||||
Fonts = fonts;
|
||||
Language = language;
|
||||
Game = game;
|
||||
Profiles = profiles;
|
||||
Record = record;
|
||||
Songs = songs;
|
||||
Video = video;
|
||||
Sound = sound;
|
||||
Cover = cover;
|
||||
DataBase = dataBase;
|
||||
Input = input;
|
||||
Playlist = playlist;
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
-14
@@ -147,7 +147,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,7 +159,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -298,7 +298,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(bool ForceDraw)
|
||||
{
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
return;
|
||||
|
||||
STexture texture = new STexture(-1);
|
||||
@@ -308,13 +308,13 @@ namespace Vocaluxe.Menu
|
||||
if (Texture.index != -1)
|
||||
texture = Texture;
|
||||
else
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, Color);
|
||||
CBase.Drawing.DrawTexture(texture, Rect, Color);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -325,13 +325,13 @@ namespace Vocaluxe.Menu
|
||||
if (Texture.index != -1)
|
||||
texture = Texture;
|
||||
else
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
texture = CBase.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
CBase.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -342,13 +342,13 @@ namespace Vocaluxe.Menu
|
||||
if (STexture.index != -1)
|
||||
texture = STexture;
|
||||
else
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
texture = CBase.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
CBase.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -371,10 +371,10 @@ namespace Vocaluxe.Menu
|
||||
Text.LoadTextures();
|
||||
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/MaxColor", ref _Theme.MaxColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -260,10 +260,10 @@ namespace Vocaluxe.Menu
|
||||
color = MaxColor;
|
||||
}
|
||||
|
||||
CBase.Base.Drawing.DrawColor(color, bar);
|
||||
CBase.Drawing.DrawColor(color, bar);
|
||||
|
||||
if (Reflection)
|
||||
CBase.Base.Drawing.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,10 +274,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.MaxColorName != String.Empty)
|
||||
MaxColor = CBase.Base.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
MaxColor = CBase.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+12
-12
@@ -118,7 +118,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -130,7 +130,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -218,7 +218,7 @@ namespace Vocaluxe.Menu
|
||||
if (n.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
_width += rect.Width;
|
||||
_Notes.Add(n);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace Vocaluxe.Menu
|
||||
#region draw
|
||||
public void Draw(float ActualBeat)
|
||||
{
|
||||
if (Visible || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (Visible || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
switch (_Style)
|
||||
{
|
||||
@@ -269,7 +269,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = note.Text;
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -329,7 +329,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = _Notes[note].Text;
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -382,7 +382,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Notes[zoom_note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
float diff = end_beat - _Notes[zoom_note].StartBeat;
|
||||
if (diff <= 0f)
|
||||
@@ -400,7 +400,7 @@ namespace Vocaluxe.Menu
|
||||
float tz = _Text.Z;
|
||||
|
||||
_Text.Height += _Text.Height * p * 0.4f;
|
||||
RectangleF rectz = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rectz = CBase.Drawing.GetTextBounds(_Text);
|
||||
_Text.X -= (rectz.Width - rect.Width) / 2f;
|
||||
_Text.Y -= (rectz.Height - rect.Height) / 2f;
|
||||
_Text.Z -= 0.1f;
|
||||
@@ -423,7 +423,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = note.Text;
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -465,7 +465,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = _Notes[note].Text;
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -548,10 +548,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
ColorProcessed = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
ColorProcessed = CBase.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+47
-47
@@ -144,7 +144,7 @@ namespace Vocaluxe.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
_Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), 0f);
|
||||
|
||||
_ThemeName = String.Empty;
|
||||
_ThemeBackgrounds = null;
|
||||
@@ -164,7 +164,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
protected void FadeTo(EScreens NextScreen)
|
||||
{
|
||||
CBase.Base.Graphics.FadeTo(NextScreen);
|
||||
CBase.Graphics.FadeTo(NextScreen);
|
||||
}
|
||||
|
||||
#region ThemeHandler
|
||||
@@ -183,14 +183,14 @@ namespace Vocaluxe.Menu
|
||||
if (xmlReader != null)
|
||||
xmlReader = null;
|
||||
|
||||
CBase.Base.Log.LogError("Error loading theme file " + file + ": " + e.Message);
|
||||
CBase.Log.LogError("Error loading theme file " + file + ": " + e.Message);
|
||||
}
|
||||
|
||||
bool VersionCheck = false;
|
||||
if (xmlReader != null)
|
||||
VersionCheck = CheckVersion(_ScreenVersion, xmlReader);
|
||||
|
||||
int SkinIndex = CBase.Base.Theme.GetSkinIndex(_PartyModeID);
|
||||
int SkinIndex = CBase.Theme.GetSkinIndex(_PartyModeID);
|
||||
|
||||
if (xmlReader != null && VersionCheck && SkinIndex != -1)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,7 +224,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,7 +240,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -256,7 +256,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +352,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,7 +368,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load ParticleEffect \"" + _ThemeParticleEffects[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load ParticleEffect \"" + _ThemeParticleEffects[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,7 +400,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't load ThemeSetting \"" + _ThemeScreenSettings[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't load ThemeSetting \"" + _ThemeScreenSettings[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -934,7 +934,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -947,7 +947,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -960,7 +960,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -973,7 +973,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -986,7 +986,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -999,7 +999,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1012,7 +1012,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1025,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1038,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1051,7 +1051,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1077,7 +1077,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find ParticleEffect Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find ParticleEffect Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find ScreenSetting Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Log.LogError("Can't find ScreenSetting Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ namespace Vocaluxe.Menu
|
||||
#region MenuHandler
|
||||
public virtual bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
if (!CBase.Base.Settings.IsTabNavigation())
|
||||
if (!CBase.Settings.IsTabNavigation())
|
||||
{
|
||||
if (KeyEvent.Key == Keys.Left)
|
||||
{
|
||||
@@ -1174,7 +1174,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
CBase.Base.Graphics.SaveTheme();
|
||||
CBase.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.R:
|
||||
@@ -1587,10 +1587,10 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void SelectByMouse(int x, int y)
|
||||
{
|
||||
float z = CBase.Base.Settings.GetZFar();
|
||||
float z = CBase.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((CBase.Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
if ((CBase.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -1641,7 +1641,7 @@ namespace Vocaluxe.Menu
|
||||
return true;
|
||||
break;
|
||||
case EType.TText:
|
||||
RectangleF bounds = CBase.Base.Drawing.GetTextBounds(_Texts[interact.Num]);
|
||||
RectangleF bounds = CBase.Drawing.GetTextBounds(_Texts[interact.Num]);
|
||||
if (CHelper.IsInBounds(new SRectF(_Texts[interact.Num].X, _Texts[interact.Num].Y, bounds.Width, bounds.Height, _Texts[interact.Num].Z), x, y))
|
||||
return true;
|
||||
break;
|
||||
@@ -1698,7 +1698,7 @@ namespace Vocaluxe.Menu
|
||||
case EType.TParticleEffect:
|
||||
return _ParticleEffects[interact.Num].Rect.Z;
|
||||
}
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
return CBase.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private float _GetZValue(int interaction)
|
||||
@@ -1736,13 +1736,13 @@ namespace Vocaluxe.Menu
|
||||
return _ParticleEffects[_Interactions[interaction].Num].Rect.Z;
|
||||
}
|
||||
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
return CBase.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -1769,7 +1769,7 @@ namespace Vocaluxe.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -1916,13 +1916,13 @@ namespace Vocaluxe.Menu
|
||||
switch (Key.Key)
|
||||
{
|
||||
case Keys.Up:
|
||||
actualRect = new SRectF(actualRect.X, CBase.Base.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(actualRect.X, CBase.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Down:
|
||||
actualRect = new SRectF(actualRect.X, 0, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Left:
|
||||
actualRect = new SRectF(CBase.Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(CBase.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Right:
|
||||
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
|
||||
@@ -2516,7 +2516,7 @@ namespace Vocaluxe.Menu
|
||||
msg += "the file is for newer program versions! ";
|
||||
|
||||
msg += "Current screen version is " + Version.ToString();
|
||||
CBase.Base.Log.LogError(msg);
|
||||
CBase.Log.LogError(msg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2568,11 +2568,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private void ReloadThemeEditMode()
|
||||
{
|
||||
CBase.Base.Theme.UnloadSkins();
|
||||
CBase.Base.Theme.ListSkins();
|
||||
CBase.Base.Theme.LoadSkins();
|
||||
CBase.Base.Theme.LoadTheme();
|
||||
CBase.Base.Graphics.ReloadTheme();
|
||||
CBase.Theme.UnloadSkins();
|
||||
CBase.Theme.ListSkins();
|
||||
CBase.Theme.LoadSkins();
|
||||
CBase.Theme.LoadTheme();
|
||||
CBase.Graphics.ReloadTheme();
|
||||
|
||||
OnShow();
|
||||
OnShowFinish();
|
||||
|
||||
@@ -29,9 +29,8 @@ namespace Vocaluxe.Menu
|
||||
public CStatic Avatar;
|
||||
public CText Name;
|
||||
|
||||
public CTile(Basic Base)
|
||||
public CTile()
|
||||
{
|
||||
CBase.Base = Base;
|
||||
}
|
||||
|
||||
public CTile(CStatic av, CText tex, int pl)
|
||||
@@ -120,7 +119,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ColorEmptyTile", ref _Theme.ColorEmptyTileName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -144,7 +143,7 @@ namespace Vocaluxe.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetEnumValue<EStyle>(item + "/Tiles/Name/Style", ref _Theme.NameStyle);
|
||||
if (xmlReader.GetValue(item + "/Tiles/Name/Color", ref _Theme.NameColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -368,7 +367,7 @@ namespace Vocaluxe.Menu
|
||||
if (active && Selection != -1)
|
||||
{
|
||||
_player = player;
|
||||
PlayerSelector.Color = CBase.Base.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Color = CBase.Theme.GetPlayerColor(player);
|
||||
}
|
||||
//Normal activation
|
||||
else if (active)
|
||||
@@ -376,7 +375,7 @@ namespace Vocaluxe.Menu
|
||||
Selection = 0;
|
||||
_actualSelection = 0;
|
||||
_player = player;
|
||||
PlayerSelector.Color = CBase.Base.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Color = CBase.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Visible = true;
|
||||
}
|
||||
//Deactivate
|
||||
@@ -411,9 +410,9 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if ((i + offset * _Tiles.Count) < VisibleProfiles.Count)
|
||||
{
|
||||
_Tiles[i].Avatar.Texture = CBase.Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].Avatar.Texture;
|
||||
_Tiles[i].Avatar.Texture = CBase.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].Avatar.Texture;
|
||||
_Tiles[i].Avatar.Color = new SColorF(1, 1, 1, 1);
|
||||
_Tiles[i].Name.Text = CBase.Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].PlayerName;
|
||||
_Tiles[i].Name.Text = CBase.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].PlayerName;
|
||||
_Tiles[i].PlayerNr = VisibleProfiles[i + offset * _Tiles.Count];
|
||||
}
|
||||
else
|
||||
@@ -472,14 +471,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
_TextureEmptyTile = CBase.Base.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = CBase.Base.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
_TextureEmptyTile = CBase.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = CBase.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
|
||||
if (_Theme.ColorEmptyTileName != String.Empty)
|
||||
ColorEmptyTile = CBase.Base.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
ColorEmptyTile = CBase.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
|
||||
if (_Theme.NameColorName != String.Empty)
|
||||
_Theme.NameColor = CBase.Base.Theme.GetColor(_Theme.NameColorName, _PartyModeID);
|
||||
_Theme.NameColor = CBase.Theme.GetColor(_Theme.NameColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -508,18 +507,18 @@ namespace Vocaluxe.Menu
|
||||
private void UpdateVisibleProfiles()
|
||||
{
|
||||
VisibleProfiles.Clear();
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (CBase.Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
visible = true;
|
||||
}
|
||||
for (int p = 0; p < CBase.Base.Game.GetNumPlayer(); p++)
|
||||
for (int p = 0; p < CBase.Game.GetNumPlayer(); p++)
|
||||
{
|
||||
//Don't show profile if is selected, but if selected and guest
|
||||
if (CBase.Base.Game.GetPlayer()[p].ProfileID == i && CBase.Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Game.GetPlayer()[p].ProfileID == i && CBase.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
|
||||
{
|
||||
visible = false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Vocaluxe.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
@@ -115,7 +115,7 @@ namespace Vocaluxe.Menu
|
||||
#region MenuHandler
|
||||
public bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
if (!CBase.Base.Settings.IsTabNavigation())
|
||||
if (!CBase.Settings.IsTabNavigation())
|
||||
{
|
||||
if (KeyEvent.Key == Keys.Left)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
CBase.Base.Graphics.SaveTheme();
|
||||
CBase.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
@@ -474,10 +474,10 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void SelectByMouse(int x, int y)
|
||||
{
|
||||
float z = CBase.Base.Settings.GetZFar();
|
||||
float z = CBase.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((CBase.Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
if ((CBase.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -540,7 +540,7 @@ namespace Vocaluxe.Menu
|
||||
case EType.TSelectSlide:
|
||||
return _SelectSlides[interact.Num].Rect.Z;
|
||||
}
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
return CBase.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private float _GetZValue(int interaction)
|
||||
@@ -557,13 +557,13 @@ namespace Vocaluxe.Menu
|
||||
return _SelectSlides[_Interactions[interaction].Num].Rect.Z;
|
||||
}
|
||||
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
return CBase.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -590,7 +590,7 @@ namespace Vocaluxe.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -737,13 +737,13 @@ namespace Vocaluxe.Menu
|
||||
switch (Key.Key)
|
||||
{
|
||||
case Keys.Up:
|
||||
actualRect = new SRectF(actualRect.X, CBase.Base.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(actualRect.X, CBase.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Down:
|
||||
actualRect = new SRectF(actualRect.X, 0, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Left:
|
||||
actualRect = new SRectF(CBase.Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(CBase.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Right:
|
||||
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Vocaluxe.Menu
|
||||
_Timer = new Stopwatch();
|
||||
_Age = 0f;
|
||||
_MaxAge = maxage;
|
||||
_Rotation = (float)(CBase.Base.Game.GetRandomDouble() * 360.0);
|
||||
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
public CParticle(int PartyModeID, STexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticleType type)
|
||||
@@ -135,7 +135,7 @@ namespace Vocaluxe.Menu
|
||||
_Timer = new Stopwatch();
|
||||
_Age = 0f;
|
||||
_MaxAge = maxage;
|
||||
_Rotation = (float)(CBase.Base.Game.GetRandomDouble() * 360.0);
|
||||
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
#endregion Constructors
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case EParticleType.Snow:
|
||||
int maxy = (int)Math.Round(CBase.Base.Settings.GetRenderH() - _Size * 0.4f);
|
||||
int maxy = (int)Math.Round(CBase.Settings.GetRenderH() - _Size * 0.4f);
|
||||
|
||||
if (Math.Round(Y) < maxy)
|
||||
{
|
||||
@@ -288,9 +288,9 @@ namespace Vocaluxe.Menu
|
||||
public void Draw()
|
||||
{
|
||||
if (_TextureName != String.Empty)
|
||||
CBase.Base.Drawing.DrawTexture(CBase.Base.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
CBase.Drawing.DrawTexture(CBase.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
else
|
||||
CBase.Base.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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -472,7 +472,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
while (_Stars.Count < _MaxNumber && DoSpawn)
|
||||
{
|
||||
float size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
float size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
float lifetime = 0f;
|
||||
float vx = 0f;
|
||||
float vy = 0f;
|
||||
@@ -483,29 +483,29 @@ namespace Vocaluxe.Menu
|
||||
switch (_Type)
|
||||
{
|
||||
case EParticleType.Twinkle:
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(500) / 1000f + 0.5f;
|
||||
vx = -CBase.Base.Game.GetRandom(10000) / 50f + 100f;
|
||||
vy = -CBase.Base.Game.GetRandom(10000) / 50f + 100f;
|
||||
vr = -CBase.Base.Game.GetRandom(500) / 100f + 2.5f;
|
||||
size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Game.GetRandom(500) / 1000f + 0.5f;
|
||||
vx = -CBase.Game.GetRandom(10000) / 50f + 100f;
|
||||
vy = -CBase.Game.GetRandom(10000) / 50f + 100f;
|
||||
vr = -CBase.Game.GetRandom(500) / 100f + 2.5f;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.Star:
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(1000) / 500f + 0.2f;
|
||||
vx = -CBase.Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = -CBase.Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vr = -CBase.Base.Game.GetRandom(500) / 100f + 2.5f;
|
||||
size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Game.GetRandom(1000) / 500f + 0.2f;
|
||||
vx = -CBase.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = -CBase.Game.GetRandom(1000) / 50f + 10f;
|
||||
vr = -CBase.Game.GetRandom(500) / 100f + 2.5f;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.Snow:
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(5000) / 50f + 10f;
|
||||
vx = -CBase.Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = CBase.Base.Game.GetRandom(1000) / 50f + Math.Abs(vx) + 10f;
|
||||
vr = -CBase.Base.Game.GetRandom(200) / 50f + 2f;
|
||||
size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Game.GetRandom(5000) / 50f + 10f;
|
||||
vx = -CBase.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = CBase.Game.GetRandom(1000) / 50f + Math.Abs(vx) + 10f;
|
||||
vr = -CBase.Game.GetRandom(200) / 50f + 2f;
|
||||
vsize = lifetime * 2f;
|
||||
|
||||
_NextSpawnTime = lifetime / _MaxNumber;
|
||||
@@ -513,20 +513,20 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case EParticleType.Flare:
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(500) / 1000f + 0.1f;
|
||||
vx = -CBase.Base.Game.GetRandom(2000) / 50f;
|
||||
vy = -CBase.Base.Game.GetRandom(2000) / 50f + 20f;
|
||||
vr = -CBase.Base.Game.GetRandom(2000) / 50f + 20f;
|
||||
size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Game.GetRandom(500) / 1000f + 0.1f;
|
||||
vx = -CBase.Game.GetRandom(2000) / 50f;
|
||||
vy = -CBase.Game.GetRandom(2000) / 50f + 20f;
|
||||
vr = -CBase.Game.GetRandom(2000) / 50f + 20f;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.PerfNoteStar:
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(1000) / 500f + 1.2f;
|
||||
size = CBase.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Game.GetRandom(1000) / 500f + 1.2f;
|
||||
vx = 0f;
|
||||
vy = 0f;
|
||||
vr = CBase.Base.Game.GetRandom(500) / 50f + 10f;
|
||||
vr = CBase.Game.GetRandom(500) / 50f + 10f;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
@@ -547,15 +547,15 @@ namespace Vocaluxe.Menu
|
||||
if (_Theme.TextureName != String.Empty)
|
||||
{
|
||||
star = new CParticle(_PartyModeID, _Theme.TextureName, Color,
|
||||
CBase.Base.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
CBase.Base.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
CBase.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
CBase.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
size, lifetime, Rect.Z, vx, vy, vr, vsize, _Type);
|
||||
}
|
||||
else
|
||||
{
|
||||
star = new CParticle(_PartyModeID, Texture, Color,
|
||||
CBase.Base.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
CBase.Base.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
CBase.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
CBase.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
size, lifetime, Rect.Z, vx, vy, vr, vsize, _Type);
|
||||
}
|
||||
|
||||
@@ -612,9 +612,9 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if(_Theme.TextureName != String.Empty)
|
||||
Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_EditMode == EEditMode.ChangeOrder && ChangeOrderSource != -1 && PlaylistElements.Count > ChangeOrderSource)
|
||||
{
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[ChangeOrderSource].Content);
|
||||
CBase.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[ChangeOrderSource].Content);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
ChangeOrderSource = -1;
|
||||
@@ -245,7 +245,7 @@ namespace Vocaluxe.Menu
|
||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref Rect.H);
|
||||
if (xmlReader.GetValue(item + "/ColorBackground", ref _Theme.ColorBackgroundName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, ref BackgroundColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, ref BackgroundColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,7 +256,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
if (xmlReader.GetValue(item + "/SColorBackground", ref _Theme.SColorBackgroundName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, ref BackgroundSColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, ref BackgroundSColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -422,19 +422,19 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
LoadPlaylist(0);
|
||||
}
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||
{
|
||||
if (i == CurrentPlaylistElement && _Selected)
|
||||
{
|
||||
PlaylistElements[i].Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Texture = CBase.Theme.GetSkinTexture(_Theme.STextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Color = BackgroundSColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaylistElements[i].Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Texture = CBase.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Color = BackgroundColor;
|
||||
}
|
||||
}
|
||||
@@ -468,10 +468,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorBackgroundName != String.Empty)
|
||||
BackgroundColor = CBase.Base.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
BackgroundColor = CBase.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorBackgroundName != String.Empty)
|
||||
BackgroundSColor = CBase.Base.Theme.GetColor(_Theme.SColorBackgroundName, _PartyModeID);
|
||||
BackgroundSColor = CBase.Theme.GetColor(_Theme.SColorBackgroundName, _PartyModeID);
|
||||
|
||||
_Theme.Text1.LoadTextures();
|
||||
_Theme.ButtonPlaylistClose.LoadTextures();
|
||||
@@ -508,14 +508,14 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (KeyEvent.Key == Keys.Enter)
|
||||
{
|
||||
CBase.Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
}
|
||||
else if (KeyEvent.Key == Keys.Escape)
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
}
|
||||
@@ -603,7 +603,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case Keys.Delete:
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[CurrentPlaylistElement].Content);
|
||||
CBase.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[CurrentPlaylistElement].Content);
|
||||
UpdatePlaylist();
|
||||
|
||||
if (Offset > 0)
|
||||
@@ -631,7 +631,7 @@ namespace Vocaluxe.Menu
|
||||
case Keys.Add: //move the selected song up
|
||||
if (PlaylistElementContents.Count > 1 && (CurrentPlaylistElement > 0 || Offset > 0))
|
||||
{
|
||||
CBase.Base.Playlist.MovePlaylistSongUp(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
CBase.Playlist.MovePlaylistSongUp(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
|
||||
KeyEvent key = new KeyEvent();
|
||||
@@ -661,7 +661,7 @@ namespace Vocaluxe.Menu
|
||||
case Keys.Subtract: //move the selected song down
|
||||
if (PlaylistElementContents.Count > 1 && CurrentPlaylistElement + Offset < PlaylistElementContents.Count - 1)
|
||||
{
|
||||
CBase.Base.Playlist.MovePlaylistSongDown(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
CBase.Playlist.MovePlaylistSongDown(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
|
||||
KeyEvent key = new KeyEvent();
|
||||
@@ -731,7 +731,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
break;
|
||||
@@ -742,7 +742,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
break;
|
||||
@@ -774,11 +774,11 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
||||
{
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
||||
{
|
||||
CBase.Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
ClosePlaylist();
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistName.Selected)
|
||||
@@ -900,7 +900,7 @@ namespace Vocaluxe.Menu
|
||||
//Delete Entry with RB
|
||||
if (CHelper.IsInBounds(PlaylistElements[i].Background.Rect, MouseEvent) && MouseEvent.RB && PlaylistElements[i].Content != -1)
|
||||
{
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[i].Content);
|
||||
CBase.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[i].Content);
|
||||
UpdatePlaylist();
|
||||
return true;
|
||||
}
|
||||
@@ -920,7 +920,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
if (_Theme.ButtonPlaylistClose.Selected)
|
||||
@@ -935,12 +935,12 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
||||
{
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
return true;
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
||||
{
|
||||
CBase.Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
ClosePlaylist();
|
||||
return true;
|
||||
}
|
||||
@@ -969,14 +969,14 @@ namespace Vocaluxe.Menu
|
||||
return true;
|
||||
|
||||
ChangeOrderElement = new PlaylistElement(PlaylistElements[CurrentPlaylistElement]);
|
||||
ChangeOrderElement.Background.Rect.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.Cover.Rect.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.Rect.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowLeft.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowRight.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.Text1.Z = CBase.Base.Settings.GetZNear();
|
||||
ChangeOrderElement.Background.Rect.Z = CBase.Settings.GetZNear();
|
||||
ChangeOrderElement.Cover.Rect.Z = CBase.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.Rect.Z = CBase.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowLeft.Z = CBase.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowRight.Z = CBase.Settings.GetZNear();
|
||||
ChangeOrderElement.Text1.Z = CBase.Settings.GetZNear();
|
||||
|
||||
ChangeOrderElement.Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
ChangeOrderElement.Background.Texture = CBase.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
ChangeOrderElement.Background.Color = BackgroundColor;
|
||||
|
||||
OldMousePosX = MouseEvent.X;
|
||||
@@ -988,7 +988,7 @@ namespace Vocaluxe.Menu
|
||||
if (!MouseEvent.LBH && DragAndDropSongID != -1)
|
||||
{
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
CSong song = CBase.Base.Songs.GetSongByID(DragAndDropSongID);
|
||||
CSong song = CBase.Songs.GetSongByID(DragAndDropSongID);
|
||||
|
||||
if (song != null)
|
||||
{
|
||||
@@ -997,14 +997,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
CBase.Base.Playlist.InsertPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset, DragAndDropSongID, gm);
|
||||
CBase.Playlist.InsertPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MouseEvent.Y < PlaylistElements[0].Background.Rect.Y && Offset == 0)
|
||||
{
|
||||
CBase.Base.Playlist.InsertPlaylistSong(ActivePlaylistID, 0, DragAndDropSongID, gm);
|
||||
CBase.Playlist.InsertPlaylistSong(ActivePlaylistID, 0, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else
|
||||
@@ -1023,7 +1023,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MouseEvent.Y > min)
|
||||
{
|
||||
CBase.Base.Playlist.AddPlaylistSong(ActivePlaylistID, DragAndDropSongID, gm);
|
||||
CBase.Playlist.AddPlaylistSong(ActivePlaylistID, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
ScrollToBottom();
|
||||
}
|
||||
@@ -1044,8 +1044,8 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_Theme.ButtonPlaylistName.Selected)
|
||||
{
|
||||
CBase.Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
return true;
|
||||
}
|
||||
@@ -1054,7 +1054,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_Theme.ButtonPlaylistName.Selected)
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
return true;
|
||||
@@ -1074,14 +1074,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (CurrentPlaylistElement != -1 && CurrentPlaylistElement + Offset != ChangeOrderSource)
|
||||
{
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, CurrentPlaylistElement + Offset);
|
||||
CBase.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else if (CurrentPlaylistElement == -1)
|
||||
{
|
||||
if (MouseEvent.Y < PlaylistElements[0].Background.Rect.Y && Offset == 0)
|
||||
{
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, 0);
|
||||
CBase.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1099,7 +1099,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MouseEvent.Y > min)
|
||||
{
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, PlaylistElementContents.Count - 1);
|
||||
CBase.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, PlaylistElementContents.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1152,17 +1152,17 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public bool LoadPlaylist(int PlaylistID)
|
||||
{
|
||||
if (PlaylistID > -1 && PlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
if (PlaylistID > -1 && PlaylistID < CBase.Playlist.GetNumPlaylists())
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
ActivePlaylistID = PlaylistID;
|
||||
PlaylistElementContents.Clear();
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
PlaylistElementContent pec = new PlaylistElementContent();
|
||||
pec.SongID = CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = CBase.Base.Songs.GetSongByID(CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID).AvailableGameModes;
|
||||
pec.Mode = CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
pec.SongID = CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = CBase.Songs.GetSongByID(CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID).AvailableGameModes;
|
||||
pec.Mode = CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
PlaylistElementContents.Add(pec);
|
||||
}
|
||||
Update();
|
||||
@@ -1175,12 +1175,12 @@ namespace Vocaluxe.Menu
|
||||
public void UpdatePlaylist()
|
||||
{
|
||||
PlaylistElementContents.Clear();
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
PlaylistElementContent pec = new PlaylistElementContent();
|
||||
pec.SongID = CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = CBase.Base.Songs.GetSongByID(pec.SongID).AvailableGameModes;
|
||||
pec.Mode = CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
pec.SongID = CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = CBase.Songs.GetSongByID(pec.SongID).AvailableGameModes;
|
||||
pec.Mode = CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
PlaylistElementContents.Add(pec);
|
||||
}
|
||||
|
||||
@@ -1198,34 +1198,34 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private void StartPlaylistSongs()
|
||||
{
|
||||
CBase.Base.Game.Reset();
|
||||
CBase.Base.Game.ClearSongs();
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Playlist.GetNumPlaylists())
|
||||
{
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
CBase.Base.Game.AddSong(CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID, CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode);
|
||||
CBase.Game.AddSong(CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID, CBase.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode);
|
||||
}
|
||||
if (CBase.Base.Game.GetNumSongs() > 0)
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenNames); //TODO: What is if someone uses that in PartyMode?
|
||||
if (CBase.Game.GetNumSongs() > 0)
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenNames); //TODO: What is if someone uses that in PartyMode?
|
||||
}
|
||||
}
|
||||
|
||||
private void StartPlaylistSong(int selected)
|
||||
{
|
||||
CBase.Base.Game.Reset();
|
||||
CBase.Base.Game.ClearSongs();
|
||||
CBase.Game.Reset();
|
||||
CBase.Game.ClearSongs();
|
||||
|
||||
CBase.Base.Game.AddSong(CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).SongID, CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).GameMode);
|
||||
CBase.Game.AddSong(CBase.Playlist.GetPlaylistSong(ActivePlaylistID, selected).SongID, CBase.Playlist.GetPlaylistSong(ActivePlaylistID, selected).GameMode);
|
||||
|
||||
if (CBase.Base.Game.GetNumSongs() > 0)
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenNames);
|
||||
if (CBase.Game.GetNumSongs() > 0)
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenNames);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Playlist.GetNumPlaylists())
|
||||
{
|
||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||
{
|
||||
@@ -1237,7 +1237,7 @@ namespace Vocaluxe.Menu
|
||||
PlaylistElements[i].SelectSlide.Visible = true;
|
||||
PlaylistElements[i].Text1.Visible = true;
|
||||
PlaylistElementContent pec = PlaylistElementContents[Offset + i];
|
||||
CSong song = CBase.Base.Songs.GetSongByID(pec.SongID);
|
||||
CSong song = CBase.Songs.GetSongByID(pec.SongID);
|
||||
PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
||||
string t1 = _Theme.Text1.Text.Replace("%a", song.Artist).Replace("%t", song.Title);
|
||||
PlaylistElements[i].Text1.Text = /*(Offset + i + 1).ToString() + ") " + */song.Artist + " - " + song.Title; //TODO: Add text field for the number
|
||||
|
||||
@@ -125,12 +125,12 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private STexture GetTextureValue(string _string)
|
||||
{
|
||||
return CBase.Base.Theme.GetSkinTexture(_string, _PartyModeID);
|
||||
return CBase.Theme.GetSkinTexture(_string, _PartyModeID);
|
||||
}
|
||||
|
||||
private SColorF GetColorValue(string _string)
|
||||
{
|
||||
return CBase.Base.Theme.GetColor(_string, _PartyModeID);
|
||||
return CBase.Theme.GetColor(_string, _PartyModeID);
|
||||
}
|
||||
#endregion Private
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -261,7 +261,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -273,7 +273,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/HColor", ref _Theme.HColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.HColorName, SkinIndex, ref HColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.HColorName, SkinIndex, ref HColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -297,7 +297,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowColor", ref _Theme.ArrowColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, ref ColorArrow);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, ref ColorArrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -309,7 +309,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", ref _Theme.SArrowColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, ref SColorArrow);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, ref SColorArrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -321,7 +321,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextColor", ref _Theme.TextColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.TextColorName, SkinIndex, ref TextColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.TextColorName, SkinIndex, ref TextColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -333,7 +333,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextSColor", ref _Theme.STextColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.STextColorName, SkinIndex, ref STextColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.STextColorName, SkinIndex, ref STextColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -713,43 +713,43 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
return;
|
||||
|
||||
STexture Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
STexture TextureArrowLeft = CBase.Base.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
STexture TextureArrowRight = CBase.Base.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
STexture Texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
STexture TextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
STexture TextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
|
||||
STexture STexture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
STexture STextureArrowLeft = CBase.Base.Theme.GetSkinTexture(_Theme.STextureArrowLeftName, _PartyModeID);
|
||||
STexture STextureArrowRight = CBase.Base.Theme.GetSkinTexture(_Theme.STextureArrowRightName, _PartyModeID);
|
||||
STexture STexture = CBase.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
STexture STextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.STextureArrowLeftName, _PartyModeID);
|
||||
STexture STextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.STextureArrowRightName, _PartyModeID);
|
||||
|
||||
STexture HTexture = CBase.Base.Theme.GetSkinTexture(_Theme.HTextureName, _PartyModeID);
|
||||
STexture HTexture = CBase.Theme.GetSkinTexture(_Theme.HTextureName, _PartyModeID);
|
||||
|
||||
if (Selected)
|
||||
{
|
||||
if (Highlighted)
|
||||
CBase.Base.Drawing.DrawTexture(HTexture, Rect, HColor);
|
||||
CBase.Drawing.DrawTexture(HTexture, Rect, HColor);
|
||||
else
|
||||
CBase.Base.Drawing.DrawTexture(STexture, Rect, SColor);
|
||||
CBase.Drawing.DrawTexture(STexture, Rect, SColor);
|
||||
}
|
||||
else
|
||||
CBase.Base.Drawing.DrawTexture(Texture, Rect, Color);
|
||||
CBase.Drawing.DrawTexture(Texture, Rect, Color);
|
||||
|
||||
if (_Selection > 0 || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection > 0 || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
if (_ArrowLeftSelected)
|
||||
CBase.Base.Drawing.DrawTexture(STextureArrowLeft, RectArrowLeft, SColorArrow);
|
||||
CBase.Drawing.DrawTexture(STextureArrowLeft, RectArrowLeft, SColorArrow);
|
||||
else
|
||||
CBase.Base.Drawing.DrawTexture(TextureArrowLeft, RectArrowLeft, ColorArrow);
|
||||
CBase.Drawing.DrawTexture(TextureArrowLeft, RectArrowLeft, ColorArrow);
|
||||
}
|
||||
|
||||
if (_Selection < _ValueNames.Count - 1 || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection < _ValueNames.Count - 1 || CBase.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
if (_ArrowRightSelected)
|
||||
CBase.Base.Drawing.DrawTexture(STextureArrowRight, RectArrowRight, SColorArrow);
|
||||
CBase.Drawing.DrawTexture(STextureArrowRight, RectArrowRight, SColorArrow);
|
||||
else
|
||||
CBase.Base.Drawing.DrawTexture(TextureArrowRight, RectArrowRight, ColorArrow);
|
||||
CBase.Drawing.DrawTexture(TextureArrowRight, RectArrowRight, ColorArrow);
|
||||
}
|
||||
|
||||
if (_NumVisible < 1 || _ValueNames.Count == 0)
|
||||
@@ -786,7 +786,7 @@ namespace Vocaluxe.Menu
|
||||
Alpha = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
|
||||
RectangleF bounds = CBase.Base.Drawing.GetTextBounds(Text);
|
||||
RectangleF bounds = CBase.Drawing.GetTextBounds(Text);
|
||||
Text.X = (x + dx/2f + dx * i)+TextRelativeX;
|
||||
|
||||
if (!WithTextures)
|
||||
@@ -801,7 +801,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
float dh = Text.Y - Rect.Y - Rect.H * 0.1f;
|
||||
SRectF rect = new SRectF(Text.X - dh / 2, Rect.Y + Rect.H * 0.05f, dh, dh, Rect.Z);
|
||||
CBase.Base.Drawing.DrawTexture(_Textures[i + offset], rect, Alpha);
|
||||
CBase.Drawing.DrawTexture(_Textures[i + offset], rect, Alpha);
|
||||
_ValueBounds.Add(rect);
|
||||
}
|
||||
else
|
||||
@@ -818,25 +818,25 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.HColorName != String.Empty)
|
||||
HColor = CBase.Base.Theme.GetColor(_Theme.HColorName, _PartyModeID);
|
||||
HColor = CBase.Theme.GetColor(_Theme.HColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.ArrowColorName != String.Empty)
|
||||
ColorArrow = CBase.Base.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
ColorArrow = CBase.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SArrowColorName != String.Empty)
|
||||
SColorArrow = CBase.Base.Theme.GetColor(_Theme.SArrowColorName, _PartyModeID);
|
||||
SColorArrow = CBase.Theme.GetColor(_Theme.SArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.TextColorName != String.Empty)
|
||||
TextColor = CBase.Base.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
TextColor = CBase.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
STextColor = CBase.Base.Theme.GetColor(_Theme.STextColorName, _PartyModeID);
|
||||
STextColor = CBase.Theme.GetColor(_Theme.STextColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Texture.index != -1)
|
||||
return _Texture;
|
||||
else
|
||||
return CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
return CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
set { _Texture = value; }
|
||||
@@ -141,7 +141,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -241,7 +241,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Texture.index != -1)
|
||||
texture = _Texture;
|
||||
else
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
|
||||
SRectF bounds = new SRectF(
|
||||
Rect.X - Rect.W * (scale - 1f),
|
||||
@@ -265,18 +265,18 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
SColorF color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha);
|
||||
if (Visible || ForceDraw || (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Visible || ForceDraw || (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
CBase.Base.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
CBase.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
if (Reflection)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
CBase.Base.Drawing.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect);
|
||||
CBase.Drawing.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+53
-53
@@ -116,9 +116,9 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
_MaxWidth = value;
|
||||
if (_MaxWidth > 0)
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), _MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), _MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
|
||||
_PositionNeedsUpdate = true;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _Theme.Text; }
|
||||
set
|
||||
{
|
||||
string translation = CBase.Base.Language.Translate(value, _TranslationID);
|
||||
string translation = CBase.Language.Translate(value, _TranslationID);
|
||||
if (_Theme.Text != value || translation != _Text)
|
||||
{
|
||||
_Theme.Text = value;
|
||||
@@ -223,7 +223,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _PartyModeID; }
|
||||
set
|
||||
{
|
||||
_Text = CBase.Base.Language.Translate(_Text, value);
|
||||
_Text = CBase.Language.Translate(_Text, value);
|
||||
_PositionNeedsUpdate = true;
|
||||
_PartyModeID = value;
|
||||
_TranslationID = value;
|
||||
@@ -235,7 +235,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _TranslationID; }
|
||||
set
|
||||
{
|
||||
_Text = CBase.Base.Language.Translate(_Text, value);
|
||||
_Text = CBase.Language.Translate(_Text, value);
|
||||
_PositionNeedsUpdate = true;
|
||||
_TranslationID = value;
|
||||
}
|
||||
@@ -338,11 +338,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = true;
|
||||
@@ -377,11 +377,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = false;
|
||||
@@ -414,11 +414,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = true;
|
||||
@@ -453,11 +453,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = false;
|
||||
@@ -484,7 +484,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -496,7 +496,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -542,9 +542,9 @@ namespace Vocaluxe.Menu
|
||||
LoadTextures();
|
||||
|
||||
if (MaxWidth > 0)
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), MaxWidth, 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Settings.GetRenderW(), -CBase.Settings.GetRenderH(), 3f * CBase.Settings.GetRenderW(), 3f * CBase.Settings.GetRenderH(), 0f);
|
||||
|
||||
_ButtonText = ButtonText;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ namespace Vocaluxe.Menu
|
||||
writer.WriteElementString("Font", Fon);
|
||||
|
||||
writer.WriteComment("<Text>: Nothing or translation tag");
|
||||
if (CBase.Base.Language.TranslationExists(_Theme.Text))
|
||||
if (CBase.Language.TranslationExists(_Theme.Text))
|
||||
writer.WriteElementString("Text", _Theme.Text);
|
||||
else
|
||||
writer.WriteElementString("Text", string.Empty);
|
||||
@@ -654,7 +654,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(bool ForceDraw)
|
||||
{
|
||||
if (!ForceDraw && !Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!ForceDraw && !Visible && CBase.Settings.GetGameState() != EGameState.EditTheme)
|
||||
return;
|
||||
|
||||
// Update Text
|
||||
@@ -663,8 +663,8 @@ namespace Vocaluxe.Menu
|
||||
if (_PositionNeedsUpdate)
|
||||
UpdateTextPosition();
|
||||
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
CBase.Fonts.SetFont(Fon);
|
||||
CBase.Fonts.SetStyle(Style);
|
||||
|
||||
SColorF CurrentColor = new SColorF(Color);
|
||||
if (Selected)
|
||||
@@ -673,9 +673,9 @@ namespace Vocaluxe.Menu
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
if (!EditMode)
|
||||
CBase.Base.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
CBase.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
else
|
||||
CBase.Base.Fonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
CBase.Fonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
@@ -695,15 +695,15 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
if (!EditMode)
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
CBase.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
else
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
CBase.Fonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
CBase.Base.Drawing.DrawColor(
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * CBase.Base.Graphics.GetGlobalAlpha()),
|
||||
CBase.Drawing.DrawColor(
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * CBase.Graphics.GetGlobalAlpha()),
|
||||
new SRectF(_DrawPosition.X, _DrawPosition.Y, _DrawPosition.Width, _DrawPosition.Height, Z)
|
||||
);
|
||||
}
|
||||
@@ -711,7 +711,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(float begin, float end)
|
||||
{
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
float x = X;
|
||||
switch (Align)
|
||||
@@ -732,22 +732,22 @@ namespace Vocaluxe.Menu
|
||||
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
CBase.Fonts.SetFont(Fon);
|
||||
CBase.Fonts.SetStyle(Style);
|
||||
|
||||
if (!EditMode)
|
||||
CBase.Base.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||
CBase.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||
else
|
||||
CBase.Base.Fonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
|
||||
CBase.Fonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
CBase.Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
||||
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,10 +771,10 @@ namespace Vocaluxe.Menu
|
||||
float x = X + rx;
|
||||
float y = Y + ry;
|
||||
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
CBase.Fonts.SetFont(Fon);
|
||||
CBase.Fonts.SetStyle(Style);
|
||||
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
if (bounds.Width > Bounds.W && Bounds.W > 0f && bounds.Width > 0f)
|
||||
{
|
||||
@@ -796,7 +796,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
|
||||
bounds = CBase.Base.Fonts.GetTextBounds(this, h);
|
||||
bounds = CBase.Fonts.GetTextBounds(this, h);
|
||||
}
|
||||
|
||||
switch (Align)
|
||||
@@ -818,13 +818,13 @@ namespace Vocaluxe.Menu
|
||||
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
CBase.Fonts.SetFont(Fon);
|
||||
CBase.Fonts.SetStyle(Style);
|
||||
|
||||
if (!EditMode)
|
||||
CBase.Base.Fonts.DrawText(_Text, h, x, y, Z, color);
|
||||
CBase.Fonts.DrawText(_Text, h, x, y, Z, color);
|
||||
else
|
||||
CBase.Base.Fonts.DrawText(_Text + "|", h, x, y, Z, color);
|
||||
CBase.Fonts.DrawText(_Text + "|", h, x, y, Z, color);
|
||||
|
||||
if (reflection)
|
||||
{
|
||||
@@ -832,14 +832,14 @@ namespace Vocaluxe.Menu
|
||||
float height = reflectionHeight - (rectHeight - Y) + bounds.Height;
|
||||
|
||||
if (!EditMode)
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
||||
CBase.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
||||
else
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
|
||||
CBase.Fonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
|
||||
}
|
||||
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
CBase.Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f * CBase.Base.Graphics.GetGlobalAlpha()), new SRectF(x, y, bounds.Width, bounds.Height, Z));
|
||||
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f * CBase.Graphics.GetGlobalAlpha()), new SRectF(x, y, bounds.Width, bounds.Height, Z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,10 +850,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -882,12 +882,12 @@ namespace Vocaluxe.Menu
|
||||
if (_Text == String.Empty)
|
||||
return;
|
||||
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
CBase.Fonts.SetFont(Fon);
|
||||
CBase.Fonts.SetStyle(Style);
|
||||
|
||||
float h = Height;
|
||||
float y = Y;
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
if (bounds.Width > Bounds.W && Bounds.W > 0f && bounds.Width > 0f)
|
||||
{
|
||||
@@ -909,7 +909,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
|
||||
bounds = CBase.Base.Fonts.GetTextBounds(this, h);
|
||||
bounds = CBase.Fonts.GetTextBounds(this, h);
|
||||
}
|
||||
|
||||
float x = X;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't open XML file: " + sUri);
|
||||
CBase.Log.LogError("Can't open XML file: " + sUri);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
get { return _Tone; }
|
||||
set
|
||||
{
|
||||
if ((value >= CBase.Base.Settings.GetToneMin()) && (value <= CBase.Base.Settings.GetToneMax()))
|
||||
if ((value >= CBase.Settings.GetToneMin()) && (value <= CBase.Settings.GetToneMax()))
|
||||
_Tone = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,10 +94,10 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinToneHelper", ref _Theme.SkinToneHelperName, String.Empty);
|
||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinPerfectNoteStar", ref _Theme.SkinPerfectNoteStarName, String.Empty);
|
||||
|
||||
_BarPos = new SRectF[CBase.Base.Settings.GetMaxNumPlayer(), CBase.Base.Settings.GetMaxNumPlayer()];
|
||||
for (int numplayer = 0; numplayer < CBase.Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
_BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(), CBase.Settings.GetMaxNumPlayer()];
|
||||
for (int numplayer = 0; numplayer < CBase.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
{
|
||||
for (int player = 0; player < CBase.Base.Settings.GetMaxNumPlayer(); player++)
|
||||
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
||||
{
|
||||
if (player <= numplayer)
|
||||
{
|
||||
@@ -158,9 +158,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
writer.WriteComment(" <P$N$X>, <P$N$Y>, <P$N$Z>, <P$N$W>, <P$N$H>");
|
||||
writer.WriteComment(" position, width and height of note bars: first index = player number; second index = num players seen on screen");
|
||||
writer.WriteStartElement("BarPositions");
|
||||
for (int numplayer = 0; numplayer < CBase.Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
for (int numplayer = 0; numplayer < CBase.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
{
|
||||
for (int player = 0; player < CBase.Base.Settings.GetMaxNumPlayer(); player++)
|
||||
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
||||
{
|
||||
if (player <= numplayer)
|
||||
{
|
||||
@@ -294,7 +294,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
CLine Line = _PlayerNotes[n].Lines[_PlayerNotes[n].LineNr];
|
||||
|
||||
if (CBase.Base.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
DrawNoteLines(_PlayerNotes[n].Rect, new SColorF(0.5f, 0.5f, 0.5f, 0.5f * _PlayerNotes[n].Alpha));
|
||||
}
|
||||
@@ -304,7 +304,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
float w = _PlayerNotes[n].Rect.W;
|
||||
float h = _PlayerNotes[n].Rect.H;
|
||||
float dh = h / CBase.Base.Settings.GetNumNoteLines() * (2f - (int)CBase.Base.Game.GetPlayer()[_PlayerNotes[n].PlayerNr].Difficulty) / 4f;
|
||||
float dh = h / CBase.Settings.GetNumNoteLines() * (2f - (int)CBase.Game.GetPlayer()[_PlayerNotes[n].PlayerNr].Difficulty) / 4f;
|
||||
|
||||
float beats = Line.LastNoteBeat - Line.FirstNoteBeat + 1;
|
||||
|
||||
@@ -327,9 +327,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
SRectF rect = new SRectF(
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - Line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Base.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / CBase.Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
h / CBase.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
@@ -344,9 +344,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Base.Config.GetDrawToneHelper() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Config.GetDrawToneHelper() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
DrawToneHelper(n, (int)BaseLine, (CBase.Base.Game.GetMidBeatD() - Line.FirstNoteBeat) / beats * w);
|
||||
DrawToneHelper(n, (int)BaseLine, (CBase.Game.GetMidBeatD() - Line.FirstNoteBeat) / beats * w);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
@@ -365,7 +365,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
perfline.Draw();
|
||||
}
|
||||
|
||||
if (SingLine == null || SingLine.Count == 0 || CBase.Base.Game.GetPlayer()[Player].CurrentLine == -1 || SingLine.Count <= CBase.Base.Game.GetPlayer()[Player].CurrentLine)
|
||||
if (SingLine == null || SingLine.Count == 0 || CBase.Game.GetPlayer()[Player].CurrentLine == -1 || SingLine.Count <= CBase.Game.GetPlayer()[Player].CurrentLine)
|
||||
{
|
||||
foreach (CParticleEffect stars in _PlayerNotes[n].GoldenStars)
|
||||
{
|
||||
@@ -375,20 +375,20 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (CNote note in SingLine[CBase.Base.Game.GetPlayer()[Player].CurrentLine].Notes)
|
||||
foreach (CNote note in SingLine[CBase.Game.GetPlayer()[Player].CurrentLine].Notes)
|
||||
{
|
||||
if (note.StartBeat >= Line.FirstNoteBeat && note.EndBeat <= Line.LastNoteBeat)
|
||||
{
|
||||
float width = note.Duration / beats * w;
|
||||
|
||||
if (note.EndBeat == CBase.Base.Game.GetCurrentBeatD())
|
||||
width -= (1 - (CBase.Base.Game.GetMidBeatD() - CBase.Base.Game.GetCurrentBeatD())) / beats * w;
|
||||
if (note.EndBeat == CBase.Game.GetCurrentBeatD())
|
||||
width -= (1 - (CBase.Game.GetMidBeatD() - CBase.Game.GetCurrentBeatD())) / beats * w;
|
||||
|
||||
SRectF rect = new SRectF(
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - Line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Base.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / CBase.Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
h / CBase.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
@@ -398,14 +398,14 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
DrawNote(rect, color, f);
|
||||
|
||||
if (note.EndBeat >= CBase.Base.Game.GetCurrentBeatD() && note.Hit && note.NoteType == ENoteType.Golden)
|
||||
if (note.EndBeat >= CBase.Game.GetCurrentBeatD() && note.Hit && note.NoteType == ENoteType.Golden)
|
||||
{
|
||||
SRectF re = new SRectF(rect);
|
||||
re.W = (CBase.Base.Game.GetMidBeatD() - note.StartBeat) / beats * w;
|
||||
re.W = (CBase.Game.GetMidBeatD() - note.StartBeat) / beats * w;
|
||||
AddFlare(re, n);
|
||||
}
|
||||
|
||||
if (note.Perfect && note.EndBeat < CBase.Base.Game.GetCurrentBeatD())
|
||||
if (note.Perfect && note.EndBeat < CBase.Game.GetCurrentBeatD())
|
||||
{
|
||||
AddPerfectNote(rect, n);
|
||||
note.Perfect = false;
|
||||
@@ -413,13 +413,13 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
int currentLine = CBase.Base.Game.GetPlayer()[Player].SingLine.Count - 1;
|
||||
int currentLine = CBase.Game.GetPlayer()[Player].SingLine.Count - 1;
|
||||
if (currentLine > 0)
|
||||
{
|
||||
if (CBase.Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine)
|
||||
if (CBase.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine)
|
||||
{
|
||||
AddPerfectLine(n);
|
||||
CBase.Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
CBase.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,18 +520,18 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = CBase.Base.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteMiddle = CBase.Base.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture NoteEnd = CBase.Base.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
STexture NoteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture NoteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(NoteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), Color);
|
||||
CBase.Base.Drawing.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), Color);
|
||||
CBase.Base.Drawing.DrawTexture(NoteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(NoteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), Color);
|
||||
CBase.Drawing.DrawTexture(NoteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), Color);
|
||||
}
|
||||
|
||||
private void DrawNoteBG(SRectF Rect, SColorF Color, float factor, Stopwatch Timer)
|
||||
@@ -562,9 +562,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBackgroundBegin = CBase.Base.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture NoteBackgroundMiddle = CBase.Base.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture NoteBackgroundEnd = CBase.Base.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
STexture NoteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture NoteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture NoteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
|
||||
float dx = NoteBackgroundBegin.width * r.H / NoteBackgroundBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
@@ -572,17 +572,17 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
SColorF col = new SColorF(Color.R, Color.G, Color.B, Color.A * alpha);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
|
||||
CBase.Base.Drawing.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
|
||||
CBase.Base.Drawing.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
|
||||
CBase.Drawing.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
|
||||
}
|
||||
|
||||
protected void DrawNoteLines(SRectF Rect, SColorF Color)
|
||||
{
|
||||
for (int i = 0; i < CBase.Base.Settings.GetNumNoteLines() - 1; i++)
|
||||
for (int i = 0; i < CBase.Settings.GetNumNoteLines() - 1; i++)
|
||||
{
|
||||
float y = Rect.Y + Rect.H / CBase.Base.Settings.GetNumNoteLines() * (i + 1);
|
||||
CBase.Base.Drawing.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -1.0f));
|
||||
float y = Rect.Y + Rect.H / CBase.Settings.GetNumNoteLines() * (i + 1);
|
||||
CBase.Drawing.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = CBase.Base.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
@@ -680,7 +680,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect stars = new CParticleEffect(_PartyModeID, CBase.Base.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticleType.PerfNoteStar);
|
||||
CParticleEffect stars = new CParticleEffect(_PartyModeID, CBase.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticleType.PerfNoteStar);
|
||||
_PlayerNotes[n].PerfectNoteEffect.Add(stars);
|
||||
}
|
||||
|
||||
@@ -692,7 +692,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
private void DrawToneHelper(int n, int BaseLine, float XOffset)
|
||||
{
|
||||
int TonePlayer = CBase.Base.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
int TonePlayer = CBase.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
|
||||
SRectF Rect = _PlayerNotes[n].Rect;
|
||||
|
||||
@@ -708,10 +708,10 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
if (XOffset > Rect.W)
|
||||
XOffset = Rect.W;
|
||||
|
||||
float dy = Rect.H / (CBase.Base.Settings.GetNumNoteLines());
|
||||
float dy = Rect.H / (CBase.Settings.GetNumNoteLines());
|
||||
SRectF rect = new SRectF(
|
||||
Rect.X - dy + XOffset,
|
||||
Rect.Y + dy * (CBase.Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
Rect.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
Rect.Z
|
||||
@@ -723,8 +723,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
STexture ToneHelper = CBase.Base.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
STexture ToneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
|
||||
|
||||
while (TonePlayer - BaseLine < 12)
|
||||
@@ -735,13 +735,13 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
rect = new SRectF(
|
||||
Rect.X - dy + XOffset,
|
||||
Rect.Y + dy * (CBase.Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
Rect.Y + dy * (CBase.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
CBase.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
}
|
||||
|
||||
#region ThemeEdit
|
||||
|
||||
@@ -116,11 +116,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (this.CoverFileName != String.Empty)
|
||||
{
|
||||
if (!CBase.Base.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Base.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
if (!CBase.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Cover.GetNoCover();
|
||||
}
|
||||
else
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
_CoverTextureSmall = CBase.Cover.GetNoCover();
|
||||
|
||||
_CoverLoaded = true;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
this.Folder = Path.GetDirectoryName(FilePath);
|
||||
|
||||
foreach (string folder in CBase.Base.Config.GetSongFolder())
|
||||
foreach (string folder in CBase.Config.GetSongFolder())
|
||||
{
|
||||
if (this.Folder.Contains(folder))
|
||||
{
|
||||
@@ -431,7 +431,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -481,7 +481,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (File.Exists(Path.Combine(this.Folder, Value)))
|
||||
this.VideoFileName = Value;
|
||||
else
|
||||
CBase.Base.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
|
||||
break;
|
||||
case "VIDEOGAP":
|
||||
@@ -537,25 +537,25 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Title) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("Title tag missing: " + FilePath);
|
||||
CBase.Log.LogError("Title tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Artist) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("Artist tag missing: " + FilePath);
|
||||
CBase.Log.LogError("Artist tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.MP3) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
CBase.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.BPM) == 0)
|
||||
{
|
||||
CBase.Base.Log.LogError("BPM tag missing: " + FilePath);
|
||||
CBase.Log.LogError("BPM tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (this.Medley.StartBeat > this.Medley.EndBeat)
|
||||
{
|
||||
CBase.Base.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
CBase.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
HeaderFlags = HeaderFlags - EHeaderFlags.MedleyStartBeat - EHeaderFlags.MedleyEndBeat;
|
||||
}
|
||||
}
|
||||
@@ -574,7 +574,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//PreviewStart is not set or <=0
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0)
|
||||
//fallback to MedleyStart
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
else
|
||||
//else set to 0, it will be set in FindRefrainStart
|
||||
this.PreviewStart = 0f;
|
||||
@@ -583,8 +583,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0 && (HeaderFlags & EHeaderFlags.MedleyEndBeat) != 0)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Tag;
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
#endregion check medley tags
|
||||
|
||||
@@ -592,7 +592,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
CBase.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (!File.Exists(FilePath))
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (sr.EndOfStream || (line.Length == 0))
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". The file is empty or it starts with an empty line: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". The file is empty or it starts with an empty line: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Player = 2;
|
||||
else
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -723,7 +723,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (isNewSentence)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -765,7 +765,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
CBase.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
return false;
|
||||
}
|
||||
FindRefrain();
|
||||
@@ -844,12 +844,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (DuetPart1 == String.Empty)
|
||||
{
|
||||
DuetPart1 = "Part 1";
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
if (DuetPart2 == String.Empty)
|
||||
{
|
||||
DuetPart2 = "Part 2";
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,7 +930,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
// set medley vars
|
||||
if (series.Count > 0 && series[longest].length > CBase.Base.Settings.GetMedleyMinSeriesLength())
|
||||
if (series.Count > 0 && series[longest].length > CBase.Settings.GetMedleyMinSeriesLength())
|
||||
{
|
||||
this.Medley.StartBeat = lines.Line[series[longest].start].FirstNoteBeat;
|
||||
this.Medley.EndBeat = lines.Line[series[longest].end].LastNoteBeat;
|
||||
@@ -938,16 +938,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool foundEnd = false;
|
||||
|
||||
// set end if duration > MedleyMinDuration
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
if (CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Settings.GetMedleyMinDuration() >
|
||||
CBase.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
foundEnd = true;
|
||||
|
||||
if (!foundEnd)
|
||||
{
|
||||
for (int i = series[longest].start + 1; i < lines.LineCount - 1; i++)
|
||||
{
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
if (CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Settings.GetMedleyMinDuration() >
|
||||
CBase.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
{
|
||||
foundEnd = true;
|
||||
this.Medley.EndBeat = lines.Line[i].LastNoteBeat;
|
||||
@@ -958,15 +958,15 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (foundEnd)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Calculated;
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.PreviewStart == 0f)
|
||||
{
|
||||
if (this.Medley.Source == EMedleySource.Calculated)
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public void UpdateSongMenuType()
|
||||
{
|
||||
if (_Type != CBase.Base.Config.GetSongMenuType())
|
||||
if (_Type != CBase.Config.GetSongMenuType())
|
||||
CreateSongMenu();
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_SongMenu.OnHide();
|
||||
}
|
||||
|
||||
switch (CBase.Base.Config.GetSongMenuType())
|
||||
switch (CBase.Config.GetSongMenuType())
|
||||
{
|
||||
//case ESongMenu.TR_CONFIG_LIST:
|
||||
// _SongMenu = new CSongMenuList();
|
||||
@@ -225,7 +225,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
// break;
|
||||
}
|
||||
|
||||
_Type = CBase.Base.Config.GetSongMenuType();
|
||||
_Type = CBase.Config.GetSongMenuType();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
_ThemeLoaded &= CBase.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -441,17 +441,17 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_streams.Count > 0 && _video != -1)
|
||||
{
|
||||
if (CBase.Base.Video.IsFinished(_video) || CBase.Base.Sound.IsFinished(_actsongstream))
|
||||
if (CBase.Video.IsFinished(_video) || CBase.Sound.IsFinished(_actsongstream))
|
||||
{
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
float time = CBase.Base.Sound.GetPosition(_actsongstream);
|
||||
float time = CBase.Sound.GetPosition(_actsongstream);
|
||||
|
||||
float vtime = 0f;
|
||||
CBase.Base.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
CBase.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
{
|
||||
_vidtex.color.A = (_VideoFadeTimer.ElapsedMilliseconds / 3000f);
|
||||
@@ -474,14 +474,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
@@ -507,7 +507,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_video != -1)
|
||||
{
|
||||
CBase.Base.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
CBase.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -518,7 +518,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Init();
|
||||
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
_Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
_Color = CBase.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -593,11 +593,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (Category >= CBase.Base.Songs.GetNumCategories())
|
||||
if (Category >= CBase.Songs.GetNumCategories())
|
||||
return;
|
||||
|
||||
Reset();
|
||||
CBase.Base.Songs.SetCategory(Category);
|
||||
CBase.Songs.SetCategory(Category);
|
||||
}
|
||||
|
||||
protected virtual void ShowCategories()
|
||||
@@ -605,59 +605,59 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1)
|
||||
Reset();
|
||||
|
||||
Reset();
|
||||
CBase.Base.Songs.SetCategory(-1);
|
||||
CBase.Songs.SetCategory(-1);
|
||||
}
|
||||
|
||||
public void ApplyVolume()
|
||||
{
|
||||
CBase.Base.Sound.SetStreamVolume(_actsongstream, CBase.Base.Config.GetPreviewMusicVolume());
|
||||
CBase.Sound.SetStreamVolume(_actsongstream, CBase.Config.GetPreviewMusicVolume());
|
||||
}
|
||||
|
||||
protected void SelectSong(int nr)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Base.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_actsong = nr;
|
||||
if (_actsong >= CBase.Base.Songs.GetNumVisibleSongs())
|
||||
if (_actsong >= CBase.Songs.GetNumVisibleSongs())
|
||||
_actsong = 0;
|
||||
|
||||
|
||||
int _stream = CBase.Base.Sound.Load(Path.Combine(CBase.Base.Songs.GetVisibleSong(_actsong).Folder, CBase.Base.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Base.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
CBase.Base.Sound.SetStreamVolume(_stream, 0f);
|
||||
int _stream = CBase.Sound.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
CBase.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
CBase.Sound.SetStreamVolume(_stream, 0f);
|
||||
|
||||
float startposition = CBase.Base.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
float startposition = CBase.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
|
||||
if (startposition == 0f)
|
||||
startposition = CBase.Base.Sound.GetLength(_stream) / 4f;
|
||||
startposition = CBase.Sound.GetLength(_stream) / 4f;
|
||||
|
||||
CBase.Base.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Base.Sound.Play(_stream);
|
||||
CBase.Base.Sound.Fade(_stream, 100f, 3f);
|
||||
CBase.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Sound.Play(_stream);
|
||||
CBase.Sound.Fade(_stream, 100f, 3f);
|
||||
_streams.Add(_stream);
|
||||
_actsongstream = _stream;
|
||||
|
||||
if (CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && CBase.Base.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_video = CBase.Base.Video.Load(Path.Combine(CBase.Base.Songs.GetVisibleSong(_actsong).Folder, CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
_video = CBase.Video.Load(Path.Combine(CBase.Songs.GetVisibleSong(_actsong).Folder, CBase.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
if (_video == -1)
|
||||
return;
|
||||
CBase.Base.Video.Skip(_video, startposition, CBase.Base.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
CBase.Video.Skip(_video, startposition, CBase.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
_VideoFadeTimer.Stop();
|
||||
_VideoFadeTimer.Reset();
|
||||
_VideoFadeTimer.Start();
|
||||
@@ -669,14 +669,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
CBase.Base.Video.Close(_video);
|
||||
CBase.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
|
||||
@@ -67,8 +67,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -82,7 +82,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
|
||||
_PreviewSelected = -1;
|
||||
_Offset = 0;
|
||||
@@ -116,7 +116,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Base.Songs.GetNumCategories() > 0 && CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Songs.GetNumCategories() > 0 && CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
EnterCategory(0);
|
||||
}
|
||||
@@ -127,13 +127,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//AfterCategoryChange();
|
||||
SetSelectedSong(_ActSong);
|
||||
AfterCategoryChange();
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
CBase.Songs.UpdateRandomSongList();
|
||||
|
||||
int actcat = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
if ((CBase.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
{
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(0).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(0).Name;
|
||||
_CoverBig.Texture = CBase.Songs.GetCategory(0).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Songs.GetCategory(0).Name;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_PreviewSelected = 0;
|
||||
@@ -144,7 +144,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyTagIcon.Visible = false;
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() == 0 && CBase.Base.Songs.GetSearchFilter() != String.Empty)
|
||||
if (CBase.Songs.GetNumVisibleSongs() == 0 && CBase.Songs.GetSearchFilter() != String.Empty)
|
||||
{
|
||||
_CoverBig.Texture = _CoverBigTexture;
|
||||
_Artist.Text = String.Empty;
|
||||
@@ -205,7 +205,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.Enter:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0)
|
||||
{
|
||||
EnterCategory(_PreviewSelected);
|
||||
KeyEvent.Handled = true;
|
||||
@@ -218,71 +218,71 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
case Keys.Escape:
|
||||
case Keys.Back:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
KeyEvent.Handled = true;
|
||||
}
|
||||
//else if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//else if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//{
|
||||
// CGraphics.FadeTo(EScreens.ScreenMain);
|
||||
//}
|
||||
break;
|
||||
|
||||
case Keys.PageUp:
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.PageDown:
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked--;
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && _Locked < CBase.Base.Songs.GetNumCategories() - _NumW ||
|
||||
CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && _Locked < CBase.Songs.GetNumCategories() - _NumW ||
|
||||
CBase.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Right:
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - 1)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - 1)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked -= _NumW;
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
@@ -290,28 +290,28 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
@@ -341,13 +341,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool sel = false;
|
||||
int lastselection = _actualSelection;
|
||||
|
||||
if (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
if ((tile.Texture.index != _CoverTexture.index) && CHelper.IsInBounds(tile.Rect, MouseEvent) && !sel)
|
||||
{
|
||||
if (MouseEvent.LB || CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (MouseEvent.LB || CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (_PreviewSelected == i + _Offset)
|
||||
_Locked = _PreviewSelected;
|
||||
@@ -372,29 +372,29 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
sel = true;
|
||||
|
||||
if (MouseEvent.Sender == ESender.WiiMote && _actualSelection != lastselection && _actualSelection != -1)
|
||||
CBase.Base.Input.SetRumble(0.050f);
|
||||
CBase.Input.SetRumble(0.050f);
|
||||
|
||||
if (!sel)
|
||||
_actualSelection = -1;
|
||||
|
||||
if ((MouseEvent.RB) && (CBase.Base.Songs.GetNumCategories() > 0) && CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if ((MouseEvent.RB) && (CBase.Songs.GetNumCategories() > 0) && CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
MouseEvent.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if (MouseEvent.RB && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
else if (MouseEvent.RB && CBase.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
}
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && CBase.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
if (CHelper.IsInBounds(_CoverBig.Rect, MouseEvent) || CHelper.IsInBounds(_TextBG.Rect, MouseEvent))
|
||||
{
|
||||
_Locked = _PreviewSelected;
|
||||
}
|
||||
}
|
||||
else if ((MouseEvent.LB) && (CBase.Base.Songs.GetCurrentCategoryIndex() == -1))
|
||||
else if ((MouseEvent.LB) && (CBase.Songs.GetCurrentCategoryIndex() == -1))
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
@@ -409,10 +409,10 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel > 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Base.Songs.GetNumVisibleSongs() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1) ||
|
||||
CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && CBase.Base.Songs.GetNumCategories() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1))
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Songs.GetNumVisibleSongs() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1) ||
|
||||
CBase.Songs.GetCurrentCategoryIndex() < 0 && CBase.Songs.GetNumCategories() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
UpdateList(_Offset);
|
||||
@@ -422,7 +422,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel < 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
if (_Offset < 0)
|
||||
@@ -449,12 +449,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
int actsong = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
if ((CBase.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
{
|
||||
CSong song = CBase.Base.Songs.GetVisibleSong(actsong);
|
||||
CSong song = CBase.Songs.GetVisibleSong(actsong);
|
||||
|
||||
_CoverBig.Texture = song.CoverTextureSmall;
|
||||
_Artist.Text = song.Artist;
|
||||
@@ -464,7 +464,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
|
||||
_MedleyTagIcon.Visible = song.Medley.Source == EMedleySource.Tag;
|
||||
|
||||
float Time = CBase.Base.Sound.GetLength(_SongStream);
|
||||
float Time = CBase.Sound.GetLength(_SongStream);
|
||||
if (song.Finish != 0)
|
||||
Time = song.Finish;
|
||||
|
||||
@@ -477,16 +477,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
else
|
||||
{
|
||||
int actcat = _PreviewSelected;
|
||||
if ((CBase.Base.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
if ((CBase.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
{
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(actcat).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(actcat).Name;
|
||||
_CoverBig.Texture = CBase.Songs.GetCategory(actcat).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Songs.GetCategory(actcat).Name;
|
||||
|
||||
int num = CBase.Base.Songs.NumSongsInCategory(actcat);
|
||||
int num = CBase.Songs.NumSongsInCategory(actcat);
|
||||
if (num != 1)
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
else
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
|
||||
_SongLength.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
@@ -508,9 +508,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
RectangleF rect = new RectangleF(0f, 0f, _vidtex.width, _vidtex.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
CBase.Base.Drawing.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Drawing.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
_vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), false);
|
||||
CBase.Base.Drawing.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Drawing.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
_vidtex.color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f), _CoverBig.ReflectionSpace, _CoverBig.ReflectionHeight);
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (VisibleSongNr < 0)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
if (CBase.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -605,7 +605,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (CategoryNr < 0)
|
||||
return;
|
||||
|
||||
if (CBase.Base.Songs.GetNumCategories() > CategoryNr)
|
||||
if (CBase.Songs.GetNumCategories() > CategoryNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -678,19 +678,19 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private void NextCategory()
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
CBase.Base.Songs.NextCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Songs.NextCategory();
|
||||
EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
private void PrevCategory()
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
CBase.Base.Songs.PrevCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Songs.PrevCategory();
|
||||
EnterCategory(CBase.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,26 +707,26 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (_actualSelection >= 0 && _actualSelection < _Tiles.Count)
|
||||
_Tiles[_actualSelection].Selected = true;
|
||||
|
||||
if ((_LastKnownNumSongs == CBase.Base.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == CBase.Base.Songs.GetCurrentCategoryIndex()))
|
||||
if ((_LastKnownNumSongs == CBase.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == CBase.Songs.GetCurrentCategoryIndex()))
|
||||
return;
|
||||
|
||||
_LastKnownCategory = CBase.Base.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = CBase.Base.Songs.GetNumVisibleSongs();
|
||||
_LastKnownCategory = CBase.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = CBase.Songs.GetNumVisibleSongs();
|
||||
UpdateList(0);
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
CBase.Songs.UpdateRandomSongList();
|
||||
}
|
||||
|
||||
private void UpdateList(int offset)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
if (offset >= (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset >= (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
|
||||
if (offset < 0)
|
||||
@@ -734,11 +734,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
{
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > i + offset)
|
||||
if (CBase.Songs.GetNumVisibleSongs() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -748,11 +748,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (CBase.Base.Songs.GetNumCategories() > i + offset)
|
||||
if (CBase.Songs.GetNumCategories() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -779,8 +779,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRectSmall.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRectSmall.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -795,7 +795,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRectSmall;
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -805,8 +805,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_TileW = (int)((_Theme.songMenuTileBoard.TileRect.W - _SpaceW * (_NumW - 1)) / _NumW);
|
||||
_TileH = (int)((_Theme.songMenuTileBoard.TileRect.H - _SpaceH * (_NumH - 1)) / _NumH);
|
||||
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -821,7 +821,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRect;
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
}
|
||||
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
|
||||
@@ -8,7 +8,6 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public abstract class CPartyMode : IPartyMode
|
||||
{
|
||||
protected Basic _Base;
|
||||
protected ScreenSongOptions _ScreenSongOptions;
|
||||
protected Dictionary<string, CMenuParty> _Screens;
|
||||
protected string _Folder;
|
||||
@@ -28,9 +27,8 @@ namespace Vocaluxe.PartyModes
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Initialize(Basic Base)
|
||||
public void Initialize()
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
public void AddScreen(CMenuParty Screen, string ScreenName)
|
||||
@@ -122,17 +120,17 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public virtual void FinishedSinging()
|
||||
{
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenScore);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenScore);
|
||||
}
|
||||
|
||||
public virtual void LeavingScore()
|
||||
{
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenHighscore);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenHighscore);
|
||||
}
|
||||
|
||||
public virtual void LeavingHighscore()
|
||||
{
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenSong);
|
||||
CBase.Graphics.FadeTo(EScreens.ScreenSong);
|
||||
}
|
||||
#endregion Implementation
|
||||
}
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
public override ScreenSongOptions GetScreenSongOptions()
|
||||
{
|
||||
_ScreenSongOptions.Sorting.SongSorting = _Base.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = _Base.Config.GetTabs();
|
||||
_ScreenSongOptions.Sorting.SongSorting = CBase.Config.GetSongSorting();
|
||||
_ScreenSongOptions.Sorting.Tabs = CBase.Config.GetTabs();
|
||||
|
||||
if (_ScreenSongOptions.Sorting.SearchActive)
|
||||
_ScreenSongOptions.Sorting.Tabs = EOffOn.TR_CONFIG_OFF;
|
||||
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = _Base.Config.GetIgnoreArticles();
|
||||
_ScreenSongOptions.Sorting.IgnoreArticles = CBase.Config.GetIgnoreArticles();
|
||||
|
||||
return _ScreenSongOptions;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Vocaluxe.PartyModes
|
||||
public interface IPartyMode
|
||||
{
|
||||
bool Init();
|
||||
void Initialize(Basic Base);
|
||||
void Initialize();
|
||||
void AddScreen(CMenuParty Screen, string ScreenName);
|
||||
void DataFromScreen(string ScreenName, Object Data);
|
||||
|
||||
|
||||
Reference in new issue
Block a user