changed base handling in VocaluxeLib
This commit is contained in:
1 parent
08658e20e3
commit
b4f77d50b2
42 files changed
+801
-924
No files matched your search
@@ -63,7 +63,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Base.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 = _Base.Config.GetMaxNumMics();
|
||||
_MaxNumMics = CBase.Base.Config.GetMaxNumMics();
|
||||
if (_MaxNumMics > 6)
|
||||
_MaxNumMics = 6;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Base.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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.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 = _Base.Theme.GetPlayerColor((i + 1));
|
||||
NextPlayerTexts[i].Color = CBase.Base.Theme.GetPlayerColor((i + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -432,7 +432,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = _Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Base.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 + (_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
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;
|
||||
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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profile = CBase.Base.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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < PlayerTable.Count; i++)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Vocaluxe.PartyModes
|
||||
private string GetPlayerWinString()
|
||||
{
|
||||
string s = "";
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < GameState.ResultTable.Count; i++)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.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 = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
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.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 < _Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.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 = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
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].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 = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
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].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Base.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 = _Base.Config.GetMaxNumMics();
|
||||
_MaxNumMics = CBase.Base.Config.GetMaxNumMics();
|
||||
if (_MaxNumMics > 6)
|
||||
_MaxNumMics = 6;
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Settings.GetRenderW()/2 - ((GameState.NumPlayerAtOnce * Statics[htStatics(StaticNextPlayer)].Rect.W) + ((GameState.NumPlayerAtOnce-1) * 15))/2;
|
||||
float x = CBase.Base.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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.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 = _Base.Theme.GetPlayerColor((i + 1));
|
||||
NextPlayerTexts[i].Color = CBase.Base.Theme.GetPlayerColor((i + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -432,7 +432,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
RoundsTableScrollArea.X = x;
|
||||
RoundsTableScrollArea.Y = y;
|
||||
RoundsTableScrollArea.W = _Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20;
|
||||
RoundsTableScrollArea.W = CBase.Base.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 + (_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow * (column - row * NumPlayerInOneRow) + ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2;
|
||||
float maxw = ((_Base.Settings.GetRenderW() - Texts[htTexts(TextRoundNumber)].X - 20) / NumPlayerInThisRow) / 2 - 5;
|
||||
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;
|
||||
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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profile = CBase.Base.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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < PlayerTable.Count; i++)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace Vocaluxe.PartyModes
|
||||
private string GetPlayerWinString()
|
||||
{
|
||||
string s = "";
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.Profiles.GetProfiles();
|
||||
|
||||
for (int i = 0; i < GameState.ResultTable.Count; i++)
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen challenge names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.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 = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
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.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 < _Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.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 = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDs[i]].PlayerName;
|
||||
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].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 = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
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].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen TicTacToe config. Can't cast received data from game mode " + _ThemeName + ". " + e.Message);;
|
||||
CBase.Base.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 (_Base.Config.GetMaxNumMics() >= 2)
|
||||
if (CBase.Base.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 = _Base.Playlist.GetPlaylistNames();
|
||||
string[] _Playlists = CBase.Base.Playlist.GetPlaylistNames();
|
||||
SelectSlides[htSelectSlides(SelectSlidePlaylist)].Clear();
|
||||
for (int i = 0; i < _Playlists.Length; i++)
|
||||
{
|
||||
string value = _Playlists[i] + " (" + _Base.Playlist.GetPlaylistSongCount(i) + " " + _Base.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
string value = _Playlists[i] + " (" + CBase.Base.Playlist.GetPlaylistSongCount(i) + " " + CBase.Base.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[_Base.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < _Base.Songs.GetNumCategories(); i++ )
|
||||
string[] _Categories = new string[CBase.Base.Songs.GetNumCategories()];
|
||||
for (int i = 0; i < CBase.Base.Songs.GetNumCategories(); i++ )
|
||||
{
|
||||
_Categories[i] = _Base.Songs.GetCategory(i).Name;
|
||||
_Categories[i] = CBase.Base.Songs.GetCategory(i).Name;
|
||||
}
|
||||
SelectSlides[htSelectSlides(SelectSlideCategory)].Clear();
|
||||
for (int i = 0; i < _Categories.Length; i++)
|
||||
{
|
||||
string value = _Categories[i] + " (" + _Base.Songs.NumSongsInCategory(i) + " " + _Base.Language.Translate("TR_SONGS", _PartyModeID) + ")";
|
||||
string value = _Categories[i] + " (" + CBase.Base.Songs.NumSongsInCategory(i) + " " + CBase.Base.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 (_Base.Playlist.GetNumPlaylists() > 0)
|
||||
if (_Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID) > 0)
|
||||
if (CBase.Base.Playlist.GetNumPlaylists() > 0)
|
||||
if (CBase.Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID) > 0)
|
||||
{
|
||||
ConfigOk = false;
|
||||
for (int i = 0; i < _Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(Data.ScreenConfig.PlaylistID); i++)
|
||||
{
|
||||
int id = _Base.Playlist.GetPlaylistSong(Data.ScreenConfig.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in _Base.Songs.GetSongByID(id).AvailableGameModes)
|
||||
int id = CBase.Base.Playlist.GetPlaylistSong(Data.ScreenConfig.PlaylistID, i).SongID;
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetSongByID(id).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
@@ -286,14 +286,14 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (Data.ScreenConfig.SongSource == ESongSource.TR_CATEGORY)
|
||||
{
|
||||
if (_Base.Songs.GetNumCategories() > 0)
|
||||
if (_Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID) > 0)
|
||||
if (CBase.Base.Songs.GetNumCategories() > 0)
|
||||
if (CBase.Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID) > 0)
|
||||
{
|
||||
_Base.Songs.SetCategory(Data.ScreenConfig.CategoryID);
|
||||
CBase.Base.Songs.SetCategory(Data.ScreenConfig.CategoryID);
|
||||
ConfigOk = false;
|
||||
for (int i = 0; i < _Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID); i++)
|
||||
for (int i = 0; i < CBase.Base.Songs.NumSongsInCategory(Data.ScreenConfig.CategoryID); i++)
|
||||
{
|
||||
foreach (EGameMode mode in _Base.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetVisibleSong(i).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
@@ -302,7 +302,7 @@ namespace Vocaluxe.PartyModes
|
||||
if (ConfigOk)
|
||||
break;
|
||||
}
|
||||
_Base.Songs.SetCategory(-1);
|
||||
CBase.Base.Songs.SetCategory(-1);
|
||||
}
|
||||
else
|
||||
ConfigOk = false;
|
||||
@@ -311,11 +311,11 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
if (Data.ScreenConfig.SongSource == ESongSource.TR_ALLSONGS)
|
||||
{
|
||||
if (_Base.Songs.GetNumSongs() > 0)
|
||||
if (CBase.Base.Songs.GetNumSongs() > 0)
|
||||
{
|
||||
for (int i = 0; i < _Base.Songs.GetNumSongs(); i++)
|
||||
for (int i = 0; i < CBase.Base.Songs.GetNumSongs(); i++)
|
||||
{
|
||||
foreach (EGameMode mode in _Base.Songs.GetSongByID(i).AvailableGameModes)
|
||||
foreach (EGameMode mode in CBase.Base.Songs.GetSongByID(i).AvailableGameModes)
|
||||
if (mode == gm)
|
||||
{
|
||||
ConfigOk = true;
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen TicTacToe main. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Theme.GetPlayerColor(Winner);
|
||||
Texts[htTexts(TextFinishMessage)].Text = _Base.Language.Translate("TR_SCREENMAIN_WINNER", _PartyModeID) + " " + _Base.Language.Translate("TR_TEAM", _PartyModeID) + " " + Winner;
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = new SColorF(1, 1, 1, 1);
|
||||
Texts[htTexts(TextFinishMessage)].Text = _Base.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
Texts[htTexts(TextFinishMessage)].Text = CBase.Base.Language.Translate("TR_SCREENMAIN_NOWINNER", _PartyModeID);
|
||||
}
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
|
||||
}
|
||||
@@ -363,8 +363,8 @@ namespace Vocaluxe.PartyModes
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
_Base.BackgroundMusic.SetStatus(false);
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Base.BackgroundMusic.SetStatus(false);
|
||||
CBase.Base.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 = (_Base.Settings.GetRenderH() - 150 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeX = (_Base.Settings.GetRenderW() - 300 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeY = (CBase.Base.Settings.GetRenderH() - 150 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
float FieldSizeX = (CBase.Base.Settings.GetRenderW() - 300 - NumOneRow * FieldSpace) / NumOneRow;
|
||||
if (FieldSizeX < FieldSizeY)
|
||||
FieldSize = FieldSizeX;
|
||||
else
|
||||
FieldSize = FieldSizeY;
|
||||
FieldFirstX = _Base.Settings.GetRenderW() / 2 - (NumOneRow * FieldSize + (NumOneRow - 1) * FieldSpace) / 2;
|
||||
FieldFirstY = 140 + (_Base.Settings.GetRenderH() - 140) / 2 - (NumOneRow * FieldSize + NumOneRow * FieldSpace) / 2;
|
||||
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;
|
||||
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 = _Base.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Color = _Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
Fields[i].Button.SColor = _Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
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);
|
||||
}
|
||||
if (Status == EStatus.FieldSelected && SelectedField == i)
|
||||
{
|
||||
Fields[i].Button.Texture = _Base.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Texture = CBase.Base.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 = _Base.Theme.GetPlayerColor(GameData.Team+1);
|
||||
Fields[i].Button.SColor = CBase.Base.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 = _Base.Songs.GetSongByID(SongID);
|
||||
Menu.SongMenu.CSong Song = CBase.Base.Songs.GetSongByID(SongID);
|
||||
|
||||
_Base.BackgroundMusic.SetStatus(true);
|
||||
CBase.Base.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
_Base.Sound.Play(PreviewStream);
|
||||
_Base.Sound.Fade(PreviewStream, _Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
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);
|
||||
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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.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 = _Base.Songs.GetSongByID(SongID);
|
||||
_Base.BackgroundMusic.SetStatus(true);
|
||||
Menu.SongMenu.CSong Song = CBase.Base.Songs.GetSongByID(SongID);
|
||||
CBase.Base.BackgroundMusic.SetStatus(true);
|
||||
|
||||
PreviewStream = _Base.Sound.Load(Song.GetMP3(), false);
|
||||
_Base.Sound.SetPosition(PreviewStream, Song.PreviewStart);
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
_Base.Sound.Play(PreviewStream);
|
||||
_Base.Sound.Fade(PreviewStream, _Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
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);
|
||||
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 = _Base.Profiles.GetProfiles();
|
||||
SProfile[] profiles = CBase.Base.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 (!_Base.Sound.IsFinished(PreviewStream))
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
if (!CBase.Base.Sound.IsFinished(PreviewStream))
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
FieldSelected();
|
||||
}
|
||||
break;
|
||||
@@ -581,8 +581,8 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
GameData.NumJokerRetry[TeamNr]--;
|
||||
GameData.Team = TeamNr;
|
||||
if (!_Base.Sound.IsFinished(PreviewStream))
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
if (!CBase.Base.Sound.IsFinished(PreviewStream))
|
||||
CBase.Base.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 = _Base.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[htTexts(TextTeamChoosing)].Text = _Base.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + _Base.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
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);
|
||||
if (Status == EStatus.JokerRetry || Status == EStatus.FieldChoosing)
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = true;
|
||||
else
|
||||
@@ -621,7 +621,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void NextRound()
|
||||
{
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Base.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()
|
||||
{
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
FadeTo(EScreens.ScreenParty);
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
private void Back()
|
||||
{
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0f, 0.5f);
|
||||
CBase.Base.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)
|
||||
{
|
||||
_Base.Log.LogError("Error in party mode screen TicTacToe names. Can't cast received data from game mode " + _ThemeName + ". " + e.Message); ;
|
||||
CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].Avatar.Texture;
|
||||
chooseAvatarStatic.Texture = CBase.Base.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 = _Base.Profiles.GetProfiles()[SelectedPlayerNr].PlayerName;
|
||||
PlayerDestinationButtons[added].Text.Text = CBase.Base.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 = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].PlayerName;
|
||||
PlayerChooseButtons[i].Button.Texture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
PlayerChooseButtons[i].Button.STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtonsVisibleProfiles[i + Offset * NumButtonPlayerChoose]].Avatar.Texture;
|
||||
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.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 < _Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.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 = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].STexture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i].Text.Text = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam1[i]].PlayerName;
|
||||
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].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 = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].STexture = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].Avatar.Texture;
|
||||
PlayerDestinationButtons[i + PlayerDestinationButtonsNumH].Text.Text = _Base.Profiles.GetProfiles()[Data.ScreenNames.ProfileIDsTeam2[i]].PlayerName;
|
||||
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].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 = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
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].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 = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].STexture = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
||||
PlayerDestinationButtons[added].Text.Text = _Base.Profiles.GetProfiles()[PlayerChooseButtons[i].ProfileID].PlayerName;
|
||||
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].Enabled = true;
|
||||
//Update Tiles-List
|
||||
UpdateButtonPlayerChoose();
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
CNote nt = _Player[p].SingLine[Line].LastNote;
|
||||
if (notes[Note].StartBeat == beat || nt.EndBeat + 1 != beat || nt.Tone != Tone)
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
|
||||
else
|
||||
{
|
||||
_Player[p].SingLine[Line].IncLastNoteLength();
|
||||
@@ -327,7 +327,7 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
else
|
||||
{
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, Tone, String.Empty, true, notes[Note].NoteType));
|
||||
}
|
||||
|
||||
_Player[p].SingLine[Line].LastNote.IsPerfect(notes[Note]);
|
||||
@@ -339,7 +339,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
CNote nt = _Player[p].SingLine[Line].LastNote;
|
||||
if (nt.EndBeat + 1 != beat || nt.Hit)
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
else
|
||||
{
|
||||
if (nt.Tone == TonePlayer && nt.EndBeat + 1 == beat)
|
||||
@@ -348,13 +348,13 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
else
|
||||
{
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(CMain.Base, beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
_Player[p].SingLine[Line].AddNote(new CNote(beat, 1, TonePlayer, String.Empty, false, ENoteType.Freestyle));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -251,14 +251,14 @@ namespace Vocaluxe.Base
|
||||
for (int i = 0; i < _Screens.Count; i++)
|
||||
{
|
||||
CLog.StartBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
|
||||
_Screens[i].Initialize(CMain.Base);
|
||||
_Screens[i].Initialize();
|
||||
_Screens[i].LoadTheme(CTheme.GetThemeScreensPath(-1));
|
||||
CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
||||
{
|
||||
_PopupScreens[i].Initialize(CMain.Base);
|
||||
_PopupScreens[i].Initialize();
|
||||
_PopupScreens[i].LoadTheme(CTheme.GetThemeScreensPath(-1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
if (Screen != null)
|
||||
{
|
||||
Screen.Initialize(CMain.Base);
|
||||
Screen.Initialize();
|
||||
Screen.AssingPartyMode(pm.PartyMode);
|
||||
Screen.SetPartyModeID(pm.PartyModeID);
|
||||
Screen.LoadTheme(XmlPath);
|
||||
|
||||
@@ -1022,7 +1022,7 @@ namespace Vocaluxe.Base
|
||||
CLog.StartBenchmark(2, "Read TXTs");
|
||||
foreach (string file in files)
|
||||
{
|
||||
CSong Song = new CSong(CMain.Base);
|
||||
CSong Song = new CSong();
|
||||
if (Song.ReadTXTSong(file))
|
||||
{
|
||||
Song.ID = _Songs.Count;
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ namespace Vocaluxe
|
||||
{
|
||||
// Init Log
|
||||
CLog.Init();
|
||||
CXMLReader.Base = CMain.Base;
|
||||
CBase.Base = CMain.Base;
|
||||
|
||||
CSettings.CreateFolders();
|
||||
Application.DoEvents();
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Vocaluxe.Screens
|
||||
if (index >= _PartyModeInfos.Count)
|
||||
return;
|
||||
|
||||
if (_Base.Config.GetMaxNumMics() == 0)
|
||||
if (CMain.Base.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 < _Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Base.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 < _Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Base.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 < _Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Base.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 < _Base.Settings.GetMaxNumPlayer(); i++)
|
||||
for (int i = 0; i < CMain.Base.Settings.GetMaxNumPlayer(); i++)
|
||||
{
|
||||
Buttons[htButtons(ButtonsJoker[i])].Visible = false;
|
||||
Texts[htTexts(TextsPlayer[i])].Visible = false;
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace Vocaluxe.Menu
|
||||
public class CBackground : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeBackground _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -42,10 +41,9 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
#region Constructors
|
||||
public CBackground(Basic Base, int PartyModeID)
|
||||
public CBackground(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_ThemeLoaded = false;
|
||||
_Theme = new SThemeBackground();
|
||||
|
||||
@@ -67,7 +65,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -129,27 +127,27 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
_Base.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Theme.VideoName != String.Empty && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
CBase.Base.Theme.SkinVideoResume(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
if (_Theme.VideoName != String.Empty)
|
||||
_Base.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
|
||||
CBase.Base.Theme.SkinVideoPause(_Theme.VideoName, _PartyModeID);
|
||||
}
|
||||
|
||||
public bool Draw()
|
||||
{
|
||||
bool ok = false;
|
||||
if (_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON &&
|
||||
_Base.Config.GetVideosToBackground() == EOffOn.TR_CONFIG_ON && _Base.BackgroundMusic.IsPlaying() && _Base.BackgroundMusic.SongHasVideo() &&
|
||||
_Base.BackgroundMusic.VideoEnabled() && !_Base.BackgroundMusic.IsDisabled())
|
||||
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())
|
||||
{
|
||||
Pause();
|
||||
ok = DrawBackgroundMusicVideo();
|
||||
}
|
||||
else if (_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
else if (_Theme.Type == EBackgroundTypes.Video && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
Resume();
|
||||
ok = DrawVideo();
|
||||
@@ -157,11 +155,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (_Theme.TextureName != String.Empty &&
|
||||
(_Theme.Type == EBackgroundTypes.Texture ||
|
||||
(_Theme.Type == EBackgroundTypes.Video && (_Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
|
||||
(_Theme.Type == EBackgroundTypes.Video && (CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF || !ok))))
|
||||
ok = DrawTexture();
|
||||
|
||||
if (_Theme.Type == EBackgroundTypes.Color || _Theme.Type == EBackgroundTypes.Texture && !ok ||
|
||||
(_Theme.Type == EBackgroundTypes.Video && _Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF && !ok))
|
||||
(_Theme.Type == EBackgroundTypes.Video && CBase.Base.Config.GetVideoBackgrounds() == EOffOn.TR_CONFIG_OFF && !ok))
|
||||
DrawColor();
|
||||
|
||||
return true;
|
||||
@@ -174,7 +172,7 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -187,21 +185,21 @@ namespace Vocaluxe.Menu
|
||||
#region internal
|
||||
private void DrawColor()
|
||||
{
|
||||
SRectF bounds = new SRectF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), _Base.Settings.GetZFar()/4);
|
||||
SRectF bounds = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), CBase.Base.Settings.GetZFar()/4);
|
||||
|
||||
_Base.Drawing.DrawColor(Color, bounds);
|
||||
CBase.Base.Drawing.DrawColor(Color, bounds);
|
||||
}
|
||||
|
||||
private bool DrawTexture()
|
||||
{
|
||||
STexture Texture = _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
STexture Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
if (Texture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, Texture.width, Texture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
_Base.Drawing.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
|
||||
CBase.Base.Drawing.DrawTexture(Texture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -209,14 +207,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private bool DrawVideo()
|
||||
{
|
||||
STexture VideoTexture = _Base.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
STexture VideoTexture = CBase.Base.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
if (VideoTexture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
_Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
|
||||
CBase.Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -224,14 +222,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private bool DrawBackgroundMusicVideo()
|
||||
{
|
||||
STexture VideoTexture = _Base.BackgroundMusic.GetVideoTexture();
|
||||
STexture VideoTexture = CBase.Base.BackgroundMusic.GetVideoTexture();
|
||||
if (VideoTexture.height > 0)
|
||||
{
|
||||
RectangleF bounds = new RectangleF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH());
|
||||
RectangleF bounds = new RectangleF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH());
|
||||
RectangleF rect = new RectangleF(0f, 0f, VideoTexture.width, VideoTexture.height);
|
||||
CHelper.SetRect(bounds, ref rect, rect.Width / rect.Height, EAspect.Crop);
|
||||
|
||||
_Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _Base.Settings.GetZFar() / 4));
|
||||
CBase.Base.Drawing.DrawTexture(VideoTexture, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, CBase.Base.Settings.GetZFar() / 4));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
+17
-20
@@ -19,7 +19,6 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CButton : IMenuElement
|
||||
{
|
||||
private Basic _Base;
|
||||
private SThemeButton _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
private int _PartyModeID;
|
||||
@@ -72,10 +71,9 @@ namespace Vocaluxe.Menu
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
public CButton(Basic Base, int PartyModeID)
|
||||
public CButton(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeButton();
|
||||
Rect = new SRectF();
|
||||
Color = new SColorF();
|
||||
@@ -84,8 +82,8 @@ namespace Vocaluxe.Menu
|
||||
STexture = new STexture(-1);
|
||||
|
||||
SelText = false;
|
||||
Text = new CText(_Base, _PartyModeID);
|
||||
SText = new CText(_Base, _PartyModeID);
|
||||
Text = new CText(_PartyModeID);
|
||||
SText = new CText(_PartyModeID);
|
||||
Selected = false;
|
||||
Visible = true;
|
||||
EditMode = false;
|
||||
@@ -103,7 +101,6 @@ namespace Vocaluxe.Menu
|
||||
public CButton(CButton button)
|
||||
{
|
||||
_PartyModeID = button._PartyModeID;
|
||||
_Base = button._Base;
|
||||
_Theme = new SThemeButton();
|
||||
_Theme.ColorName = button._Theme.ColorName;
|
||||
_Theme.SColorName = button._Theme.SColorName;
|
||||
@@ -150,7 +147,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -162,7 +159,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -301,7 +298,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(bool ForceDraw)
|
||||
{
|
||||
if (!Visible && _Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
return;
|
||||
|
||||
STexture texture = new STexture(-1);
|
||||
@@ -311,13 +308,13 @@ namespace Vocaluxe.Menu
|
||||
if (Texture.index != -1)
|
||||
texture = Texture;
|
||||
else
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
|
||||
_Base.Drawing.DrawTexture(texture, Rect, Color);
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, Color);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, Color, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -328,13 +325,13 @@ namespace Vocaluxe.Menu
|
||||
if (Texture.index != -1)
|
||||
texture = Texture;
|
||||
else
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
|
||||
_Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
Text.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -345,13 +342,13 @@ namespace Vocaluxe.Menu
|
||||
if (STexture.index != -1)
|
||||
texture = STexture;
|
||||
else
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
|
||||
_Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
CBase.Base.Drawing.DrawTexture(texture, Rect, SColor);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, Rect, SColor, Rect, ReflectionSpace, ReflectionHeight);
|
||||
SText.DrawRelative(Rect.X, Rect.Y, ReflectionSpace, ReflectionHeight, Rect.H);
|
||||
}
|
||||
else
|
||||
@@ -374,10 +371,10 @@ namespace Vocaluxe.Menu
|
||||
Text.LoadTextures();
|
||||
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = _Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace Vocaluxe.Menu
|
||||
public class CEqualizer : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeEqualizer _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -52,10 +51,9 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private float[] _Bars;
|
||||
|
||||
public CEqualizer(Basic Base, int PartyModeID)
|
||||
public CEqualizer(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeEqualizer();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -95,7 +93,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -107,7 +105,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/MaxColor", ref _Theme.MaxColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -262,10 +260,10 @@ namespace Vocaluxe.Menu
|
||||
color = MaxColor;
|
||||
}
|
||||
|
||||
_Base.Drawing.DrawColor(color, bar);
|
||||
CBase.Base.Drawing.DrawColor(color, bar);
|
||||
|
||||
if (Reflection)
|
||||
_Base.Drawing.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Base.Drawing.DrawColorReflection(color, bar, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,10 +274,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.MaxColorName != String.Empty)
|
||||
MaxColor = _Base.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
MaxColor = CBase.Base.Theme.GetColor(_Theme.MaxColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+15
-17
@@ -28,7 +28,6 @@ namespace Vocaluxe.Menu
|
||||
public class CLyric : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeLyrics _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -86,10 +85,9 @@ namespace Vocaluxe.Menu
|
||||
set { _Style = value; }
|
||||
}
|
||||
|
||||
public CLyric(Basic Base, int PartyModeID)
|
||||
public CLyric(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeLyrics();
|
||||
_ThemeLoaded = false;
|
||||
Color = new SColorF();
|
||||
@@ -102,7 +100,7 @@ namespace Vocaluxe.Menu
|
||||
_H = 1f;
|
||||
_width = 1f;
|
||||
_Notes = new List<SNote>();
|
||||
_Text = new CText(_Base, _PartyModeID);
|
||||
_Text = new CText(_PartyModeID);
|
||||
|
||||
_Style = ELyricStyle.Fill;
|
||||
}
|
||||
@@ -120,7 +118,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -132,7 +130,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref ColorProcessed);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -146,7 +144,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
_Theme.Name = ElementName;
|
||||
LoadTextures();
|
||||
_Text = new CText(_Base, _X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
|
||||
_Text = new CText(_X, _Y, _Z, _H, _MaxW, EAlignment.Left, EStyle.Bold, "Normal", Color, String.Empty);
|
||||
}
|
||||
return _ThemeLoaded;
|
||||
}
|
||||
@@ -220,7 +218,7 @@ namespace Vocaluxe.Menu
|
||||
if (n.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
_width += rect.Width;
|
||||
_Notes.Add(n);
|
||||
}
|
||||
@@ -239,7 +237,7 @@ namespace Vocaluxe.Menu
|
||||
#region draw
|
||||
public void Draw(float ActualBeat)
|
||||
{
|
||||
if (Visible || _Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (Visible || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
switch (_Style)
|
||||
{
|
||||
@@ -271,7 +269,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = note.Text;
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -331,7 +329,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = _Notes[note].Text;
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -384,7 +382,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Notes[zoom_note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
|
||||
float diff = end_beat - _Notes[zoom_note].StartBeat;
|
||||
if (diff <= 0f)
|
||||
@@ -402,7 +400,7 @@ namespace Vocaluxe.Menu
|
||||
float tz = _Text.Z;
|
||||
|
||||
_Text.Height += _Text.Height * p * 0.4f;
|
||||
RectangleF rectz = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rectz = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
_Text.X -= (rectz.Width - rect.Width) / 2f;
|
||||
_Text.Y -= (rectz.Height - rect.Height) / 2f;
|
||||
_Text.Z -= 0.1f;
|
||||
@@ -425,7 +423,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = note.Text;
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (note.Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -467,7 +465,7 @@ namespace Vocaluxe.Menu
|
||||
_Text.X = x;
|
||||
_Text.Style = EStyle.Bold;
|
||||
_Text.Text = _Notes[note].Text;
|
||||
RectangleF rect = _Base.Drawing.GetTextBounds(_Text);
|
||||
RectangleF rect = CBase.Base.Drawing.GetTextBounds(_Text);
|
||||
|
||||
if (_Notes[note].Type == ENoteType.Freestyle)
|
||||
_Text.Style = EStyle.BoldItalic;
|
||||
@@ -550,10 +548,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
ColorProcessed = _Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
ColorProcessed = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+83
-136
@@ -7,7 +7,6 @@ using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
using Vocaluxe.Menu.SingNotes;
|
||||
using Vocaluxe.Menu.SongMenu;
|
||||
|
||||
@@ -80,7 +79,6 @@ namespace Vocaluxe.Menu
|
||||
protected string[] _ThemeScreenSettings;
|
||||
|
||||
protected SRectF _ScreenArea;
|
||||
protected Basic _Base;
|
||||
|
||||
public SRectF ScreenArea
|
||||
{
|
||||
@@ -101,9 +99,8 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(Basic Base)
|
||||
public void Initialize()
|
||||
{
|
||||
_Base = Base;
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -147,7 +144,7 @@ namespace Vocaluxe.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
_Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), 0f);
|
||||
|
||||
_ThemeName = String.Empty;
|
||||
_ThemeBackgrounds = null;
|
||||
@@ -167,7 +164,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
protected void FadeTo(EScreens NextScreen)
|
||||
{
|
||||
_Base.Graphics.FadeTo(NextScreen);
|
||||
CBase.Base.Graphics.FadeTo(NextScreen);
|
||||
}
|
||||
|
||||
#region ThemeHandler
|
||||
@@ -186,14 +183,14 @@ namespace Vocaluxe.Menu
|
||||
if (xmlReader != null)
|
||||
xmlReader = null;
|
||||
|
||||
_Base.Log.LogError("Error loading theme file " + file + ": " + e.Message);
|
||||
CBase.Base.Log.LogError("Error loading theme file " + file + ": " + e.Message);
|
||||
}
|
||||
|
||||
bool VersionCheck = false;
|
||||
if (xmlReader != null)
|
||||
VersionCheck = CheckVersion(_ScreenVersion, xmlReader);
|
||||
|
||||
int SkinIndex = _Base.Theme.GetSkinIndex(_PartyModeID);
|
||||
int SkinIndex = CBase.Base.Theme.GetSkinIndex(_PartyModeID);
|
||||
|
||||
if (xmlReader != null && VersionCheck && SkinIndex != -1)
|
||||
{
|
||||
@@ -204,14 +201,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeBackgrounds.Length; i++)
|
||||
{
|
||||
CBackground background = new CBackground(_Base, _PartyModeID);
|
||||
CBackground background = new CBackground(_PartyModeID);
|
||||
if (background.LoadTheme("//root/" + _ThemeName, _ThemeBackgrounds[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htBackgrounds.Add(_ThemeBackgrounds[i], AddBackground(background));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Background \"" + _ThemeBackgrounds[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,14 +217,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeStatics.Length; i++)
|
||||
{
|
||||
CStatic stat = new CStatic(_Base, _PartyModeID);
|
||||
CStatic stat = new CStatic(_PartyModeID);
|
||||
if (stat.LoadTheme("//root/" + _ThemeName, _ThemeStatics[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htStatics.Add(_ThemeStatics[i], AddStatic(stat));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Static \"" + _ThemeStatics[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,14 +233,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeTexts.Length; i++)
|
||||
{
|
||||
CText text = new CText(_Base, _PartyModeID);
|
||||
CText text = new CText(_PartyModeID);
|
||||
if (text.LoadTheme("//root/" + _ThemeName, _ThemeTexts[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htTexts.Add(_ThemeTexts[i], AddText(text));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Text \"" + _ThemeTexts[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -252,14 +249,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeButtons.Length; i++)
|
||||
{
|
||||
CButton button = new CButton(_Base, _PartyModeID);
|
||||
CButton button = new CButton(_PartyModeID);
|
||||
if (button.LoadTheme("//root/" + _ThemeName, _ThemeButtons[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htButtons.Add(_ThemeButtons[i], AddButton(button));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Button \"" + _ThemeButtons[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,14 +265,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSelectSlides.Length; i++)
|
||||
{
|
||||
CSelectSlide slide = new CSelectSlide(_Base, _PartyModeID);
|
||||
CSelectSlide slide = new CSelectSlide(_PartyModeID);
|
||||
if (slide.LoadTheme("//root/" + _ThemeName, _ThemeSelectSlides[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htSelectSlides.Add(_ThemeSelectSlides[i], AddSelectSlide(slide));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load SelectSlide \"" + _ThemeSelectSlides[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,14 +281,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSongMenus.Length; i++)
|
||||
{
|
||||
CSongMenu sm = new CSongMenu(_Base, _PartyModeID);
|
||||
CSongMenu sm = new CSongMenu(_PartyModeID);
|
||||
if (sm.LoadTheme("//root/" + _ThemeName, _ThemeSongMenus[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htSongMenus.Add(_ThemeSongMenus[i], AddSongMenu(sm));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load SongMenu \"" + _ThemeSongMenus[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,14 +297,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeLyrics.Length; i++)
|
||||
{
|
||||
CLyric lyric = new CLyric(_Base, _PartyModeID);
|
||||
CLyric lyric = new CLyric(_PartyModeID);
|
||||
if (lyric.LoadTheme("//root/" + _ThemeName, _ThemeLyrics[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htLyrics.Add(_ThemeLyrics[i], AddLyric(lyric));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Lyric \"" + _ThemeLyrics[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,14 +313,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeSingNotes.Length; i++)
|
||||
{
|
||||
CSingNotes notes = new CSingNotesClassic(_Base, _PartyModeID);
|
||||
CSingNotes notes = new CSingNotesClassic(_PartyModeID);
|
||||
if (notes.LoadTheme("//root/" + _ThemeName, _ThemeSingNotes[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htSingNotes.Add(_ThemeSingNotes[i], AddSingNote(notes));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load SingBar \"" + _ThemeSingNotes[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -332,14 +329,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeNameSelections.Length; i++)
|
||||
{
|
||||
CNameSelection nsel = new CNameSelection(_Base, _PartyModeID);
|
||||
CNameSelection nsel = new CNameSelection(_PartyModeID);
|
||||
if (nsel.LoadTheme("//root/" + _ThemeName, _ThemeNameSelections[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htNameSelections.Add(_ThemeNameSelections[i], AddNameSelection(nsel));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load NameSelection \"" + _ThemeNameSelections[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,14 +345,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeEqualizers.Length; i++)
|
||||
{
|
||||
CEqualizer eq = new CEqualizer(_Base, _PartyModeID);
|
||||
CEqualizer eq = new CEqualizer(_PartyModeID);
|
||||
if (eq.LoadTheme("//root/" + _ThemeName, _ThemeEqualizers[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htEqualizers.Add(_ThemeEqualizers[i], AddEqualizer(eq));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load equalizer \"" + _ThemeEqualizers[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -364,14 +361,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemePlaylists.Length; i++)
|
||||
{
|
||||
CPlaylist pls = new CPlaylist(_Base, _PartyModeID);
|
||||
CPlaylist pls = new CPlaylist(_PartyModeID);
|
||||
if (pls.LoadTheme("//root/" + _ThemeName, _ThemePlaylists[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htPlaylists.Add(_ThemePlaylists[i], AddPlaylist(pls));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load Playlist \"" + _ThemePlaylists[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -380,14 +377,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeParticleEffects.Length; i++)
|
||||
{
|
||||
CParticleEffect pe = new CParticleEffect(_Base, _PartyModeID);
|
||||
CParticleEffect pe = new CParticleEffect(_PartyModeID);
|
||||
if (pe.LoadTheme("//root/" + _ThemeName, _ThemeParticleEffects[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htParticleEffects.Add(_ThemeParticleEffects[i], AddParticleEffect(pe));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load ParticleEffect \"" + _ThemeParticleEffects[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load ParticleEffect \"" + _ThemeParticleEffects[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -396,14 +393,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
for (int i = 0; i < _ThemeScreenSettings.Length; i++)
|
||||
{
|
||||
CScreenSetting se = new CScreenSetting(_Base, _PartyModeID);
|
||||
CScreenSetting se = new CScreenSetting(_PartyModeID);
|
||||
if (se.LoadTheme("//root/" + _ThemeName, _ThemeScreenSettings[i], xmlReader, SkinIndex))
|
||||
{
|
||||
_htScreenSettings.Add(_ThemeScreenSettings[i], AddScreenSetting(se));
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't load ThemeSetting \"" + _ThemeScreenSettings[i] + "\" in screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't load ThemeSetting \"" + _ThemeScreenSettings[i] + "\" in screen " + _ThemeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -732,7 +729,7 @@ namespace Vocaluxe.Menu
|
||||
#region Create Elements
|
||||
public CButton GetNewButton()
|
||||
{
|
||||
return new CButton(_Base, _PartyModeID);
|
||||
return new CButton(_PartyModeID);
|
||||
}
|
||||
|
||||
public CButton GetNewButton(CButton button)
|
||||
@@ -742,7 +739,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CText GetNewText()
|
||||
{
|
||||
return new CText(_Base, _PartyModeID);
|
||||
return new CText(_PartyModeID);
|
||||
}
|
||||
|
||||
public CText GetNewText(CText text)
|
||||
@@ -752,18 +749,18 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CText GetNewText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
|
||||
{
|
||||
return new CText(_Base, x, y, z, h, mw, align, style, font, col, text);
|
||||
return new CText(x, y, z, h, mw, align, style, font, col, text);
|
||||
}
|
||||
|
||||
|
||||
public CBackground GetNewBackground()
|
||||
{
|
||||
return new CBackground(_Base, _PartyModeID);
|
||||
return new CBackground(_PartyModeID);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic()
|
||||
{
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
return new CStatic(_PartyModeID);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic(CStatic Static)
|
||||
@@ -773,12 +770,12 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CStatic GetNewStatic(STexture Texture, SColorF Color, SRectF Rect)
|
||||
{
|
||||
return new CStatic(_Base, _PartyModeID, Texture, Color, Rect);
|
||||
return new CStatic(_PartyModeID, Texture, Color, Rect);
|
||||
}
|
||||
|
||||
public CSelectSlide GetNewSelectSlide()
|
||||
{
|
||||
return new CSelectSlide(_Base, _PartyModeID);
|
||||
return new CSelectSlide(_PartyModeID);
|
||||
}
|
||||
|
||||
public CSelectSlide GetNewSelectSlide(CSelectSlide slide)
|
||||
@@ -788,37 +785,37 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CSongMenu GetNewSongMenu()
|
||||
{
|
||||
return new CSongMenu(_Base, _PartyModeID);
|
||||
return new CSongMenu(_PartyModeID);
|
||||
}
|
||||
|
||||
public CLyric GetNewLyric()
|
||||
{
|
||||
return new CLyric(_Base, _PartyModeID);
|
||||
return new CLyric(_PartyModeID);
|
||||
}
|
||||
|
||||
public CSingNotes GetNewSingNotes()
|
||||
{
|
||||
return new CSingNotesClassic(_Base, _PartyModeID);
|
||||
return new CSingNotesClassic(_PartyModeID);
|
||||
}
|
||||
|
||||
public CNameSelection GetNewNameSelection()
|
||||
{
|
||||
return new CNameSelection(_Base, _PartyModeID);
|
||||
return new CNameSelection(_PartyModeID);
|
||||
}
|
||||
|
||||
public CEqualizer GetNewEqualizer()
|
||||
{
|
||||
return new CEqualizer(_Base, _PartyModeID);
|
||||
return new CEqualizer(_PartyModeID);
|
||||
}
|
||||
|
||||
public CPlaylist GetNewPlaylist()
|
||||
{
|
||||
return new CPlaylist(_Base, _PartyModeID);
|
||||
return new CPlaylist(_PartyModeID);
|
||||
}
|
||||
|
||||
public CParticleEffect GetNewParticleEffect(int MaxNumber, SColorF Color, SRectF Area, STexture Texture, float Size, EParticleType Type)
|
||||
{
|
||||
return new CParticleEffect(_Base, _PartyModeID, MaxNumber, Color, Area, Texture, Size, Type);
|
||||
return new CParticleEffect(_PartyModeID, MaxNumber, Color, Area, Texture, Size, Type);
|
||||
}
|
||||
#endregion Create Elements
|
||||
|
||||
@@ -937,7 +934,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Background Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -950,7 +947,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Statics Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -963,7 +960,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Text Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -976,7 +973,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Button Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -989,7 +986,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find SongMenu Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1002,7 +999,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Lyric Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1015,7 +1012,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find SelectSlide Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1028,7 +1025,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find SingBar Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1041,7 +1038,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find NameSelection Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1054,7 +1051,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Equalizer Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1067,7 +1064,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find Playlist Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1080,7 +1077,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find ParticleEffect Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find ParticleEffect Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1093,7 +1090,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
_Base.Log.LogError("Can't find ScreenSetting Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
CBase.Base.Log.LogError("Can't find ScreenSetting Element \"" + key + "\" in Screen " + _ThemeName);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1100,7 @@ namespace Vocaluxe.Menu
|
||||
#region MenuHandler
|
||||
public virtual bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
if (!_Base.Settings.IsTabNavigation())
|
||||
if (!CBase.Base.Settings.IsTabNavigation())
|
||||
{
|
||||
if (KeyEvent.Key == Keys.Left)
|
||||
{
|
||||
@@ -1177,7 +1174,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
_Base.Graphics.SaveTheme();
|
||||
CBase.Base.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.R:
|
||||
@@ -1590,10 +1587,10 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void SelectByMouse(int x, int y)
|
||||
{
|
||||
float z = _Base.Settings.GetZFar();
|
||||
float z = CBase.Base.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((_Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
if ((CBase.Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -1644,7 +1641,7 @@ namespace Vocaluxe.Menu
|
||||
return true;
|
||||
break;
|
||||
case EType.TText:
|
||||
RectangleF bounds = _Base.Drawing.GetTextBounds(_Texts[interact.Num]);
|
||||
RectangleF bounds = CBase.Base.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;
|
||||
@@ -1701,7 +1698,7 @@ namespace Vocaluxe.Menu
|
||||
case EType.TParticleEffect:
|
||||
return _ParticleEffects[interact.Num].Rect.Z;
|
||||
}
|
||||
return _Base.Settings.GetZFar();
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private float _GetZValue(int interaction)
|
||||
@@ -1739,13 +1736,13 @@ namespace Vocaluxe.Menu
|
||||
return _ParticleEffects[_Interactions[interaction].Num].Rect.Z;
|
||||
}
|
||||
|
||||
return _Base.Settings.GetZFar();
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -1772,7 +1769,7 @@ namespace Vocaluxe.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -1919,13 +1916,13 @@ namespace Vocaluxe.Menu
|
||||
switch (Key.Key)
|
||||
{
|
||||
case Keys.Up:
|
||||
actualRect = new SRectF(actualRect.X, _Base.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(actualRect.X, CBase.Base.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(_Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(CBase.Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Right:
|
||||
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
|
||||
@@ -2519,7 +2516,7 @@ namespace Vocaluxe.Menu
|
||||
msg += "the file is for newer program versions! ";
|
||||
|
||||
msg += "Current screen version is " + Version.ToString();
|
||||
_Base.Log.LogError(msg);
|
||||
CBase.Base.Log.LogError(msg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -2529,107 +2526,57 @@ namespace Vocaluxe.Menu
|
||||
string value = String.Empty;
|
||||
|
||||
// Backgrounds
|
||||
CBackground background = new CBackground(_Base, _PartyModeID);
|
||||
CBackground background = new CBackground( _PartyModeID);
|
||||
int i = 1;
|
||||
while (background.LoadTheme("//root/" + _ThemeName, "Background" + i.ToString(), xmlReader, SkinIndex))
|
||||
{
|
||||
AddBackground(background);
|
||||
background = new CBackground(_Base, _PartyModeID);
|
||||
background = new CBackground(_PartyModeID);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Statics
|
||||
CStatic stat = new CStatic(_Base, _PartyModeID);
|
||||
CStatic stat = new CStatic(_PartyModeID);
|
||||
i = 1;
|
||||
while (stat.LoadTheme("//root/" + _ThemeName, "Static" + i.ToString(), xmlReader, SkinIndex))
|
||||
{
|
||||
AddStatic(stat);
|
||||
stat = new CStatic(_Base, _PartyModeID);
|
||||
stat = new CStatic(_PartyModeID);
|
||||
i++;
|
||||
}
|
||||
|
||||
// Texts
|
||||
CText text = new CText(_Base, _PartyModeID);
|
||||
CText text = new CText(_PartyModeID);
|
||||
i = 1;
|
||||
while (text.LoadTheme("//root/" + _ThemeName, "Text" + i.ToString(), xmlReader, SkinIndex))
|
||||
{
|
||||
AddText(text);
|
||||
text = new CText(_Base, _PartyModeID);
|
||||
text = new CText(_PartyModeID);
|
||||
i++;
|
||||
}
|
||||
|
||||
// ParticleEffects
|
||||
CParticleEffect partef = new CParticleEffect(_Base, _PartyModeID);
|
||||
CParticleEffect partef = new CParticleEffect(_PartyModeID);
|
||||
i = 1;
|
||||
while (partef.LoadTheme("//root/" + _ThemeName, "ParticleEffect" + i.ToString(), xmlReader, SkinIndex))
|
||||
{
|
||||
AddParticleEffect(partef);
|
||||
partef = new CParticleEffect(_Base, _PartyModeID);
|
||||
partef = new CParticleEffect(_PartyModeID);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
private void ReloadThemeEditMode()
|
||||
{
|
||||
_Base.Theme.UnloadSkins();
|
||||
_Base.Theme.ListSkins();
|
||||
_Base.Theme.LoadSkins();
|
||||
_Base.Theme.LoadTheme();
|
||||
_Base.Graphics.ReloadTheme();
|
||||
CBase.Base.Theme.UnloadSkins();
|
||||
CBase.Base.Theme.ListSkins();
|
||||
CBase.Base.Theme.LoadSkins();
|
||||
CBase.Base.Theme.LoadTheme();
|
||||
CBase.Base.Graphics.ReloadTheme();
|
||||
|
||||
OnShow();
|
||||
OnShowFinish();
|
||||
}
|
||||
#endregion Theme Handling
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,13 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
class CTile
|
||||
{
|
||||
private Basic _Base;
|
||||
public int PlayerNr;
|
||||
public CStatic Avatar;
|
||||
public CText Name;
|
||||
|
||||
public CTile(Basic Base)
|
||||
{
|
||||
_Base = Base;
|
||||
CBase.Base = Base;
|
||||
}
|
||||
|
||||
public CTile(CStatic av, CText tex, int pl)
|
||||
@@ -44,7 +43,6 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeNameSelection _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -84,10 +82,9 @@ namespace Vocaluxe.Menu
|
||||
private CStatic PlayerSelector;
|
||||
|
||||
|
||||
public CNameSelection(Basic Base, int PartyModeID)
|
||||
public CNameSelection(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeNameSelection();
|
||||
|
||||
_Tiles = new List<CTile>();
|
||||
@@ -98,7 +95,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
PrepareTiles();
|
||||
|
||||
PlayerSelector = new CStatic(_Base, _PartyModeID);
|
||||
PlayerSelector = new CStatic(_PartyModeID);
|
||||
PlayerSelector.Texture = _TextureTileSelected;
|
||||
PlayerSelector.Rect = new SRectF(0, 0, (_TileW + 6), (_TileH + 6), (Rect.Z - 0.5f));
|
||||
PlayerSelector.Visible = false;
|
||||
@@ -123,7 +120,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ColorEmptyTile", ref _Theme.ColorEmptyTileName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorEmptyTileName, SkinIndex, ref ColorEmptyTile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -147,7 +144,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 &= _Base.Theme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.NameColorName, SkinIndex, ref _Theme.NameColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -371,7 +368,7 @@ namespace Vocaluxe.Menu
|
||||
if (active && Selection != -1)
|
||||
{
|
||||
_player = player;
|
||||
PlayerSelector.Color = _Base.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Color = CBase.Base.Theme.GetPlayerColor(player);
|
||||
}
|
||||
//Normal activation
|
||||
else if (active)
|
||||
@@ -379,7 +376,7 @@ namespace Vocaluxe.Menu
|
||||
Selection = 0;
|
||||
_actualSelection = 0;
|
||||
_player = player;
|
||||
PlayerSelector.Color = _Base.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Color = CBase.Base.Theme.GetPlayerColor(player);
|
||||
PlayerSelector.Visible = true;
|
||||
}
|
||||
//Deactivate
|
||||
@@ -414,9 +411,9 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if ((i + offset * _Tiles.Count) < VisibleProfiles.Count)
|
||||
{
|
||||
_Tiles[i].Avatar.Texture = _Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].Avatar.Texture;
|
||||
_Tiles[i].Avatar.Texture = CBase.Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].Avatar.Texture;
|
||||
_Tiles[i].Avatar.Color = new SColorF(1, 1, 1, 1);
|
||||
_Tiles[i].Name.Text = _Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].PlayerName;
|
||||
_Tiles[i].Name.Text = CBase.Base.Profiles.GetProfiles()[VisibleProfiles[i + offset * _Tiles.Count]].PlayerName;
|
||||
_Tiles[i].PlayerNr = VisibleProfiles[i + offset * _Tiles.Count];
|
||||
}
|
||||
else
|
||||
@@ -466,7 +463,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
return new CStatic(_PartyModeID);
|
||||
}
|
||||
|
||||
public void UnloadTextures()
|
||||
@@ -475,14 +472,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void LoadTextures()
|
||||
{
|
||||
_TextureEmptyTile = _Base.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = _Base.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
_TextureEmptyTile = CBase.Base.Theme.GetSkinTexture(_Theme.TextureEmptyTileName, _PartyModeID);
|
||||
_TextureTileSelected = CBase.Base.Theme.GetSkinTexture(_Theme.TextureTileSelectedName, _PartyModeID);
|
||||
|
||||
if (_Theme.ColorEmptyTileName != String.Empty)
|
||||
ColorEmptyTile = _Base.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
ColorEmptyTile = CBase.Base.Theme.GetColor(_Theme.ColorEmptyTileName, _PartyModeID);
|
||||
|
||||
if (_Theme.NameColorName != String.Empty)
|
||||
_Theme.NameColor = _Base.Theme.GetColor(_Theme.NameColorName, _PartyModeID);
|
||||
_Theme.NameColor = CBase.Base.Theme.GetColor(_Theme.NameColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -501,8 +498,8 @@ namespace Vocaluxe.Menu
|
||||
for (int j = 0; j < _NumW; j++)
|
||||
{
|
||||
SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||
CStatic tileStatic = new CStatic(_Base, _PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect);
|
||||
CText tileText = new CText(_Base, rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "");
|
||||
CStatic tileStatic = new CStatic(_PartyModeID, _TextureEmptyTile, ColorEmptyTile, rect);
|
||||
CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "");
|
||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||
}
|
||||
}
|
||||
@@ -511,18 +508,18 @@ namespace Vocaluxe.Menu
|
||||
private void UpdateVisibleProfiles()
|
||||
{
|
||||
VisibleProfiles.Clear();
|
||||
for (int i = 0; i < _Base.Profiles.GetProfiles().Length; i++)
|
||||
for (int i = 0; i < CBase.Base.Profiles.GetProfiles().Length; i++)
|
||||
{
|
||||
bool visible = false;
|
||||
//Show profile only if active
|
||||
if (_Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.Profiles.GetProfiles()[i].Active == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
visible = true;
|
||||
}
|
||||
for (int p = 0; p < _Base.Game.GetNumPlayer(); p++)
|
||||
for (int p = 0; p < CBase.Base.Game.GetNumPlayer(); p++)
|
||||
{
|
||||
//Don't show profile if is selected, but if selected and guest
|
||||
if (_Base.Game.GetPlayer()[p].ProfileID == i && _Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
|
||||
if (CBase.Base.Game.GetPlayer()[p].ProfileID == i && CBase.Base.Profiles.GetProfiles()[i].GuestProfile == EOffOn.TR_CONFIG_OFF)
|
||||
{
|
||||
visible = false;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
class CObjectInteractions
|
||||
{
|
||||
private Basic _Base;
|
||||
private List<CInteraction> _Interactions;
|
||||
private int _Selection = 0;
|
||||
|
||||
@@ -38,9 +37,8 @@ namespace Vocaluxe.Menu
|
||||
get { return _ScreenArea; }
|
||||
}
|
||||
|
||||
public CObjectInteractions(Basic Base)
|
||||
public CObjectInteractions()
|
||||
{
|
||||
_Base = Base;
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -61,7 +59,7 @@ namespace Vocaluxe.Menu
|
||||
_MouseDY = 0;
|
||||
|
||||
Active = false;
|
||||
_ScreenArea = new SRectF(0f, 0f, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), 0f);
|
||||
_ScreenArea = new SRectF(0f, 0f, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
@@ -117,7 +115,7 @@ namespace Vocaluxe.Menu
|
||||
#region MenuHandler
|
||||
public bool HandleInput(KeyEvent KeyEvent)
|
||||
{
|
||||
if (!_Base.Settings.IsTabNavigation())
|
||||
if (!CBase.Base.Settings.IsTabNavigation())
|
||||
{
|
||||
if (KeyEvent.Key == Keys.Left)
|
||||
{
|
||||
@@ -191,7 +189,7 @@ namespace Vocaluxe.Menu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.S:
|
||||
_Base.Graphics.SaveTheme();
|
||||
CBase.Base.Graphics.SaveTheme();
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
@@ -476,10 +474,10 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void SelectByMouse(int x, int y)
|
||||
{
|
||||
float z = _Base.Settings.GetZFar();
|
||||
float z = CBase.Base.Settings.GetZFar();
|
||||
for (int i = 0; i < _Interactions.Count; i++)
|
||||
{
|
||||
if ((_Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
if ((CBase.Base.Settings.GetGameState() == EGameState.EditTheme) || (!_Interactions[i].ThemeEditorOnly && _IsVisible(i) && _IsEnabled(i)))
|
||||
{
|
||||
if (_IsMouseOver(x, y, _Interactions[i]))
|
||||
{
|
||||
@@ -542,7 +540,7 @@ namespace Vocaluxe.Menu
|
||||
case EType.TSelectSlide:
|
||||
return _SelectSlides[interact.Num].Rect.Z;
|
||||
}
|
||||
return _Base.Settings.GetZFar();
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private float _GetZValue(int interaction)
|
||||
@@ -559,13 +557,13 @@ namespace Vocaluxe.Menu
|
||||
return _SelectSlides[_Interactions[interaction].Num].Rect.Z;
|
||||
}
|
||||
|
||||
return _Base.Settings.GetZFar();
|
||||
return CBase.Base.Settings.GetZFar();
|
||||
}
|
||||
|
||||
private void _NextInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -592,7 +590,7 @@ namespace Vocaluxe.Menu
|
||||
private void _PrevInteraction()
|
||||
{
|
||||
_UnsetSelected();
|
||||
if (_Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
{
|
||||
bool found = false;
|
||||
int start = _Selection;
|
||||
@@ -739,13 +737,13 @@ namespace Vocaluxe.Menu
|
||||
switch (Key.Key)
|
||||
{
|
||||
case Keys.Up:
|
||||
actualRect = new SRectF(actualRect.X, _Base.Settings.GetRenderH(), 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(actualRect.X, CBase.Base.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(_Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
actualRect = new SRectF(CBase.Base.Settings.GetRenderW(), actualRect.Y, 1, 1, actualRect.Z);
|
||||
break;
|
||||
case Keys.Right:
|
||||
actualRect = new SRectF(0, actualRect.Y, 1, 1, actualRect.Z);
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
#region private vars
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private string _TextureName;
|
||||
private STexture _Texture;
|
||||
private SRectF _Rect;
|
||||
@@ -93,10 +92,9 @@ namespace Vocaluxe.Menu
|
||||
#endregion public vars
|
||||
|
||||
#region Constructors
|
||||
public CParticle(Basic Base, int PartyModeID, string textureName, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticleType type)
|
||||
public CParticle(int PartyModeID, string textureName, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize, EParticleType type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_TextureName = textureName;
|
||||
_Texture = new STexture(-1);
|
||||
_Color = color;
|
||||
@@ -114,13 +112,12 @@ namespace Vocaluxe.Menu
|
||||
_Timer = new Stopwatch();
|
||||
_Age = 0f;
|
||||
_MaxAge = maxage;
|
||||
_Rotation = (float)(_Base.Game.GetRandomDouble() * 360.0);
|
||||
_Rotation = (float)(CBase.Base.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
public CParticle(Basic Base, 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)
|
||||
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)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_TextureName = String.Empty;
|
||||
_Texture = texture;
|
||||
_Color = color;
|
||||
@@ -138,7 +135,7 @@ namespace Vocaluxe.Menu
|
||||
_Timer = new Stopwatch();
|
||||
_Age = 0f;
|
||||
_MaxAge = maxage;
|
||||
_Rotation = (float)(_Base.Game.GetRandomDouble() * 360.0);
|
||||
_Rotation = (float)(CBase.Base.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
#endregion Constructors
|
||||
|
||||
@@ -200,7 +197,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case EParticleType.Snow:
|
||||
int maxy = (int)Math.Round(_Base.Settings.GetRenderH() - _Size * 0.4f);
|
||||
int maxy = (int)Math.Round(CBase.Base.Settings.GetRenderH() - _Size * 0.4f);
|
||||
|
||||
if (Math.Round(Y) < maxy)
|
||||
{
|
||||
@@ -291,16 +288,15 @@ namespace Vocaluxe.Menu
|
||||
public void Draw()
|
||||
{
|
||||
if (_TextureName != String.Empty)
|
||||
_Base.Drawing.DrawTexture(_Base.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
CBase.Base.Drawing.DrawTexture(CBase.Base.Theme.GetSkinTexture(_TextureName, _PartyModeID), _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
else
|
||||
_Base.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
CBase.Base.Drawing.DrawTexture(_Texture, _Rect, new SColorF(_Color.R, _Color.G, _Color.B, _Color.A * Alpha2 * _Alpha));
|
||||
}
|
||||
}
|
||||
|
||||
public class CParticleEffect : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeParticleEffect _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -333,10 +329,9 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public CParticleEffect(Basic Base, int PartyModeID)
|
||||
public CParticleEffect(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeParticleEffect();
|
||||
_Stars = new List<CParticle>();
|
||||
_SpawnTimer = new Stopwatch();
|
||||
@@ -344,10 +339,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CParticleEffect(Basic Base, int PartyModeID, int MaxNumber, SColorF Color, SRectF Rect, string TextureName, float Size, EParticleType Type)
|
||||
public CParticleEffect(int PartyModeID, int MaxNumber, SColorF Color, SRectF Rect, string TextureName, float Size, EParticleType Type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeParticleEffect();
|
||||
_Stars = new List<CParticle>();
|
||||
this.Rect = Rect;
|
||||
@@ -362,10 +356,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CParticleEffect(Basic Base, int PartyModeID, int MaxNumber, SColorF Color, SRectF Rect, STexture Texture, float Size, EParticleType Type)
|
||||
public CParticleEffect(int PartyModeID, int MaxNumber, SColorF Color, SRectF Rect, STexture Texture, float Size, EParticleType Type)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeParticleEffect();
|
||||
_Stars = new List<CParticle>();
|
||||
this.Rect = Rect;
|
||||
@@ -395,7 +388,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -479,7 +472,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
while (_Stars.Count < _MaxNumber && DoSpawn)
|
||||
{
|
||||
float size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
float size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
float lifetime = 0f;
|
||||
float vx = 0f;
|
||||
float vy = 0f;
|
||||
@@ -490,29 +483,29 @@ namespace Vocaluxe.Menu
|
||||
switch (_Type)
|
||||
{
|
||||
case EParticleType.Twinkle:
|
||||
size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = _Base.Game.GetRandom(500) / 1000f + 0.5f;
|
||||
vx = -_Base.Game.GetRandom(10000) / 50f + 100f;
|
||||
vy = -_Base.Game.GetRandom(10000) / 50f + 100f;
|
||||
vr = -_Base.Game.GetRandom(500) / 100f + 2.5f;
|
||||
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;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.Star:
|
||||
size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = _Base.Game.GetRandom(1000) / 500f + 0.2f;
|
||||
vx = -_Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = -_Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vr = -_Base.Game.GetRandom(500) / 100f + 2.5f;
|
||||
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;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.Snow:
|
||||
size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = _Base.Game.GetRandom(5000) / 50f + 10f;
|
||||
vx = -_Base.Game.GetRandom(1000) / 50f + 10f;
|
||||
vy = _Base.Game.GetRandom(1000) / 50f + Math.Abs(vx) + 10f;
|
||||
vr = -_Base.Game.GetRandom(200) / 50f + 2f;
|
||||
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;
|
||||
vsize = lifetime * 2f;
|
||||
|
||||
_NextSpawnTime = lifetime / _MaxNumber;
|
||||
@@ -520,20 +513,20 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case EParticleType.Flare:
|
||||
size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = _Base.Game.GetRandom(500) / 1000f + 0.1f;
|
||||
vx = -_Base.Game.GetRandom(2000) / 50f;
|
||||
vy = -_Base.Game.GetRandom(2000) / 50f + 20f;
|
||||
vr = -_Base.Game.GetRandom(2000) / 50f + 20f;
|
||||
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;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
case EParticleType.PerfNoteStar:
|
||||
size = _Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = _Base.Game.GetRandom(1000) / 500f + 1.2f;
|
||||
size = CBase.Base.Game.GetRandom((int)_Size / 2) + _Size / 2;
|
||||
lifetime = CBase.Base.Game.GetRandom(1000) / 500f + 1.2f;
|
||||
vx = 0f;
|
||||
vy = 0f;
|
||||
vr = _Base.Game.GetRandom(500) / 50f + 10f;
|
||||
vr = CBase.Base.Game.GetRandom(500) / 50f + 10f;
|
||||
vsize = lifetime * 2f;
|
||||
break;
|
||||
|
||||
@@ -553,16 +546,16 @@ namespace Vocaluxe.Menu
|
||||
CParticle star;
|
||||
if (_Theme.TextureName != String.Empty)
|
||||
{
|
||||
star = new CParticle(_Base, _PartyModeID, _Theme.TextureName, Color,
|
||||
_Base.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
_Base.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
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,
|
||||
size, lifetime, Rect.Z, vx, vy, vr, vsize, _Type);
|
||||
}
|
||||
else
|
||||
{
|
||||
star = new CParticle(_Base, _PartyModeID, Texture, Color,
|
||||
_Base.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
_Base.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
star = new CParticle(_PartyModeID, Texture, Color,
|
||||
CBase.Base.Game.GetRandom(w) + Rect.X - size / 4f,
|
||||
CBase.Base.Game.GetRandom(h) + Rect.Y - size / 4f,
|
||||
size, lifetime, Rect.Z, vx, vy, vr, vsize, _Type);
|
||||
}
|
||||
|
||||
@@ -619,9 +612,9 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
if(_Theme.TextureName != String.Empty)
|
||||
Texture = _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
@@ -77,21 +77,18 @@ namespace Vocaluxe.Menu
|
||||
|
||||
class PlaylistElement
|
||||
{
|
||||
Basic _Base;
|
||||
public CStatic Cover;
|
||||
public CStatic Background;
|
||||
public CText Text1;
|
||||
public CSelectSlide SelectSlide;
|
||||
public int Content;
|
||||
|
||||
public PlaylistElement(Basic Base)
|
||||
public PlaylistElement()
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
public PlaylistElement(PlaylistElement pe)
|
||||
{
|
||||
_Base = pe._Base;
|
||||
Cover = new CStatic(pe.Cover);
|
||||
Background = new CStatic(pe.Background);
|
||||
Text1 = new CText(pe.Text1);
|
||||
@@ -132,7 +129,6 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemePlaylist _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -167,7 +163,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_EditMode == EEditMode.ChangeOrder && ChangeOrderSource != -1 && PlaylistElements.Count > ChangeOrderSource)
|
||||
{
|
||||
_Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[ChangeOrderSource].Content);
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[ChangeOrderSource].Content);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
ChangeOrderSource = -1;
|
||||
@@ -190,21 +186,20 @@ namespace Vocaluxe.Menu
|
||||
|
||||
//private static
|
||||
|
||||
public CPlaylist(Basic Base, int PartyModeID)
|
||||
public CPlaylist(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemePlaylist();
|
||||
_Theme.Text1 = new CText(_Base, _PartyModeID);
|
||||
_Theme.StaticCover = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.StaticPlaylistFooter = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.StaticPlaylistHeader = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistName = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistClose = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistDelete = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistSave = new CButton(_Base, _PartyModeID);
|
||||
_Theme.ButtonPlaylistSing = new CButton(_Base, _PartyModeID);
|
||||
_Theme.SelectSlideGameMode = new CSelectSlide(_Base, _PartyModeID);
|
||||
_Theme.Text1 = new CText(_PartyModeID);
|
||||
_Theme.StaticCover = new CStatic(_PartyModeID);
|
||||
_Theme.StaticPlaylistFooter = new CStatic(_PartyModeID);
|
||||
_Theme.StaticPlaylistHeader = new CStatic(_PartyModeID);
|
||||
_Theme.ButtonPlaylistName = new CButton(_PartyModeID);
|
||||
_Theme.ButtonPlaylistClose = new CButton(_PartyModeID);
|
||||
_Theme.ButtonPlaylistDelete = new CButton(_PartyModeID);
|
||||
_Theme.ButtonPlaylistSave = new CButton(_PartyModeID);
|
||||
_Theme.ButtonPlaylistSing = new CButton(_PartyModeID);
|
||||
_Theme.SelectSlideGameMode = new CSelectSlide(_PartyModeID);
|
||||
|
||||
CompleteRect = new SRectF();
|
||||
Rect = new SRectF();
|
||||
@@ -214,8 +209,8 @@ namespace Vocaluxe.Menu
|
||||
PlaylistElements = new List<PlaylistElement>();
|
||||
PlaylistElementContents = new List<PlaylistElementContent>();
|
||||
|
||||
_Interactions = new CObjectInteractions(_Base);
|
||||
ChangeOrderElement = new PlaylistElement(_Base);
|
||||
_Interactions = new CObjectInteractions();
|
||||
ChangeOrderElement = new PlaylistElement();
|
||||
|
||||
Visible = false;
|
||||
Selected = false;
|
||||
@@ -250,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 &= _Base.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, ref BackgroundColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorBackgroundName, SkinIndex, ref BackgroundColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -261,7 +256,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
if (xmlReader.GetValue(item + "/SColorBackground", ref _Theme.SColorBackgroundName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, ref BackgroundSColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorBackgroundName, SkinIndex, ref BackgroundSColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -427,19 +422,19 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
LoadPlaylist(0);
|
||||
}
|
||||
if (!Visible && _Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme && !ForceDraw)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||
{
|
||||
if (i == CurrentPlaylistElement && _Selected)
|
||||
{
|
||||
PlaylistElements[i].Background.Texture = _Base.Theme.GetSkinTexture(_Theme.STextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.STextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Color = BackgroundSColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaylistElements[i].Background.Texture = _Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
PlaylistElements[i].Background.Color = BackgroundColor;
|
||||
}
|
||||
}
|
||||
@@ -473,10 +468,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorBackgroundName != String.Empty)
|
||||
BackgroundColor = _Base.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
BackgroundColor = CBase.Base.Theme.GetColor(_Theme.ColorBackgroundName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorBackgroundName != String.Empty)
|
||||
BackgroundSColor = _Base.Theme.GetColor(_Theme.SColorBackgroundName, _PartyModeID);
|
||||
BackgroundSColor = CBase.Base.Theme.GetColor(_Theme.SColorBackgroundName, _PartyModeID);
|
||||
|
||||
_Theme.Text1.LoadTextures();
|
||||
_Theme.ButtonPlaylistClose.LoadTextures();
|
||||
@@ -513,14 +508,14 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (KeyEvent.Key == Keys.Enter)
|
||||
{
|
||||
_Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
_Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
}
|
||||
else if (KeyEvent.Key == Keys.Escape)
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = _Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
}
|
||||
@@ -608,7 +603,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
|
||||
case Keys.Delete:
|
||||
_Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[CurrentPlaylistElement].Content);
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[CurrentPlaylistElement].Content);
|
||||
UpdatePlaylist();
|
||||
|
||||
if (Offset > 0)
|
||||
@@ -636,7 +631,7 @@ namespace Vocaluxe.Menu
|
||||
case Keys.Add: //move the selected song up
|
||||
if (PlaylistElementContents.Count > 1 && (CurrentPlaylistElement > 0 || Offset > 0))
|
||||
{
|
||||
_Base.Playlist.MovePlaylistSongUp(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
CBase.Base.Playlist.MovePlaylistSongUp(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
|
||||
KeyEvent key = new KeyEvent();
|
||||
@@ -666,7 +661,7 @@ namespace Vocaluxe.Menu
|
||||
case Keys.Subtract: //move the selected song down
|
||||
if (PlaylistElementContents.Count > 1 && CurrentPlaylistElement + Offset < PlaylistElementContents.Count - 1)
|
||||
{
|
||||
_Base.Playlist.MovePlaylistSongDown(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
CBase.Base.Playlist.MovePlaylistSongDown(ActivePlaylistID, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
|
||||
KeyEvent key = new KeyEvent();
|
||||
@@ -736,7 +731,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
_Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
break;
|
||||
@@ -747,7 +742,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
_Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
break;
|
||||
@@ -779,11 +774,11 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
||||
{
|
||||
_Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
||||
{
|
||||
_Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
ClosePlaylist();
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistName.Selected)
|
||||
@@ -905,7 +900,7 @@ namespace Vocaluxe.Menu
|
||||
//Delete Entry with RB
|
||||
if (CHelper.IsInBounds(PlaylistElements[i].Background.Rect, MouseEvent) && MouseEvent.RB && PlaylistElements[i].Content != -1)
|
||||
{
|
||||
_Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[i].Content);
|
||||
CBase.Base.Playlist.DeletePlaylistSong(ActivePlaylistID, PlaylistElements[i].Content);
|
||||
UpdatePlaylist();
|
||||
return true;
|
||||
}
|
||||
@@ -925,7 +920,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
_Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset).GameMode = PlaylistElementContents[CurrentPlaylistElement + Offset].Modes[PlaylistElements[CurrentPlaylistElement].SelectSlide.Selection];
|
||||
UpdatePlaylist();
|
||||
}
|
||||
if (_Theme.ButtonPlaylistClose.Selected)
|
||||
@@ -940,12 +935,12 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistSave.Selected)
|
||||
{
|
||||
_Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
return true;
|
||||
}
|
||||
else if (_Theme.ButtonPlaylistDelete.Selected)
|
||||
{
|
||||
_Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.DeletePlaylist(ActivePlaylistID);
|
||||
ClosePlaylist();
|
||||
return true;
|
||||
}
|
||||
@@ -974,14 +969,14 @@ namespace Vocaluxe.Menu
|
||||
return true;
|
||||
|
||||
ChangeOrderElement = new PlaylistElement(PlaylistElements[CurrentPlaylistElement]);
|
||||
ChangeOrderElement.Background.Rect.Z = _Base.Settings.GetZNear();
|
||||
ChangeOrderElement.Cover.Rect.Z = _Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.Rect.Z = _Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowLeft.Z = _Base.Settings.GetZNear();
|
||||
ChangeOrderElement.SelectSlide.RectArrowRight.Z = _Base.Settings.GetZNear();
|
||||
ChangeOrderElement.Text1.Z = _Base.Settings.GetZNear();
|
||||
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.Texture = _Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
ChangeOrderElement.Background.Texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureBackgroundName, _PartyModeID);
|
||||
ChangeOrderElement.Background.Color = BackgroundColor;
|
||||
|
||||
OldMousePosX = MouseEvent.X;
|
||||
@@ -993,7 +988,7 @@ namespace Vocaluxe.Menu
|
||||
if (!MouseEvent.LBH && DragAndDropSongID != -1)
|
||||
{
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
CSong song = _Base.Songs.GetSongByID(DragAndDropSongID);
|
||||
CSong song = CBase.Base.Songs.GetSongByID(DragAndDropSongID);
|
||||
|
||||
if (song != null)
|
||||
{
|
||||
@@ -1002,14 +997,14 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (CurrentPlaylistElement != -1)
|
||||
{
|
||||
_Base.Playlist.InsertPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset, DragAndDropSongID, gm);
|
||||
CBase.Base.Playlist.InsertPlaylistSong(ActivePlaylistID, CurrentPlaylistElement + Offset, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MouseEvent.Y < PlaylistElements[0].Background.Rect.Y && Offset == 0)
|
||||
{
|
||||
_Base.Playlist.InsertPlaylistSong(ActivePlaylistID, 0, DragAndDropSongID, gm);
|
||||
CBase.Base.Playlist.InsertPlaylistSong(ActivePlaylistID, 0, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else
|
||||
@@ -1028,7 +1023,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MouseEvent.Y > min)
|
||||
{
|
||||
_Base.Playlist.AddPlaylistSong(ActivePlaylistID, DragAndDropSongID, gm);
|
||||
CBase.Base.Playlist.AddPlaylistSong(ActivePlaylistID, DragAndDropSongID, gm);
|
||||
UpdatePlaylist();
|
||||
ScrollToBottom();
|
||||
}
|
||||
@@ -1049,8 +1044,8 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_Theme.ButtonPlaylistName.Selected)
|
||||
{
|
||||
_Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
_Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
CBase.Base.Playlist.SetPlaylistName(ActivePlaylistID, _Theme.ButtonPlaylistName.Text.Text);
|
||||
CBase.Base.Playlist.SavePlaylist(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
return true;
|
||||
}
|
||||
@@ -1059,7 +1054,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (_Theme.ButtonPlaylistName.Selected)
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = _Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_EditMode = EEditMode.None;
|
||||
_Theme.ButtonPlaylistName.EditMode = false;
|
||||
return true;
|
||||
@@ -1079,14 +1074,14 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
if (CurrentPlaylistElement != -1 && CurrentPlaylistElement + Offset != ChangeOrderSource)
|
||||
{
|
||||
_Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, CurrentPlaylistElement + Offset);
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, CurrentPlaylistElement + Offset);
|
||||
UpdatePlaylist();
|
||||
}
|
||||
else if (CurrentPlaylistElement == -1)
|
||||
{
|
||||
if (MouseEvent.Y < PlaylistElements[0].Background.Rect.Y && Offset == 0)
|
||||
{
|
||||
_Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, 0);
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1104,7 +1099,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MouseEvent.Y > min)
|
||||
{
|
||||
_Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, PlaylistElementContents.Count - 1);
|
||||
CBase.Base.Playlist.MovePlaylistSong(ActivePlaylistID, ChangeOrderSource, PlaylistElementContents.Count - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1125,9 +1120,9 @@ namespace Vocaluxe.Menu
|
||||
|
||||
for (int i = 0; i < Math.Floor(Rect.H / _Theme.EntryHeight); i++)
|
||||
{
|
||||
PlaylistElement en = new PlaylistElement(_Base);
|
||||
PlaylistElement en = new PlaylistElement();
|
||||
|
||||
en.Background = new CStatic(_Base, _PartyModeID, _Theme.TextureBackgroundName, BackgroundColor, new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z));
|
||||
en.Background = new CStatic(_PartyModeID, _Theme.TextureBackgroundName, BackgroundColor, new SRectF(Rect.X, Rect.Y + (i * _Theme.EntryHeight), Rect.W, _Theme.EntryHeight, Rect.Z));
|
||||
|
||||
en.Cover = new CStatic(_Theme.StaticCover);
|
||||
en.Cover.Rect.Y += Rect.Y + (i * _Theme.EntryHeight);
|
||||
@@ -1157,17 +1152,17 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public bool LoadPlaylist(int PlaylistID)
|
||||
{
|
||||
if (PlaylistID > -1 && PlaylistID < _Base.Playlist.GetNumPlaylists())
|
||||
if (PlaylistID > -1 && PlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
{
|
||||
_Theme.ButtonPlaylistName.Text.Text = _Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
_Theme.ButtonPlaylistName.Text.Text = CBase.Base.Playlist.GetPlaylistName(ActivePlaylistID);
|
||||
ActivePlaylistID = PlaylistID;
|
||||
PlaylistElementContents.Clear();
|
||||
for (int i = 0; i < _Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
PlaylistElementContent pec = new PlaylistElementContent();
|
||||
pec.SongID = _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = _Base.Songs.GetSongByID(_Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID).AvailableGameModes;
|
||||
pec.Mode = _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
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;
|
||||
PlaylistElementContents.Add(pec);
|
||||
}
|
||||
Update();
|
||||
@@ -1180,12 +1175,12 @@ namespace Vocaluxe.Menu
|
||||
public void UpdatePlaylist()
|
||||
{
|
||||
PlaylistElementContents.Clear();
|
||||
for (int i = 0; i < _Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
PlaylistElementContent pec = new PlaylistElementContent();
|
||||
pec.SongID = _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID;
|
||||
pec.Modes = _Base.Songs.GetSongByID(pec.SongID).AvailableGameModes;
|
||||
pec.Mode = _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode;
|
||||
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;
|
||||
PlaylistElementContents.Add(pec);
|
||||
}
|
||||
|
||||
@@ -1203,34 +1198,34 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private void StartPlaylistSongs()
|
||||
{
|
||||
_Base.Game.Reset();
|
||||
_Base.Game.ClearSongs();
|
||||
CBase.Base.Game.Reset();
|
||||
CBase.Base.Game.ClearSongs();
|
||||
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < _Base.Playlist.GetNumPlaylists())
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
{
|
||||
for (int i = 0; i < _Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
for (int i = 0; i < CBase.Base.Playlist.GetPlaylistSongCount(ActivePlaylistID); i++)
|
||||
{
|
||||
_Base.Game.AddSong(_Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID, _Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode);
|
||||
CBase.Base.Game.AddSong(CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).SongID, CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, i).GameMode);
|
||||
}
|
||||
if (_Base.Game.GetNumSongs() > 0)
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenNames); //TODO: What is if someone uses that in PartyMode?
|
||||
if (CBase.Base.Game.GetNumSongs() > 0)
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenNames); //TODO: What is if someone uses that in PartyMode?
|
||||
}
|
||||
}
|
||||
|
||||
private void StartPlaylistSong(int selected)
|
||||
{
|
||||
_Base.Game.Reset();
|
||||
_Base.Game.ClearSongs();
|
||||
CBase.Base.Game.Reset();
|
||||
CBase.Base.Game.ClearSongs();
|
||||
|
||||
_Base.Game.AddSong(_Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).SongID, _Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).GameMode);
|
||||
CBase.Base.Game.AddSong(CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).SongID, CBase.Base.Playlist.GetPlaylistSong(ActivePlaylistID, selected).GameMode);
|
||||
|
||||
if (_Base.Game.GetNumSongs() > 0)
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenNames);
|
||||
if (CBase.Base.Game.GetNumSongs() > 0)
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenNames);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < _Base.Playlist.GetNumPlaylists())
|
||||
if (ActivePlaylistID > -1 && ActivePlaylistID < CBase.Base.Playlist.GetNumPlaylists())
|
||||
{
|
||||
for (int i = 0; i < PlaylistElements.Count; i++ )
|
||||
{
|
||||
@@ -1242,7 +1237,7 @@ namespace Vocaluxe.Menu
|
||||
PlaylistElements[i].SelectSlide.Visible = true;
|
||||
PlaylistElements[i].Text1.Visible = true;
|
||||
PlaylistElementContent pec = PlaylistElementContents[Offset + i];
|
||||
CSong song = _Base.Songs.GetSongByID(pec.SongID);
|
||||
CSong song = CBase.Base.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
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace Vocaluxe.Menu
|
||||
public class CScreenSetting : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
|
||||
private SScreenSetting _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -34,10 +33,9 @@ namespace Vocaluxe.Menu
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
public CScreenSetting(Basic Base, int PartyModeID)
|
||||
public CScreenSetting(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SScreenSetting();
|
||||
_ThemeLoaded = false;
|
||||
}
|
||||
@@ -45,7 +43,6 @@ namespace Vocaluxe.Menu
|
||||
public CScreenSetting(CScreenSetting ts)
|
||||
{
|
||||
_PartyModeID = ts._PartyModeID;
|
||||
_Base = ts._Base;
|
||||
_Theme = ts._Theme;
|
||||
_ThemeLoaded = ts._ThemeLoaded;
|
||||
}
|
||||
@@ -128,12 +125,12 @@ namespace Vocaluxe.Menu
|
||||
|
||||
private STexture GetTextureValue(string _string)
|
||||
{
|
||||
return _Base.Theme.GetSkinTexture(_string, _PartyModeID);
|
||||
return CBase.Base.Theme.GetSkinTexture(_string, _PartyModeID);
|
||||
}
|
||||
|
||||
private SColorF GetColorValue(string _string)
|
||||
{
|
||||
return _Base.Theme.GetColor(_string, _PartyModeID);
|
||||
return CBase.Base.Theme.GetColor(_string, _PartyModeID);
|
||||
}
|
||||
#endregion Private
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace Vocaluxe.Menu
|
||||
public class CSelectSlide : IMenuElement, ICloneable
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeSelectSlide _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -140,10 +139,9 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
}
|
||||
|
||||
public CSelectSlide(Basic Base, int PartyModeID)
|
||||
public CSelectSlide(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSelectSlide();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -172,7 +170,6 @@ namespace Vocaluxe.Menu
|
||||
public CSelectSlide(CSelectSlide slide)
|
||||
{
|
||||
_PartyModeID = slide._PartyModeID;
|
||||
_Base = slide._Base;
|
||||
_Theme = new SThemeSelectSlide();
|
||||
|
||||
_Theme.TextureArrowLeftName = slide._Theme.TextureArrowLeftName;
|
||||
@@ -252,7 +249,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -264,7 +261,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -276,7 +273,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/HColor", ref _Theme.HColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.HColorName, SkinIndex, ref HColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.HColorName, SkinIndex, ref HColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,7 +297,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowColor", ref _Theme.ArrowColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, ref ColorArrow);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ArrowColorName, SkinIndex, ref ColorArrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -312,7 +309,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/ArrowSColor", ref _Theme.SArrowColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, ref SColorArrow);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SArrowColorName, SkinIndex, ref SColorArrow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -324,7 +321,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextColor", ref _Theme.TextColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.TextColorName, SkinIndex, ref TextColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.TextColorName, SkinIndex, ref TextColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -336,7 +333,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/TextSColor", ref _Theme.STextColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.STextColorName, SkinIndex, ref STextColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.STextColorName, SkinIndex, ref STextColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -716,43 +713,43 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (!Visible && _Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
return;
|
||||
|
||||
STexture Texture = _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
STexture TextureArrowLeft = _Base.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
STexture TextureArrowRight = _Base.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
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 STexture = _Base.Theme.GetSkinTexture(_Theme.STextureName, _PartyModeID);
|
||||
STexture STextureArrowLeft = _Base.Theme.GetSkinTexture(_Theme.STextureArrowLeftName, _PartyModeID);
|
||||
STexture STextureArrowRight = _Base.Theme.GetSkinTexture(_Theme.STextureArrowRightName, _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 HTexture = _Base.Theme.GetSkinTexture(_Theme.HTextureName, _PartyModeID);
|
||||
STexture HTexture = CBase.Base.Theme.GetSkinTexture(_Theme.HTextureName, _PartyModeID);
|
||||
|
||||
if (Selected)
|
||||
{
|
||||
if (Highlighted)
|
||||
_Base.Drawing.DrawTexture(HTexture, Rect, HColor);
|
||||
CBase.Base.Drawing.DrawTexture(HTexture, Rect, HColor);
|
||||
else
|
||||
_Base.Drawing.DrawTexture(STexture, Rect, SColor);
|
||||
CBase.Base.Drawing.DrawTexture(STexture, Rect, SColor);
|
||||
}
|
||||
else
|
||||
_Base.Drawing.DrawTexture(Texture, Rect, Color);
|
||||
CBase.Base.Drawing.DrawTexture(Texture, Rect, Color);
|
||||
|
||||
if (_Selection > 0 || _Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection > 0 || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
if (_ArrowLeftSelected)
|
||||
_Base.Drawing.DrawTexture(STextureArrowLeft, RectArrowLeft, SColorArrow);
|
||||
CBase.Base.Drawing.DrawTexture(STextureArrowLeft, RectArrowLeft, SColorArrow);
|
||||
else
|
||||
_Base.Drawing.DrawTexture(TextureArrowLeft, RectArrowLeft, ColorArrow);
|
||||
CBase.Base.Drawing.DrawTexture(TextureArrowLeft, RectArrowLeft, ColorArrow);
|
||||
}
|
||||
|
||||
if (_Selection < _ValueNames.Count - 1 || _Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
if (_Selection < _ValueNames.Count - 1 || CBase.Base.Settings.GetGameState() == EGameState.EditTheme)
|
||||
{
|
||||
if (_ArrowRightSelected)
|
||||
_Base.Drawing.DrawTexture(STextureArrowRight, RectArrowRight, SColorArrow);
|
||||
CBase.Base.Drawing.DrawTexture(STextureArrowRight, RectArrowRight, SColorArrow);
|
||||
else
|
||||
_Base.Drawing.DrawTexture(TextureArrowRight, RectArrowRight, ColorArrow);
|
||||
CBase.Base.Drawing.DrawTexture(TextureArrowRight, RectArrowRight, ColorArrow);
|
||||
}
|
||||
|
||||
if (_NumVisible < 1 || _ValueNames.Count == 0)
|
||||
@@ -778,7 +775,7 @@ namespace Vocaluxe.Menu
|
||||
_ValueBounds.Clear();
|
||||
for (int i = 0; i < numvis; i++)
|
||||
{
|
||||
CText Text = new CText(_Base, 0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, String.Empty);
|
||||
CText Text = new CText(0, 0, 0, TextH, MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, TextColor, String.Empty);
|
||||
Text.PartyModeID = _ValuePartyModeIDs[i + offset];
|
||||
Text.Text = _ValueNames[i + offset];
|
||||
|
||||
@@ -789,7 +786,7 @@ namespace Vocaluxe.Menu
|
||||
Alpha = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
|
||||
RectangleF bounds = _Base.Drawing.GetTextBounds(Text);
|
||||
RectangleF bounds = CBase.Base.Drawing.GetTextBounds(Text);
|
||||
Text.X = (x + dx/2f + dx * i)+TextRelativeX;
|
||||
|
||||
if (!WithTextures)
|
||||
@@ -804,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);
|
||||
_Base.Drawing.DrawTexture(_Textures[i + offset], rect, Alpha);
|
||||
CBase.Base.Drawing.DrawTexture(_Textures[i + offset], rect, Alpha);
|
||||
_ValueBounds.Add(rect);
|
||||
}
|
||||
else
|
||||
@@ -821,25 +818,25 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = _Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.HColorName != String.Empty)
|
||||
HColor = _Base.Theme.GetColor(_Theme.HColorName, _PartyModeID);
|
||||
HColor = CBase.Base.Theme.GetColor(_Theme.HColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.ArrowColorName != String.Empty)
|
||||
ColorArrow = _Base.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
ColorArrow = CBase.Base.Theme.GetColor(_Theme.ArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SArrowColorName != String.Empty)
|
||||
SColorArrow = _Base.Theme.GetColor(_Theme.SArrowColorName, _PartyModeID);
|
||||
SColorArrow = CBase.Base.Theme.GetColor(_Theme.SArrowColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.TextColorName != String.Empty)
|
||||
TextColor = _Base.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
TextColor = CBase.Base.Theme.GetColor(_Theme.TextColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
STextColor = _Base.Theme.GetColor(_Theme.STextColorName, _PartyModeID);
|
||||
STextColor = CBase.Base.Theme.GetColor(_Theme.STextColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+12
-17
@@ -16,7 +16,6 @@ namespace Vocaluxe.Menu
|
||||
public class CStatic : IMenuElement
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
|
||||
private SThemeStatic _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
@@ -34,7 +33,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Texture.index != -1)
|
||||
return _Texture;
|
||||
else
|
||||
return _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
return CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
}
|
||||
|
||||
set { _Texture = value; }
|
||||
@@ -54,10 +53,9 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public EAspect Aspect = EAspect.Stretch;
|
||||
|
||||
public CStatic(Basic Base, int PartyModeID)
|
||||
public CStatic(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -76,7 +74,6 @@ namespace Vocaluxe.Menu
|
||||
public CStatic(CStatic s)
|
||||
{
|
||||
_PartyModeID = s._PartyModeID;
|
||||
_Base = s._Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -92,10 +89,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = s.Visible;
|
||||
}
|
||||
|
||||
public CStatic(Basic Base, int PartyModeID, STexture texture, SColorF color, SRectF rect)
|
||||
public CStatic(int PartyModeID, STexture texture, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -111,10 +107,9 @@ namespace Vocaluxe.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CStatic(Basic Base, int PartyModeID, string TextureSkinName, SColorF color, SRectF rect)
|
||||
public CStatic(int PartyModeID, string TextureSkinName, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeStatic();
|
||||
_Theme.TextureName = TextureSkinName;
|
||||
_ThemeLoaded = false;
|
||||
@@ -146,7 +141,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -246,7 +241,7 @@ namespace Vocaluxe.Menu
|
||||
if (_Texture.index != -1)
|
||||
texture = _Texture;
|
||||
else
|
||||
texture = _Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
texture = CBase.Base.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
|
||||
SRectF bounds = new SRectF(
|
||||
Rect.X - Rect.W * (scale - 1f),
|
||||
@@ -270,18 +265,18 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
|
||||
SColorF color = new SColorF(Color.R, Color.G, Color.B, Color.A * Alpha);
|
||||
if (Visible || ForceDraw || (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Visible || ForceDraw || (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
CBase.Base.Drawing.DrawTexture(texture, rect, color, bounds);
|
||||
if (Reflection)
|
||||
{
|
||||
_Base.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
CBase.Base.Drawing.DrawTextureReflection(texture, rect, color, bounds, ReflectionSpace, ReflectionHeight);
|
||||
}
|
||||
}
|
||||
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect);
|
||||
CBase.Base.Drawing.DrawColor(new SColorF(1f, 1f, 1f, 0.5f), rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +287,7 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
|
||||
+58
-65
@@ -35,7 +35,6 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public class CText : IMenuElement
|
||||
{
|
||||
private Basic _Base;
|
||||
private SThemeText _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
private int _PartyModeID;
|
||||
@@ -117,9 +116,9 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
_MaxWidth = value;
|
||||
if (_MaxWidth > 0)
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), _MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), _MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
|
||||
_PositionNeedsUpdate = true;
|
||||
}
|
||||
@@ -209,7 +208,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _Theme.Text; }
|
||||
set
|
||||
{
|
||||
string translation = _Base.Language.Translate(value, _TranslationID);
|
||||
string translation = CBase.Base.Language.Translate(value, _TranslationID);
|
||||
if (_Theme.Text != value || translation != _Text)
|
||||
{
|
||||
_Theme.Text = value;
|
||||
@@ -224,7 +223,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _PartyModeID; }
|
||||
set
|
||||
{
|
||||
_Text = _Base.Language.Translate(_Text, value);
|
||||
_Text = CBase.Base.Language.Translate(_Text, value);
|
||||
_PositionNeedsUpdate = true;
|
||||
_PartyModeID = value;
|
||||
_TranslationID = value;
|
||||
@@ -236,7 +235,7 @@ namespace Vocaluxe.Menu
|
||||
get { return _TranslationID; }
|
||||
set
|
||||
{
|
||||
_Text = _Base.Language.Translate(_Text, value);
|
||||
_Text = CBase.Base.Language.Translate(_Text, value);
|
||||
_PositionNeedsUpdate = true;
|
||||
_TranslationID = value;
|
||||
}
|
||||
@@ -248,9 +247,8 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public float Alpha = 1f;
|
||||
|
||||
public CText(Basic Base, int PartyModeID)
|
||||
public CText(int PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -282,7 +280,6 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public CText(CText text)
|
||||
{
|
||||
_Base = text._Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -314,9 +311,8 @@ namespace Vocaluxe.Menu
|
||||
EditMode = text.EditMode;
|
||||
}
|
||||
|
||||
public CText(Basic Base, float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight)
|
||||
public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text, float rspace, float rheight)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -342,11 +338,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = true;
|
||||
@@ -354,9 +350,8 @@ namespace Vocaluxe.Menu
|
||||
ReflectionHeight = rheight;
|
||||
}
|
||||
|
||||
public CText(Basic Base, float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text)
|
||||
public CText(float x, float y, float z, EAlignment align, float h, float mw, float r, float g, float b, float a, EStyle style, string font, string text)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -382,19 +377,18 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = false;
|
||||
}
|
||||
|
||||
public CText(Basic Base, float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text, float rspace, float rheight)
|
||||
public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text, float rspace, float rheight)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -420,11 +414,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = true;
|
||||
@@ -432,9 +426,8 @@ namespace Vocaluxe.Menu
|
||||
ReflectionHeight = rheight;
|
||||
}
|
||||
|
||||
public CText(Basic Base, float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
|
||||
public CText(float x, float y, float z, float h, float mw, EAlignment align, EStyle style, string font, SColorF col, string text)
|
||||
{
|
||||
_Base = Base;
|
||||
_Theme = new SThemeText();
|
||||
_ThemeLoaded = false;
|
||||
_ButtonText = false;
|
||||
@@ -460,11 +453,11 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (MaxWidth > 0)
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
}
|
||||
|
||||
Reflection = false;
|
||||
@@ -491,7 +484,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -503,7 +496,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
if (xmlReader.GetValue(item + "/SColor", ref _Theme.SColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.SColorName, SkinIndex, ref SColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -549,9 +542,9 @@ namespace Vocaluxe.Menu
|
||||
LoadTextures();
|
||||
|
||||
if (MaxWidth > 0)
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), MaxWidth, 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), MaxWidth, 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
else
|
||||
Bounds = new SRectF(-_Base.Settings.GetRenderW(), -_Base.Settings.GetRenderH(), 3f * _Base.Settings.GetRenderW(), 3f * _Base.Settings.GetRenderH(), 0f);
|
||||
Bounds = new SRectF(-CBase.Base.Settings.GetRenderW(), -CBase.Base.Settings.GetRenderH(), 3f * CBase.Base.Settings.GetRenderW(), 3f * CBase.Base.Settings.GetRenderH(), 0f);
|
||||
|
||||
_ButtonText = ButtonText;
|
||||
}
|
||||
@@ -622,7 +615,7 @@ namespace Vocaluxe.Menu
|
||||
writer.WriteElementString("Font", Fon);
|
||||
|
||||
writer.WriteComment("<Text>: Nothing or translation tag");
|
||||
if (_Base.Language.TranslationExists(_Theme.Text))
|
||||
if (CBase.Base.Language.TranslationExists(_Theme.Text))
|
||||
writer.WriteElementString("Text", _Theme.Text);
|
||||
else
|
||||
writer.WriteElementString("Text", string.Empty);
|
||||
@@ -661,7 +654,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(bool ForceDraw)
|
||||
{
|
||||
if (!ForceDraw && !Visible && _Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
if (!ForceDraw && !Visible && CBase.Base.Settings.GetGameState() != EGameState.EditTheme)
|
||||
return;
|
||||
|
||||
// Update Text
|
||||
@@ -670,8 +663,8 @@ namespace Vocaluxe.Menu
|
||||
if (_PositionNeedsUpdate)
|
||||
UpdateTextPosition();
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
|
||||
SColorF CurrentColor = new SColorF(Color);
|
||||
if (Selected)
|
||||
@@ -680,9 +673,9 @@ namespace Vocaluxe.Menu
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
CBase.Base.Fonts.DrawText(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
else
|
||||
_Base.Fonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
CBase.Base.Fonts.DrawText(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
@@ -702,15 +695,15 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text, _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
else
|
||||
_Base.Fonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text + "|", _DrawPosition.tH, _DrawPosition.X, _DrawPosition.Y, Z, color, ReflectionSpace + sFactor, ReflectionHeight);
|
||||
}
|
||||
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * _Base.Graphics.GetGlobalAlpha()),
|
||||
CBase.Base.Drawing.DrawColor(
|
||||
new SColorF(0.5f, 1f, 0.5f, 0.5f * CBase.Base.Graphics.GetGlobalAlpha()),
|
||||
new SRectF(_DrawPosition.X, _DrawPosition.Y, _DrawPosition.Width, _DrawPosition.Height, Z)
|
||||
);
|
||||
}
|
||||
@@ -718,7 +711,7 @@ namespace Vocaluxe.Menu
|
||||
|
||||
public void Draw(float begin, float end)
|
||||
{
|
||||
RectangleF bounds = _Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
float x = X;
|
||||
switch (Align)
|
||||
@@ -739,22 +732,22 @@ namespace Vocaluxe.Menu
|
||||
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||
CBase.Base.Fonts.DrawText(Text, Height, x, Y, Z, color, begin, end);
|
||||
else
|
||||
_Base.Fonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
|
||||
CBase.Base.Fonts.DrawText(Text + "|", Height, x, Y, Z, color, begin, end);
|
||||
|
||||
if (Reflection)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
||||
CBase.Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,10 +771,10 @@ namespace Vocaluxe.Menu
|
||||
float x = X + rx;
|
||||
float y = Y + ry;
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
|
||||
RectangleF bounds = _Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
if (bounds.Width > Bounds.W && Bounds.W > 0f && bounds.Width > 0f)
|
||||
{
|
||||
@@ -803,7 +796,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
|
||||
bounds = _Base.Fonts.GetTextBounds(this, h);
|
||||
bounds = CBase.Base.Fonts.GetTextBounds(this, h);
|
||||
}
|
||||
|
||||
switch (Align)
|
||||
@@ -825,13 +818,13 @@ namespace Vocaluxe.Menu
|
||||
|
||||
SColorF color = new SColorF(CurrentColor.R, CurrentColor.G, CurrentColor.B, CurrentColor.A * Alpha);
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawText(_Text, h, x, y, Z, color);
|
||||
CBase.Base.Fonts.DrawText(_Text, h, x, y, Z, color);
|
||||
else
|
||||
_Base.Fonts.DrawText(_Text + "|", h, x, y, Z, color);
|
||||
CBase.Base.Fonts.DrawText(_Text + "|", h, x, y, Z, color);
|
||||
|
||||
if (reflection)
|
||||
{
|
||||
@@ -839,14 +832,14 @@ namespace Vocaluxe.Menu
|
||||
float height = reflectionHeight - (rectHeight - Y) + bounds.Height;
|
||||
|
||||
if (!EditMode)
|
||||
_Base.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text, h, x, y, Z, color, space, height);
|
||||
else
|
||||
_Base.Fonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
|
||||
CBase.Base.Fonts.DrawTextReflection(_Text + "|", h, x, y, Z, color, space, height);
|
||||
}
|
||||
|
||||
if (Selected && (_Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
if (Selected && (CBase.Base.Settings.GetGameState() == EGameState.EditTheme))
|
||||
{
|
||||
_Base.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f * _Base.Graphics.GetGlobalAlpha()), new SRectF(x, y, bounds.Width, bounds.Height, Z));
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -857,10 +850,10 @@ namespace Vocaluxe.Menu
|
||||
public void LoadTextures()
|
||||
{
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
|
||||
if (_Theme.SColorName != String.Empty)
|
||||
SColor = _Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
SColor = CBase.Base.Theme.GetColor(_Theme.SColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -889,12 +882,12 @@ namespace Vocaluxe.Menu
|
||||
if (_Text == String.Empty)
|
||||
return;
|
||||
|
||||
_Base.Fonts.SetFont(Fon);
|
||||
_Base.Fonts.SetStyle(Style);
|
||||
CBase.Base.Fonts.SetFont(Fon);
|
||||
CBase.Base.Fonts.SetStyle(Style);
|
||||
|
||||
float h = Height;
|
||||
float y = Y;
|
||||
RectangleF bounds = _Base.Fonts.GetTextBounds(this, this.Height);
|
||||
RectangleF bounds = CBase.Base.Fonts.GetTextBounds(this, this.Height);
|
||||
|
||||
if (bounds.Width > Bounds.W && Bounds.W > 0f && bounds.Width > 0f)
|
||||
{
|
||||
@@ -916,7 +909,7 @@ namespace Vocaluxe.Menu
|
||||
break;
|
||||
}
|
||||
|
||||
bounds = _Base.Fonts.GetTextBounds(this, h);
|
||||
bounds = CBase.Base.Fonts.GetTextBounds(this, h);
|
||||
}
|
||||
|
||||
float x = X;
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
public class CXMLReader
|
||||
{
|
||||
public static Basic Base;
|
||||
private XPathNavigator _Navigator;
|
||||
|
||||
public CXMLReader(string uri)
|
||||
@@ -29,9 +28,7 @@ namespace Vocaluxe.Menu
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
if (Base != null)
|
||||
Base.Log.LogError("Can't open XML file: " + sUri);
|
||||
|
||||
CBase.Base.Log.LogError("Can't open XML file: " + sUri);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Vocaluxe.Menu
|
||||
{
|
||||
public interface IMenu
|
||||
{
|
||||
void Initialize(Basic Base);
|
||||
void Initialize();
|
||||
|
||||
void LoadTheme(string XmlPath);
|
||||
void SaveTheme();
|
||||
|
||||
@@ -83,7 +83,6 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
public class CNote
|
||||
{
|
||||
private Basic _Base;
|
||||
private int _StartBeat;
|
||||
private int _Duration;
|
||||
private int _Tone;
|
||||
@@ -93,9 +92,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
private bool _Perfect; // for drawing perfect note effect
|
||||
|
||||
#region Contructors
|
||||
public CNote(Basic Base)
|
||||
public CNote()
|
||||
{
|
||||
_Base = Base;
|
||||
StartBeat = 0;
|
||||
Duration = 1;
|
||||
Tone = 0;
|
||||
@@ -107,7 +105,6 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
public CNote(CNote note)
|
||||
{
|
||||
_Base = note._Base;
|
||||
_StartBeat = note._StartBeat;
|
||||
_Duration = note._Duration;
|
||||
_Tone = note._Tone;
|
||||
@@ -117,8 +114,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
_Perfect = note._Perfect;
|
||||
}
|
||||
|
||||
public CNote(Basic Base, int StartBeat, int Duration, int Tone, string Text)
|
||||
: this(Base)
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text)
|
||||
: this()
|
||||
{
|
||||
this.StartBeat = StartBeat;
|
||||
this.Duration = Duration;
|
||||
@@ -127,8 +124,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
this.Text = Text;
|
||||
}
|
||||
|
||||
public CNote(Basic Base, int StartBeat, int Duration, int Tone, string Text, bool Hit)
|
||||
: this(Base)
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, bool Hit)
|
||||
: this()
|
||||
{
|
||||
this.StartBeat = StartBeat;
|
||||
this.Duration = Duration;
|
||||
@@ -138,14 +135,14 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
this.Hit = Hit;
|
||||
}
|
||||
|
||||
public CNote(Basic Base, int StartBeat, int Duration, int Tone, string Text, ENoteType NoteType)
|
||||
: this(Base, StartBeat, Duration, Tone, Text)
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, ENoteType NoteType)
|
||||
: this(StartBeat, Duration, Tone, Text)
|
||||
{
|
||||
this.NoteType = NoteType;
|
||||
}
|
||||
|
||||
public CNote(Basic Base, int StartBeat, int Duration, int Tone, string Text, bool Hit, ENoteType NoteType)
|
||||
: this(Base, StartBeat, Duration, Tone, Text)
|
||||
public CNote(int StartBeat, int Duration, int Tone, string Text, bool Hit, ENoteType NoteType)
|
||||
: this(StartBeat, Duration, Tone, Text)
|
||||
{
|
||||
this.NoteType = NoteType;
|
||||
this.Hit = Hit;
|
||||
@@ -194,7 +191,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
get { return _Tone; }
|
||||
set
|
||||
{
|
||||
if ((value >= _Base.Settings.GetToneMin()) && (value <= _Base.Settings.GetToneMax()))
|
||||
if ((value >= CBase.Base.Settings.GetToneMin()) && (value <= CBase.Base.Settings.GetToneMax()))
|
||||
_Tone = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
public abstract class CSingNotes : ISingNotes, IMenuElement
|
||||
{
|
||||
protected int _PartyModeID;
|
||||
private Basic _Base;
|
||||
private SThemeSingBar _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -63,10 +62,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
set { _BarPos = value; }
|
||||
}
|
||||
|
||||
public CSingNotes(Basic Base, int PartyModeID)
|
||||
public CSingNotes(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSingBar();
|
||||
_ThemeLoaded = false;
|
||||
|
||||
@@ -96,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[_Base.Settings.GetMaxNumPlayer(), _Base.Settings.GetMaxNumPlayer()];
|
||||
for (int numplayer = 0; numplayer < _Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
_BarPos = new SRectF[CBase.Base.Settings.GetMaxNumPlayer(), CBase.Base.Settings.GetMaxNumPlayer()];
|
||||
for (int numplayer = 0; numplayer < CBase.Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
{
|
||||
for (int player = 0; player < _Base.Settings.GetMaxNumPlayer(); player++)
|
||||
for (int player = 0; player < CBase.Base.Settings.GetMaxNumPlayer(); player++)
|
||||
{
|
||||
if (player <= numplayer)
|
||||
{
|
||||
@@ -160,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 < _Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
for (int numplayer = 0; numplayer < CBase.Base.Settings.GetMaxNumPlayer(); numplayer++)
|
||||
{
|
||||
for (int player = 0; player < _Base.Settings.GetMaxNumPlayer(); player++)
|
||||
for (int player = 0; player < CBase.Base.Settings.GetMaxNumPlayer(); player++)
|
||||
{
|
||||
if (player <= numplayer)
|
||||
{
|
||||
@@ -296,7 +294,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
CLine Line = _PlayerNotes[n].Lines[_PlayerNotes[n].LineNr];
|
||||
|
||||
if (_Base.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
DrawNoteLines(_PlayerNotes[n].Rect, new SColorF(0.5f, 0.5f, 0.5f, 0.5f * _PlayerNotes[n].Alpha));
|
||||
}
|
||||
@@ -306,7 +304,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
float w = _PlayerNotes[n].Rect.W;
|
||||
float h = _PlayerNotes[n].Rect.H;
|
||||
float dh = h / _Base.Settings.GetNumNoteLines() * (2f - (int)_Base.Game.GetPlayer()[_PlayerNotes[n].PlayerNr].Difficulty) / 4f;
|
||||
float dh = h / CBase.Base.Settings.GetNumNoteLines() * (2f - (int)CBase.Base.Game.GetPlayer()[_PlayerNotes[n].PlayerNr].Difficulty) / 4f;
|
||||
|
||||
float beats = Line.LastNoteBeat - Line.FirstNoteBeat + 1;
|
||||
|
||||
@@ -329,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 + (_Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / _Base.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Base.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / _Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
h / CBase.Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
@@ -346,9 +344,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
if (_Base.Config.GetDrawToneHelper() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.Config.GetDrawToneHelper() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
DrawToneHelper(n, (int)BaseLine, (_Base.Game.GetMidBeatD() - Line.FirstNoteBeat) / beats * w);
|
||||
DrawToneHelper(n, (int)BaseLine, (CBase.Base.Game.GetMidBeatD() - Line.FirstNoteBeat) / beats * w);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
@@ -367,7 +365,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
perfline.Draw();
|
||||
}
|
||||
|
||||
if (SingLine == null || SingLine.Count == 0 || _Base.Game.GetPlayer()[Player].CurrentLine == -1 || SingLine.Count <= _Base.Game.GetPlayer()[Player].CurrentLine)
|
||||
if (SingLine == null || SingLine.Count == 0 || CBase.Base.Game.GetPlayer()[Player].CurrentLine == -1 || SingLine.Count <= CBase.Base.Game.GetPlayer()[Player].CurrentLine)
|
||||
{
|
||||
foreach (CParticleEffect stars in _PlayerNotes[n].GoldenStars)
|
||||
{
|
||||
@@ -377,20 +375,20 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (CNote note in SingLine[_Base.Game.GetPlayer()[Player].CurrentLine].Notes)
|
||||
foreach (CNote note in SingLine[CBase.Base.Game.GetPlayer()[Player].CurrentLine].Notes)
|
||||
{
|
||||
if (note.StartBeat >= Line.FirstNoteBeat && note.EndBeat <= Line.LastNoteBeat)
|
||||
{
|
||||
float width = note.Duration / beats * w;
|
||||
|
||||
if (note.EndBeat == _Base.Game.GetCurrentBeatD())
|
||||
width -= (1 - (_Base.Game.GetMidBeatD() - _Base.Game.GetCurrentBeatD())) / beats * w;
|
||||
if (note.EndBeat == CBase.Base.Game.GetCurrentBeatD())
|
||||
width -= (1 - (CBase.Base.Game.GetMidBeatD() - CBase.Base.Game.GetCurrentBeatD())) / beats * w;
|
||||
|
||||
SRectF rect = new SRectF(
|
||||
_PlayerNotes[n].Rect.X + (note.StartBeat - Line.FirstNoteBeat) / beats * w,
|
||||
_PlayerNotes[n].Rect.Y + (_Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / _Base.Settings.GetNumNoteLines() * h - dh,
|
||||
_PlayerNotes[n].Rect.Y + (CBase.Base.Settings.GetNumNoteLines() - 1 - (note.Tone - BaseLine)/2) / CBase.Base.Settings.GetNumNoteLines() * h - dh,
|
||||
width,
|
||||
h / _Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
h / CBase.Base.Settings.GetNumNoteLines() + 2 * dh,
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
@@ -400,14 +398,14 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
DrawNote(rect, color, f);
|
||||
|
||||
if (note.EndBeat >= _Base.Game.GetCurrentBeatD() && note.Hit && note.NoteType == ENoteType.Golden)
|
||||
if (note.EndBeat >= CBase.Base.Game.GetCurrentBeatD() && note.Hit && note.NoteType == ENoteType.Golden)
|
||||
{
|
||||
SRectF re = new SRectF(rect);
|
||||
re.W = (_Base.Game.GetMidBeatD() - note.StartBeat) / beats * w;
|
||||
re.W = (CBase.Base.Game.GetMidBeatD() - note.StartBeat) / beats * w;
|
||||
AddFlare(re, n);
|
||||
}
|
||||
|
||||
if (note.Perfect && note.EndBeat < _Base.Game.GetCurrentBeatD())
|
||||
if (note.Perfect && note.EndBeat < CBase.Base.Game.GetCurrentBeatD())
|
||||
{
|
||||
AddPerfectNote(rect, n);
|
||||
note.Perfect = false;
|
||||
@@ -415,13 +413,13 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
}
|
||||
}
|
||||
|
||||
int currentLine = _Base.Game.GetPlayer()[Player].SingLine.Count - 1;
|
||||
int currentLine = CBase.Base.Game.GetPlayer()[Player].SingLine.Count - 1;
|
||||
if (currentLine > 0)
|
||||
{
|
||||
if (_Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine)
|
||||
if (CBase.Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine)
|
||||
{
|
||||
AddPerfectLine(n);
|
||||
_Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
CBase.Base.Game.GetPlayer()[Player].SingLine[currentLine - 1].PerfectLine = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,18 +520,18 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = _Base.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteMiddle = _Base.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture NoteEnd = _Base.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
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);
|
||||
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
|
||||
_Base.Drawing.DrawTexture(NoteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), Color);
|
||||
_Base.Drawing.DrawTexture(NoteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), Color);
|
||||
_Base.Drawing.DrawTexture(NoteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), Color);
|
||||
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);
|
||||
}
|
||||
|
||||
private void DrawNoteBG(SRectF Rect, SColorF Color, float factor, Stopwatch Timer)
|
||||
@@ -564,9 +562,9 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBackgroundBegin = _Base.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture NoteBackgroundMiddle = _Base.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture NoteBackgroundEnd = _Base.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
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);
|
||||
|
||||
float dx = NoteBackgroundBegin.width * r.H / NoteBackgroundBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
@@ -574,17 +572,17 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
SColorF col = new SColorF(Color.R, Color.G, Color.B, Color.A * alpha);
|
||||
|
||||
_Base.Drawing.DrawTexture(NoteBackgroundBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), col);
|
||||
_Base.Drawing.DrawTexture(NoteBackgroundMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), col);
|
||||
_Base.Drawing.DrawTexture(NoteBackgroundEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), col);
|
||||
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);
|
||||
}
|
||||
|
||||
protected void DrawNoteLines(SRectF Rect, SColorF Color)
|
||||
{
|
||||
for (int i = 0; i < _Base.Settings.GetNumNoteLines() - 1; i++)
|
||||
for (int i = 0; i < CBase.Base.Settings.GetNumNoteLines() - 1; i++)
|
||||
{
|
||||
float y = Rect.Y + Rect.H / _Base.Settings.GetNumNoteLines() * (i + 1);
|
||||
_Base.Drawing.DrawColor(Color, new SRectF(Rect.X, y, Rect.W, 1, -1.0f));
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -614,7 +612,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
);
|
||||
|
||||
int numstars = (int)(r.W * 0.25f);
|
||||
CParticleEffect stars = new CParticleEffect(_Base, _PartyModeID, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Star);
|
||||
CParticleEffect stars = new CParticleEffect(_PartyModeID, numstars, new SColorF(1f, 1f, 0f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Star);
|
||||
_PlayerNotes[n].GoldenStars.Add(stars);
|
||||
}
|
||||
}
|
||||
@@ -642,7 +640,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect flares = new CParticleEffect(_Base, _PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Flare);
|
||||
CParticleEffect flares = new CParticleEffect(_PartyModeID, 15, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinGoldenStarName, 20, EParticleType.Flare);
|
||||
_PlayerNotes[n].Flares.Add(flares);
|
||||
}
|
||||
|
||||
@@ -669,7 +667,7 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
STexture NoteBegin = _Base.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture NoteBegin = CBase.Base.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = NoteBegin.width * r.H / NoteBegin.height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
@@ -682,19 +680,19 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
CParticleEffect stars = new CParticleEffect(_Base, _PartyModeID, _Base.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticleType.PerfNoteStar);
|
||||
CParticleEffect stars = new CParticleEffect(_PartyModeID, CBase.Base.Game.GetRandom(2) + 1, new SColorF(1f, 1f, 1f, 1f), r, _Theme.SkinPerfectNoteStarName, 35, EParticleType.PerfNoteStar);
|
||||
_PlayerNotes[n].PerfectNoteEffect.Add(stars);
|
||||
}
|
||||
|
||||
private void AddPerfectLine(int n)
|
||||
{
|
||||
CParticleEffect twinkle = new CParticleEffect(_Base, _PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticleType.Twinkle);
|
||||
CParticleEffect twinkle = new CParticleEffect(_PartyModeID, 200, _PlayerNotes[n].Color, _PlayerNotes[n].Rect, _Theme.SkinGoldenStarName, 25, EParticleType.Twinkle);
|
||||
_PlayerNotes[n].PerfectLineTwinkle.Add(twinkle);
|
||||
}
|
||||
|
||||
private void DrawToneHelper(int n, int BaseLine, float XOffset)
|
||||
{
|
||||
int TonePlayer = _Base.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
int TonePlayer = CBase.Base.Record.GetToneAbs(_PlayerNotes[n].PlayerNr);
|
||||
|
||||
SRectF Rect = _PlayerNotes[n].Rect;
|
||||
|
||||
@@ -710,10 +708,10 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
if (XOffset > Rect.W)
|
||||
XOffset = Rect.W;
|
||||
|
||||
float dy = Rect.H / (_Base.Settings.GetNumNoteLines());
|
||||
float dy = Rect.H / (CBase.Base.Settings.GetNumNoteLines());
|
||||
SRectF rect = new SRectF(
|
||||
Rect.X - dy + XOffset,
|
||||
Rect.Y + dy * (_Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
Rect.Y + dy * (CBase.Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
Rect.Z
|
||||
@@ -725,8 +723,8 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
STexture ToneHelper = _Base.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
_Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
STexture ToneHelper = CBase.Base.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
|
||||
|
||||
while (TonePlayer - BaseLine < 12)
|
||||
@@ -737,13 +735,13 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
|
||||
rect = new SRectF(
|
||||
Rect.X - dy + XOffset,
|
||||
Rect.Y + dy * (_Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
Rect.Y + dy * (CBase.Base.Settings.GetNumNoteLines() - 1 - (TonePlayer - BaseLine) / 2f),
|
||||
dy,
|
||||
dy,
|
||||
Rect.Z
|
||||
);
|
||||
|
||||
_Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
CBase.Base.Drawing.DrawTexture(ToneHelper, rect, color);
|
||||
}
|
||||
|
||||
#region ThemeEdit
|
||||
|
||||
@@ -6,12 +6,10 @@ namespace Vocaluxe.Menu.SingNotes
|
||||
{
|
||||
class CSingNotesClassic : CSingNotes
|
||||
{
|
||||
private Basic _Base;
|
||||
|
||||
public CSingNotesClassic(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
public CSingNotesClassic(int PartyModeID)
|
||||
: base(PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,6 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public class CSong
|
||||
{
|
||||
private Basic _Base;
|
||||
private bool _CoverLoaded = false;
|
||||
private bool _NotesLoaded = false;
|
||||
private STexture _CoverTextureSmall = new STexture(-1);
|
||||
@@ -117,11 +116,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (this.CoverFileName != String.Empty)
|
||||
{
|
||||
if (!_Base.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, _Base.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = _Base.Cover.GetNoCover();
|
||||
if (!CBase.Base.DataBase.GetCover(Path.Combine(this.Folder, this.CoverFileName), ref _CoverTextureSmall, CBase.Base.Config.GetCoverSize()))
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
}
|
||||
else
|
||||
_CoverTextureSmall = _Base.Cover.GetNoCover();
|
||||
_CoverTextureSmall = CBase.Base.Cover.GetNoCover();
|
||||
|
||||
_CoverLoaded = true;
|
||||
}
|
||||
@@ -194,14 +193,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
public CSong(Basic Base)
|
||||
public CSong()
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
public CSong(CSong song)
|
||||
{
|
||||
this._Base = song._Base;
|
||||
this._CoverTextureSmall = song._CoverTextureSmall;
|
||||
this._CoverTextureBig = song._CoverTextureBig;
|
||||
|
||||
@@ -307,7 +304,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
this.Folder = Path.GetDirectoryName(FilePath);
|
||||
|
||||
foreach (string folder in _Base.Config.GetSongFolder())
|
||||
foreach (string folder in CBase.Base.Config.GetSongFolder())
|
||||
{
|
||||
if (this.Folder.Contains(folder))
|
||||
{
|
||||
@@ -434,7 +431,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Base.Log.LogError("Can't find audio file: " + Path.Combine(this.Folder, Value));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -484,7 +481,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (File.Exists(Path.Combine(this.Folder, Value)))
|
||||
this.VideoFileName = Value;
|
||||
else
|
||||
_Base.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
CBase.Base.Log.LogError("Can't find video file: " + Path.Combine(this.Folder, Value));
|
||||
|
||||
break;
|
||||
case "VIDEOGAP":
|
||||
@@ -540,25 +537,25 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Title) == 0)
|
||||
{
|
||||
_Base.Log.LogError("Title tag missing: " + FilePath);
|
||||
CBase.Base.Log.LogError("Title tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.Artist) == 0)
|
||||
{
|
||||
_Base.Log.LogError("Artist tag missing: " + FilePath);
|
||||
CBase.Base.Log.LogError("Artist tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.MP3) == 0)
|
||||
{
|
||||
_Base.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
CBase.Base.Log.LogError("MP3 tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((HeaderFlags & EHeaderFlags.BPM) == 0)
|
||||
{
|
||||
_Base.Log.LogError("BPM tag missing: " + FilePath);
|
||||
CBase.Base.Log.LogError("BPM tag missing: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -567,7 +564,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (this.Medley.StartBeat > this.Medley.EndBeat)
|
||||
{
|
||||
_Base.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
CBase.Base.Log.LogError("MedleyStartBeat is bigger than MedleyEndBeat in file: " + FilePath);
|
||||
HeaderFlags = HeaderFlags - EHeaderFlags.MedleyStartBeat - EHeaderFlags.MedleyEndBeat;
|
||||
}
|
||||
}
|
||||
@@ -577,7 +574,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//PreviewStart is not set or <=0
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0)
|
||||
//fallback to MedleyStart
|
||||
this.PreviewStart = _Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
else
|
||||
//else set to 0, it will be set in FindRefrainStart
|
||||
this.PreviewStart = 0f;
|
||||
@@ -586,8 +583,8 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0 && (HeaderFlags & EHeaderFlags.MedleyEndBeat) != 0)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Tag;
|
||||
this.Medley.FadeInTime = _Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = _Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
#endregion check medley tags
|
||||
|
||||
@@ -595,7 +592,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
CBase.Base.Log.LogError("Error reading txt header in file \"" + FilePath + "\": " + e.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -623,7 +620,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (!File.Exists(FilePath))
|
||||
{
|
||||
_Base.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
CBase.Base.Log.LogError("Error loading song. The file does not exist: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -655,7 +652,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (sr.EndOfStream || (line.Length == 0))
|
||||
{
|
||||
_Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". The file is empty or it starts with an empty line: " + FilePath);
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". The file is empty or it starts with an empty line: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -679,7 +676,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Player = 2;
|
||||
else
|
||||
{
|
||||
_Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Wrong or missing number after \"P\": " + FilePath);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -726,7 +723,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
if (isNewSentence)
|
||||
{
|
||||
_Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". Double sentence break: " + FilePath);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -768,7 +765,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
CBase.Base.Log.LogError("Error loading song. Line No.: " + FileLineNo.ToString() + ". An unhandled exception occured (" + e.Message + "): " + FilePath);
|
||||
return false;
|
||||
}
|
||||
FindRefrain();
|
||||
@@ -781,7 +778,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private void ParseNote(int Player, ENoteType NoteType, int Start, int Length, int Tone, string Text)
|
||||
{
|
||||
CNote note = new CNote(_Base, Start, Length, Tone, Text, NoteType);
|
||||
CNote note = new CNote(Start, Length, Tone, Text, NoteType);
|
||||
CLines lines = this.Notes.GetLines(Player);
|
||||
|
||||
if (lines.LineCount == 0)
|
||||
@@ -847,12 +844,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (DuetPart1 == String.Empty)
|
||||
{
|
||||
DuetPart1 = "Part 1";
|
||||
_Base.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P1-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
if (DuetPart2 == String.Empty)
|
||||
{
|
||||
DuetPart2 = "Part 2";
|
||||
_Base.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
CBase.Base.Log.LogError("Warning: Can't find #P2-tag for duets in \"" + this.Artist + " - " + this.Title + "\".");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,7 +930,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
|
||||
// set medley vars
|
||||
if (series.Count > 0 && series[longest].length > _Base.Settings.GetMedleyMinSeriesLength())
|
||||
if (series.Count > 0 && series[longest].length > CBase.Base.Settings.GetMedleyMinSeriesLength())
|
||||
{
|
||||
this.Medley.StartBeat = lines.Line[series[longest].start].FirstNoteBeat;
|
||||
this.Medley.EndBeat = lines.Line[series[longest].end].LastNoteBeat;
|
||||
@@ -941,16 +938,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool foundEnd = false;
|
||||
|
||||
// set end if duration > MedleyMinDuration
|
||||
if (_Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + _Base.Settings.GetMedleyMinDuration() >
|
||||
_Base.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(this.Medley.EndBeat, this.BPM))
|
||||
foundEnd = true;
|
||||
|
||||
if (!foundEnd)
|
||||
{
|
||||
for (int i = series[longest].start + 1; i < lines.LineCount - 1; i++)
|
||||
{
|
||||
if (_Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + _Base.Settings.GetMedleyMinDuration() >
|
||||
_Base.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
if (CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM) + CBase.Base.Settings.GetMedleyMinDuration() >
|
||||
CBase.Base.Game.GetTimeFromBeats(lines.Line[i].LastNoteBeat, this.BPM))
|
||||
{
|
||||
foundEnd = true;
|
||||
this.Medley.EndBeat = lines.Line[i].LastNoteBeat;
|
||||
@@ -961,15 +958,15 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (foundEnd)
|
||||
{
|
||||
this.Medley.Source = EMedleySource.Calculated;
|
||||
this.Medley.FadeInTime = _Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = _Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
this.Medley.FadeInTime = CBase.Base.Settings.GetDefaultMedleyFadeInTime();
|
||||
this.Medley.FadeOutTime = CBase.Base.Settings.GetDefaultMedleyFadeOutTime();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.PreviewStart == 0f)
|
||||
{
|
||||
if (this.Medley.Source == EMedleySource.Calculated)
|
||||
this.PreviewStart = _Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
this.PreviewStart = CBase.Base.Game.GetTimeFromBeats(this.Medley.StartBeat, this.BPM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,21 +11,19 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
public class CSongMenu : ISongMenu
|
||||
{
|
||||
private int _PartyModeID;
|
||||
private Basic _Base;
|
||||
|
||||
private ISongMenu _SongMenu;
|
||||
private ESongMenu _Type;
|
||||
|
||||
public CSongMenu(Basic Base, int PartyModeID)
|
||||
public CSongMenu(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
CreateSongMenu();
|
||||
}
|
||||
|
||||
public void UpdateSongMenuType()
|
||||
{
|
||||
if (_Type != _Base.Config.GetSongMenuType())
|
||||
if (_Type != CBase.Base.Config.GetSongMenuType())
|
||||
CreateSongMenu();
|
||||
}
|
||||
|
||||
@@ -208,7 +206,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_SongMenu.OnHide();
|
||||
}
|
||||
|
||||
switch (_Base.Config.GetSongMenuType())
|
||||
switch (CBase.Base.Config.GetSongMenuType())
|
||||
{
|
||||
//case ESongMenu.TR_CONFIG_LIST:
|
||||
// _SongMenu = new CSongMenuList();
|
||||
@@ -219,7 +217,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
// break;
|
||||
|
||||
case ESongMenu.TR_CONFIG_TILE_BOARD:
|
||||
_SongMenu = new CSongMenuTileBoard(_Base, _PartyModeID);
|
||||
_SongMenu = new CSongMenuTileBoard(_PartyModeID);
|
||||
break;
|
||||
|
||||
//case ESongMenu.TR_CONFIG_BOOK:
|
||||
@@ -227,7 +225,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
// break;
|
||||
}
|
||||
|
||||
_Type = _Base.Config.GetSongMenuType();
|
||||
_Type = CBase.Base.Config.GetSongMenuType();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
class CSongMenuBook : CSongMenuFramework
|
||||
{
|
||||
new private Basic _Base;
|
||||
|
||||
public CSongMenuBook(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
public CSongMenuBook(int PartyModeID)
|
||||
: base(PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
class CSongMenuDreidel : CSongMenuFramework
|
||||
{
|
||||
new private Basic _Base;
|
||||
/*
|
||||
private SRectF _ScrollRect;
|
||||
private CStatic _CoverBig;
|
||||
@@ -29,10 +28,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
*/
|
||||
|
||||
public CSongMenuDreidel(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
public CSongMenuDreidel(int PartyModeID)
|
||||
: base(PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
|
||||
@@ -91,7 +91,6 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
abstract class CSongMenuFramework : ISongMenu
|
||||
{
|
||||
protected int _PartyModeID;
|
||||
protected Basic _Base;
|
||||
protected SThemeSongMenu _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
@@ -233,22 +232,21 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_Visible = Visible;
|
||||
}
|
||||
|
||||
public CSongMenuFramework(Basic Base, int PartyModeID)
|
||||
public CSongMenuFramework(int PartyModeID)
|
||||
{
|
||||
_PartyModeID = PartyModeID;
|
||||
_Base = Base;
|
||||
_Theme = new SThemeSongMenu();
|
||||
|
||||
_Theme.songMenuTileBoard.TextArtist = new CText(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextTitle = new CText(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextSongLength = new CText(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextArtist = new CText(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextTitle = new CText(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.TextSongLength = new CText(_PartyModeID);
|
||||
|
||||
_Theme.songMenuTileBoard.StaticCoverBig = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticTextBG = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticDuetIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticVideoIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyCalcIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyTagIcon = new CStatic(_Base, _PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticCoverBig = new CStatic(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticTextBG = new CStatic(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticDuetIcon = new CStatic(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticVideoIcon = new CStatic(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyCalcIcon = new CStatic(_PartyModeID);
|
||||
_Theme.songMenuTileBoard.StaticMedleyTagIcon = new CStatic(_PartyModeID);
|
||||
|
||||
_ThemeLoaded = false;
|
||||
}
|
||||
@@ -272,7 +270,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (xmlReader.GetValue(item + "/Color", ref _Theme.ColorName, String.Empty))
|
||||
{
|
||||
_ThemeLoaded &= _Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
_ThemeLoaded &= CBase.Base.Theme.GetColor(_Theme.ColorName, SkinIndex, ref _Color);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -443,17 +441,17 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_streams.Count > 0 && _video != -1)
|
||||
{
|
||||
if (_Base.Video.IsFinished(_video) || _Base.Sound.IsFinished(_actsongstream))
|
||||
if (CBase.Base.Video.IsFinished(_video) || CBase.Base.Sound.IsFinished(_actsongstream))
|
||||
{
|
||||
_Base.Video.Close(_video);
|
||||
CBase.Base.Video.Close(_video);
|
||||
_video = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
float time = _Base.Sound.GetPosition(_actsongstream);
|
||||
float time = CBase.Base.Sound.GetPosition(_actsongstream);
|
||||
|
||||
float vtime = 0f;
|
||||
_Base.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
CBase.Base.Video.GetFrame(_video, ref _vidtex, time, ref vtime);
|
||||
if (_VideoFadeTimer.ElapsedMilliseconds <= 3000L)
|
||||
{
|
||||
_vidtex.color.A = (_VideoFadeTimer.ElapsedMilliseconds / 3000f);
|
||||
@@ -476,14 +474,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
_Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
_Base.Video.Close(_video);
|
||||
CBase.Base.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
_Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
@@ -509,7 +507,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (_video != -1)
|
||||
{
|
||||
_Base.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
CBase.Base.Drawing.DrawTexture(_vidtex, new SRectF(0, 0, 1280, 720, 0));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -520,7 +518,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
_Base.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
CBase.Base.Sound.SetStreamVolumeMax(stream, _MaxVolume);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,7 +539,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public virtual CStatic GetSelectedSongCover()
|
||||
{
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
return new CStatic(_PartyModeID);
|
||||
}
|
||||
|
||||
public virtual int GetSelectedCategory()
|
||||
@@ -581,7 +579,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
Init();
|
||||
|
||||
if (_Theme.ColorName != String.Empty)
|
||||
_Color = _Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
_Color = CBase.Base.Theme.GetColor(_Theme.ColorName, _PartyModeID);
|
||||
}
|
||||
|
||||
public void ReloadTextures()
|
||||
@@ -595,11 +593,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (Category >= _Base.Songs.GetNumCategories())
|
||||
if (Category >= CBase.Base.Songs.GetNumCategories())
|
||||
return;
|
||||
|
||||
Reset();
|
||||
_Base.Songs.SetCategory(Category);
|
||||
CBase.Base.Songs.SetCategory(Category);
|
||||
}
|
||||
|
||||
protected virtual void ShowCategories()
|
||||
@@ -607,59 +605,59 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (!_Initialized)
|
||||
return;
|
||||
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() != -1)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1)
|
||||
Reset();
|
||||
|
||||
Reset();
|
||||
_Base.Songs.SetCategory(-1);
|
||||
CBase.Base.Songs.SetCategory(-1);
|
||||
}
|
||||
|
||||
public void ApplyVolume()
|
||||
{
|
||||
_Base.Sound.SetStreamVolume(_actsongstream, _Base.Config.GetPreviewMusicVolume());
|
||||
CBase.Base.Sound.SetStreamVolume(_actsongstream, CBase.Base.Config.GetPreviewMusicVolume());
|
||||
}
|
||||
|
||||
protected void SelectSong(int nr)
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() >= 0 && (_Base.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && (CBase.Base.Songs.GetNumVisibleSongs() > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
_Base.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 1f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
_Base.Video.Close(_video);
|
||||
CBase.Base.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
_Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_actsong = nr;
|
||||
if (_actsong >= _Base.Songs.GetNumVisibleSongs())
|
||||
if (_actsong >= CBase.Base.Songs.GetNumVisibleSongs())
|
||||
_actsong = 0;
|
||||
|
||||
|
||||
int _stream = _Base.Sound.Load(Path.Combine(_Base.Songs.GetVisibleSong(_actsong).Folder, _Base.Songs.GetVisibleSong(_actsong).MP3FileName), true);
|
||||
_Base.Sound.SetStreamVolumeMax(_stream, _MaxVolume);
|
||||
_Base.Sound.SetStreamVolume(_stream, 0f);
|
||||
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);
|
||||
|
||||
float startposition = _Base.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
float startposition = CBase.Base.Songs.GetVisibleSong(_actsong).PreviewStart;
|
||||
|
||||
if (startposition == 0f)
|
||||
startposition = _Base.Sound.GetLength(_stream) / 4f;
|
||||
startposition = CBase.Base.Sound.GetLength(_stream) / 4f;
|
||||
|
||||
_Base.Sound.SetPosition(_stream, startposition);
|
||||
_Base.Sound.Play(_stream);
|
||||
_Base.Sound.Fade(_stream, 100f, 3f);
|
||||
CBase.Base.Sound.SetPosition(_stream, startposition);
|
||||
CBase.Base.Sound.Play(_stream);
|
||||
CBase.Base.Sound.Fade(_stream, 100f, 3f);
|
||||
_streams.Add(_stream);
|
||||
_actsongstream = _stream;
|
||||
|
||||
if (_Base.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && _Base.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
if (CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName != String.Empty && CBase.Base.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
_video = _Base.Video.Load(Path.Combine(_Base.Songs.GetVisibleSong(_actsong).Folder, _Base.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
_video = CBase.Base.Video.Load(Path.Combine(CBase.Base.Songs.GetVisibleSong(_actsong).Folder, CBase.Base.Songs.GetVisibleSong(_actsong).VideoFileName));
|
||||
if (_video == -1)
|
||||
return;
|
||||
_Base.Video.Skip(_video, startposition, _Base.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
CBase.Base.Video.Skip(_video, startposition, CBase.Base.Songs.GetVisibleSong(_actsong).VideoGap);
|
||||
_VideoFadeTimer.Stop();
|
||||
_VideoFadeTimer.Reset();
|
||||
_VideoFadeTimer.Start();
|
||||
@@ -671,14 +669,14 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
foreach (int stream in _streams)
|
||||
{
|
||||
_Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
CBase.Base.Sound.FadeAndStop(stream, 0f, 0.75f);
|
||||
}
|
||||
_streams.Clear();
|
||||
|
||||
_Base.Video.Close(_video);
|
||||
CBase.Base.Video.Close(_video);
|
||||
_video = -1;
|
||||
|
||||
_Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
CBase.Base.Drawing.RemoveTexture(ref _vidtex);
|
||||
|
||||
_timer.Stop();
|
||||
_timer.Reset();
|
||||
|
||||
@@ -6,12 +6,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
class CSongMenuList : CSongMenuFramework
|
||||
{
|
||||
new private Basic _Base;
|
||||
|
||||
public CSongMenuList(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
public CSongMenuList(int PartyModeID)
|
||||
: base(PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
class CSongMenuTileBoard : CSongMenuFramework
|
||||
{
|
||||
new private Basic _Base;
|
||||
private SRectF _ScrollRect;
|
||||
private List<CStatic> _Tiles;
|
||||
private CStatic _CoverBig;
|
||||
@@ -42,10 +41,9 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private bool _SmallView = false;
|
||||
|
||||
public CSongMenuTileBoard(Basic Base, int PartyModeID)
|
||||
: base(Base, PartyModeID)
|
||||
public CSongMenuTileBoard(int PartyModeID)
|
||||
: base(PartyModeID)
|
||||
{
|
||||
_Base = Base;
|
||||
}
|
||||
|
||||
public override int GetActualSelection()
|
||||
@@ -69,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 = _Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = _Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -79,12 +77,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
|
||||
_ScrollRect = new SRectF(0, 0, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
|
||||
_PreviewSelected = -1;
|
||||
_Offset = 0;
|
||||
@@ -118,7 +116,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && _Base.Songs.GetNumCategories() > 0 && _Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && CBase.Base.Songs.GetNumCategories() > 0 && CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
EnterCategory(0);
|
||||
}
|
||||
@@ -129,13 +127,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
//AfterCategoryChange();
|
||||
SetSelectedSong(_ActSong);
|
||||
AfterCategoryChange();
|
||||
_Base.Songs.UpdateRandomSongList();
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
|
||||
int actcat = _PreviewSelected;
|
||||
if ((_Base.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
if ((CBase.Base.Songs.GetNumCategories() > 0) && (actcat < 0))
|
||||
{
|
||||
_CoverBig.Texture = _Base.Songs.GetCategory(0).CoverTextureSmall;
|
||||
_Artist.Text = _Base.Songs.GetCategory(0).Name;
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(0).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(0).Name;
|
||||
_Title.Text = String.Empty;
|
||||
_SongLength.Text = String.Empty;
|
||||
_PreviewSelected = 0;
|
||||
@@ -146,7 +144,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyTagIcon.Visible = false;
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetNumVisibleSongs() == 0 && _Base.Songs.GetSearchFilter() != String.Empty)
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() == 0 && CBase.Base.Songs.GetSearchFilter() != String.Empty)
|
||||
{
|
||||
_CoverBig.Texture = _CoverBigTexture;
|
||||
_Artist.Text = String.Empty;
|
||||
@@ -207,7 +205,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
switch (KeyEvent.Key)
|
||||
{
|
||||
case Keys.Enter:
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() < 0)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0)
|
||||
{
|
||||
EnterCategory(_PreviewSelected);
|
||||
KeyEvent.Handled = true;
|
||||
@@ -220,71 +218,71 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
case Keys.Escape:
|
||||
case Keys.Back:
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() > -1 && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
KeyEvent.Handled = true;
|
||||
}
|
||||
//else if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//else if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF)
|
||||
//{
|
||||
// CGraphics.FadeTo(EScreens.ScreenMain);
|
||||
//}
|
||||
break;
|
||||
|
||||
case Keys.PageUp:
|
||||
if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.PageDown:
|
||||
if (_Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && _Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > 0 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked--;
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() < 0 && _Locked < _Base.Songs.GetNumCategories() - _NumW ||
|
||||
_Base.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < _Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && _Locked < CBase.Base.Songs.GetNumCategories() - _NumW ||
|
||||
CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Right:
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < _Base.Songs.GetNumCategories() - 1)
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - 1)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < _Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() != -1 && _Locked < _Base.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && _Locked < CBase.Base.Songs.GetNumVisibleSongs() - 1 && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked++;
|
||||
if (_Locked < _Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
if (KeyEvent.ModSHIFT && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
PrevCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && _Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
if (_Locked > _NumW - 1 && (!SongOptions.Selection.RandomOnly || SongOptions.Selection.CategoryChangeAllowed && CBase.Base.Songs.GetCurrentCategoryIndex() < 0))
|
||||
{
|
||||
_Locked -= _NumW;
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
@@ -292,28 +290,28 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
if (KeyEvent.ModSHIFT && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (KeyEvent.ModSHIFT && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
NextCategory();
|
||||
break;
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
if (_Locked < _Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < _Base.Songs.GetNumCategories() - _NumW)
|
||||
if (_Locked < CBase.Base.Songs.GetNumCategories() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_Locked < _Base.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW && !SongOptions.Selection.RandomOnly)
|
||||
{
|
||||
_Locked += _NumW;
|
||||
if (_Locked < _Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
if (_Locked < CBase.Base.Songs.GetNumVisibleSongs() - _NumW)
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
}
|
||||
}
|
||||
@@ -343,13 +341,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
bool sel = false;
|
||||
int lastselection = _actualSelection;
|
||||
|
||||
if (!SongOptions.Selection.RandomOnly || _Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if (!SongOptions.Selection.RandomOnly || CBase.Base.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 || _Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (MouseEvent.LB || CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (_PreviewSelected == i + _Offset)
|
||||
_Locked = _PreviewSelected;
|
||||
@@ -374,29 +372,29 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
sel = true;
|
||||
|
||||
if (MouseEvent.Sender == ESender.WiiMote && _actualSelection != lastselection && _actualSelection != -1)
|
||||
_Base.Input.SetRumble(0.050f);
|
||||
CBase.Base.Input.SetRumble(0.050f);
|
||||
|
||||
if (!sel)
|
||||
_actualSelection = -1;
|
||||
|
||||
if ((MouseEvent.RB) && (_Base.Songs.GetNumCategories() > 0) && _Base.Songs.GetCurrentCategoryIndex() >= 0 && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
if ((MouseEvent.RB) && (CBase.Base.Songs.GetNumCategories() > 0) && CBase.Base.Songs.GetCurrentCategoryIndex() >= 0 && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_ON && SongOptions.Selection.CategoryChangeAllowed)
|
||||
{
|
||||
ShowCategories();
|
||||
MouseEvent.Handled = true;
|
||||
return;
|
||||
}
|
||||
else if (MouseEvent.RB && _Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
else if (MouseEvent.RB && CBase.Base.Songs.GetTabs() == EOffOn.TR_CONFIG_OFF && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
_Base.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
CBase.Base.Graphics.FadeTo(EScreens.ScreenMain);
|
||||
}
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && _Base.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
else if (_PreviewSelected != -1 && MouseEvent.LB && CBase.Base.Songs.GetCurrentCategoryIndex() != -1 && !SongOptions.Selection.PartyMode)
|
||||
{
|
||||
if (CHelper.IsInBounds(_CoverBig.Rect, MouseEvent) || CHelper.IsInBounds(_TextBG.Rect, MouseEvent))
|
||||
{
|
||||
_Locked = _PreviewSelected;
|
||||
}
|
||||
}
|
||||
else if ((MouseEvent.LB) && (_Base.Songs.GetCurrentCategoryIndex() == -1))
|
||||
else if ((MouseEvent.LB) && (CBase.Base.Songs.GetCurrentCategoryIndex() == -1))
|
||||
{
|
||||
foreach (CStatic tile in _Tiles)
|
||||
{
|
||||
@@ -411,10 +409,10 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel > 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || _Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() >= 0 && _Base.Songs.GetNumVisibleSongs() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1) ||
|
||||
_Base.Songs.GetCurrentCategoryIndex() < 0 && _Base.Songs.GetNumCategories() > _Offset + _NumW * MouseEvent.Wheel + _NumW * (_NumH - 1))
|
||||
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))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
UpdateList(_Offset);
|
||||
@@ -424,7 +422,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
if (MouseEvent.Wheel < 0)
|
||||
{
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || _Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
if (CHelper.IsInBounds(_ScrollRect, MouseEvent) && (!SongOptions.Selection.RandomOnly || CBase.Base.Songs.GetCurrentCategoryIndex() < 0 && SongOptions.Selection.CategoryChangeAllowed))
|
||||
{
|
||||
_Offset += _NumW * MouseEvent.Wheel;
|
||||
if (_Offset < 0)
|
||||
@@ -451,12 +449,12 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
int actsong = _PreviewSelected;
|
||||
if ((_Base.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
if ((CBase.Base.Songs.GetNumVisibleSongs() > actsong) && (actsong >= 0))
|
||||
{
|
||||
CSong song = _Base.Songs.GetVisibleSong(actsong);
|
||||
CSong song = CBase.Base.Songs.GetVisibleSong(actsong);
|
||||
|
||||
_CoverBig.Texture = song.CoverTextureSmall;
|
||||
_Artist.Text = song.Artist;
|
||||
@@ -466,7 +464,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
_MedleyCalcIcon.Visible = song.Medley.Source == EMedleySource.Calculated;
|
||||
_MedleyTagIcon.Visible = song.Medley.Source == EMedleySource.Tag;
|
||||
|
||||
float Time = _Base.Sound.GetLength(_SongStream);
|
||||
float Time = CBase.Base.Sound.GetLength(_SongStream);
|
||||
if (song.Finish != 0)
|
||||
Time = song.Finish;
|
||||
|
||||
@@ -479,16 +477,16 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
else
|
||||
{
|
||||
int actcat = _PreviewSelected;
|
||||
if ((_Base.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
if ((CBase.Base.Songs.GetNumCategories() > actcat) && (actcat >= 0))
|
||||
{
|
||||
_CoverBig.Texture = _Base.Songs.GetCategory(actcat).CoverTextureSmall;
|
||||
_Artist.Text = _Base.Songs.GetCategory(actcat).Name;
|
||||
_CoverBig.Texture = CBase.Base.Songs.GetCategory(actcat).CoverTextureSmall;
|
||||
_Artist.Text = CBase.Base.Songs.GetCategory(actcat).Name;
|
||||
|
||||
int num = _Base.Songs.NumSongsInCategory(actcat);
|
||||
int num = CBase.Base.Songs.NumSongsInCategory(actcat);
|
||||
if (num != 1)
|
||||
_Title.Text = _Base.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONGS").Replace("%v", num.ToString());
|
||||
else
|
||||
_Title.Text = _Base.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
_Title.Text = CBase.Base.Language.Translate("TR_SCREENSONG_NUMSONG").Replace("%v", num.ToString());
|
||||
|
||||
_SongLength.Text = String.Empty;
|
||||
_DuetIcon.Visible = false;
|
||||
@@ -510,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);
|
||||
|
||||
_Base.Drawing.DrawTexture(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Base.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);
|
||||
_Base.Drawing.DrawTextureReflection(_vidtex, new SRectF(rect.X, rect.Y, rect.Width, rect.Height, _CoverBig.Rect.Z),
|
||||
CBase.Base.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);
|
||||
}
|
||||
|
||||
@@ -540,7 +538,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (tile.Selected)
|
||||
return new CStatic(tile);
|
||||
}
|
||||
return new CStatic(_Base, _PartyModeID);
|
||||
return new CStatic(_PartyModeID);
|
||||
}
|
||||
|
||||
public override void SetSelectedSong(int VisibleSongNr)
|
||||
@@ -550,7 +548,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (VisibleSongNr < 0)
|
||||
return;
|
||||
|
||||
if (_Base.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > VisibleSongNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -607,7 +605,7 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (CategoryNr < 0)
|
||||
return;
|
||||
|
||||
if (_Base.Songs.GetNumCategories() > CategoryNr)
|
||||
if (CBase.Base.Songs.GetNumCategories() > CategoryNr)
|
||||
{
|
||||
bool sel = false;
|
||||
foreach (CStatic tile in _Tiles)
|
||||
@@ -680,19 +678,19 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
private void NextCategory()
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
_Base.Songs.NextCategory();
|
||||
EnterCategory(_Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Base.Songs.NextCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
private void PrevCategory()
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
_Base.Songs.PrevCategory();
|
||||
EnterCategory(_Base.Songs.GetCurrentCategoryIndex());
|
||||
CBase.Base.Songs.PrevCategory();
|
||||
EnterCategory(CBase.Base.Songs.GetCurrentCategoryIndex());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,26 +707,26 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
if (_actualSelection >= 0 && _actualSelection < _Tiles.Count)
|
||||
_Tiles[_actualSelection].Selected = true;
|
||||
|
||||
if ((_LastKnownNumSongs == _Base.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == _Base.Songs.GetCurrentCategoryIndex()))
|
||||
if ((_LastKnownNumSongs == CBase.Base.Songs.GetNumVisibleSongs()) && (_LastKnownCategory == CBase.Base.Songs.GetCurrentCategoryIndex()))
|
||||
return;
|
||||
|
||||
_LastKnownCategory = _Base.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = _Base.Songs.GetNumVisibleSongs();
|
||||
_LastKnownCategory = CBase.Base.Songs.GetCurrentCategoryIndex();
|
||||
_LastKnownNumSongs = CBase.Base.Songs.GetNumVisibleSongs();
|
||||
UpdateList(0);
|
||||
_Base.Songs.UpdateRandomSongList();
|
||||
CBase.Base.Songs.UpdateRandomSongList();
|
||||
}
|
||||
|
||||
private void UpdateList(int offset)
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() > -1)
|
||||
{
|
||||
if (offset >= (_Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (_Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumVisibleSongs() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset >= (_Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (_Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
if (offset >= (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1)))
|
||||
offset = (CBase.Base.Songs.GetNumCategories() / _NumW) * _NumW - (_NumW * (_NumH - 1));
|
||||
}
|
||||
|
||||
if (offset < 0)
|
||||
@@ -736,11 +734,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
|
||||
for (int i = 0; i < _Tiles.Count; i++)
|
||||
{
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() >= 0)
|
||||
{
|
||||
if (_Base.Songs.GetNumVisibleSongs() > i + offset)
|
||||
if (CBase.Base.Songs.GetNumVisibleSongs() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = _Base.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetVisibleSong(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -750,11 +748,11 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
}
|
||||
}
|
||||
|
||||
if (_Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
if (CBase.Base.Songs.GetCurrentCategoryIndex() == -1)
|
||||
{
|
||||
if (_Base.Songs.GetNumCategories() > i + offset)
|
||||
if (CBase.Base.Songs.GetNumCategories() > i + offset)
|
||||
{
|
||||
_Tiles[i].Texture = _Base.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Texture = CBase.Base.Songs.GetCategory(i + offset).CoverTextureSmall;
|
||||
_Tiles[i].Color = new SColorF(1f, 1f, 1f, 1f);
|
||||
}
|
||||
else
|
||||
@@ -781,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 = _Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = _Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -791,13 +789,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRectSmall.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRectSmall.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRectSmall;
|
||||
_ScrollRect = new SRectF(0, 0, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRectSmall.Z);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -807,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 = _Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = _Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
_CoverTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBackgroundName, _PartyModeID);
|
||||
_CoverBigTexture = CBase.Base.Theme.GetSkinTexture(_Theme.CoverBigBackgroundName, _PartyModeID);
|
||||
|
||||
_Tiles = new List<CStatic>();
|
||||
for (int i = 0; i < _NumH; i++)
|
||||
@@ -817,13 +815,13 @@ namespace Vocaluxe.Menu.SongMenu
|
||||
{
|
||||
SRectF rect = new SRectF(_Theme.songMenuTileBoard.TileRect.X + j * (_TileW + _SpaceW),
|
||||
_Theme.songMenuTileBoard.TileRect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, _Rect.Z);
|
||||
CStatic tile = new CStatic(_Base, _PartyModeID, _CoverTexture, Color, rect);
|
||||
CStatic tile = new CStatic(_PartyModeID, _CoverTexture, Color, rect);
|
||||
_Tiles.Add(tile);
|
||||
}
|
||||
}
|
||||
|
||||
_Rect = _Theme.songMenuTileBoard.TileRect;
|
||||
_ScrollRect = new SRectF(0, 0, _Base.Settings.GetRenderW(), _Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
_ScrollRect = new SRectF(0, 0, CBase.Base.Settings.GetRenderW(), CBase.Base.Settings.GetRenderH(), _Theme.songMenuTileBoard.TileRect.Z);
|
||||
}
|
||||
|
||||
UpdateList((_Locked / _NumW) * _NumW - (_NumW * (_NumH - 2)));
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Menu\CBackground.cs" />
|
||||
<Compile Include="Menu\CBasic.cs" />
|
||||
<Compile Include="Menu\CButton.cs" />
|
||||
<Compile Include="Menu\CEqualizer.cs" />
|
||||
<Compile Include="Menu\CHelper.cs" />
|
||||
|
||||
Reference in new issue
Block a user