More refactoring (unused stuff removed)
This commit is contained in:
1 parent
ec766aa7b5
commit
477b023520
38 files changed
+217
-350
No files matched your search
@@ -1844,7 +1844,7 @@
|
|||||||
<!--<Font>: Text font name-->
|
<!--<Font>: Text font name-->
|
||||||
<Font>Outline</Font>
|
<Font>Outline</Font>
|
||||||
<!--<Text>: Nothing or translation tag-->
|
<!--<Text>: Nothing or translation tag-->
|
||||||
<Text />
|
<Text>%a - %t</Text>
|
||||||
<!--<Reflection> If exists:-->
|
<!--<Reflection> If exists:-->
|
||||||
<!-- <Space>: Reflection Space-->
|
<!-- <Space>: Reflection Space-->
|
||||||
<!-- <Height>: Reflection Height-->
|
<!-- <Height>: Reflection Height-->
|
||||||
|
|||||||
@@ -643,13 +643,12 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
int pos = 1;
|
int pos = 1;
|
||||||
int lastPoints = 0;
|
int lastPoints = 0;
|
||||||
int lastSingPoints = 0;
|
int lastSingPoints = 0;
|
||||||
for (int i = 0; i < _GameData.ResultTable.Count; i++)
|
foreach (CResultTableRow resultRow in _GameData.ResultTable) {
|
||||||
{
|
if (lastPoints > resultRow.NumGamePoints || lastSingPoints > resultRow.NumSingPoints)
|
||||||
if (lastPoints > _GameData.ResultTable[i].NumGamePoints || lastSingPoints > _GameData.ResultTable[i].NumSingPoints)
|
|
||||||
pos++;
|
pos++;
|
||||||
_GameData.ResultTable[i].Position = pos;
|
resultRow.Position = pos;
|
||||||
lastPoints = _GameData.ResultTable[i].NumGamePoints;
|
lastPoints = resultRow.NumGamePoints;
|
||||||
lastSingPoints = _GameData.ResultTable[i].NumSingPoints;
|
lastSingPoints = resultRow.NumSingPoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -412,12 +412,11 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
_RoundsTable.Add(rtr);
|
_RoundsTable.Add(rtr);
|
||||||
}
|
}
|
||||||
//Create statics and texts for rounds
|
//Create statics and texts for rounds
|
||||||
for (int round = 0; round < _RoundsTable.Count; round++)
|
foreach (CRoundsTableRow roundRow in _RoundsTable) {
|
||||||
{
|
|
||||||
//Round-number
|
//Round-number
|
||||||
CText text = GetNewText(_Texts[_TextRoundNumber]);
|
CText text = GetNewText(_Texts[_TextRoundNumber]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].Number = text;
|
roundRow.Number = text;
|
||||||
for (int row = 0; row < 2; row++)
|
for (int row = 0; row < 2; row++)
|
||||||
{
|
{
|
||||||
for (int column = 0; column < 3; column++)
|
for (int column = 0; column < 3; column++)
|
||||||
@@ -425,11 +424,11 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
//Player
|
//Player
|
||||||
text = GetNewText(_Texts[_TextRoundPlayer]);
|
text = GetNewText(_Texts[_TextRoundPlayer]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].TextPlayer.Add(text);
|
roundRow.TextPlayer.Add(text);
|
||||||
//Score
|
//Score
|
||||||
text = GetNewText(_Texts[_TextRoundScore]);
|
text = GetNewText(_Texts[_TextRoundScore]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].TextScores.Add(text);
|
roundRow.TextScores.Add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,11 +457,10 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
float delta = _Texts[_TextRoundNumber].Height;
|
float delta = _Texts[_TextRoundNumber].Height;
|
||||||
|
|
||||||
//Update statics and texts for rounds
|
//Update statics and texts for rounds
|
||||||
for (int round = 0; round < _RoundsTable.Count; round++)
|
foreach (CRoundsTableRow roundRow in _RoundsTable) {
|
||||||
{
|
|
||||||
//Round-number
|
//Round-number
|
||||||
_RoundsTable[round].Number.X = numberX;
|
roundRow.Number.X = numberX;
|
||||||
_RoundsTable[round].Number.Y = numberY;
|
roundRow.Number.Y = numberY;
|
||||||
int numInnerRows = (int)Math.Ceiling(_GameState.NumPlayerAtOnce / ((double)numPlayerInOneRow));
|
int numInnerRows = (int)Math.Ceiling(_GameState.NumPlayerAtOnce / ((double)numPlayerInOneRow));
|
||||||
for (int row = 0; row < numInnerRows; row++)
|
for (int row = 0; row < numInnerRows; row++)
|
||||||
{
|
{
|
||||||
@@ -479,14 +477,14 @@ namespace VocaluxeLib.PartyModes.Challenge
|
|||||||
float x = numberX + 15 + (CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow * (column - row * numPlayerInOneRow) +
|
float x = numberX + 15 + (CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow * (column - row * numPlayerInOneRow) +
|
||||||
((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2;
|
((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2;
|
||||||
float maxw = ((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2 - 5;
|
float maxw = ((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2 - 5;
|
||||||
_RoundsTable[round].TextPlayer[column].X = x;
|
roundRow.TextPlayer[column].X = x;
|
||||||
_RoundsTable[round].TextPlayer[column].Y = numberY;
|
roundRow.TextPlayer[column].Y = numberY;
|
||||||
_RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
roundRow.TextPlayer[column].MaxWidth = maxw;
|
||||||
//Score
|
//Score
|
||||||
_RoundsTable[round].TextScores[column] = _RoundsTable[round].TextScores[column];
|
roundRow.TextScores[column] = roundRow.TextScores[column];
|
||||||
_RoundsTable[round].TextScores[column].X = x;
|
roundRow.TextScores[column].X = x;
|
||||||
_RoundsTable[round].TextScores[column].Y = numberY + delta;
|
roundRow.TextScores[column].Y = numberY + delta;
|
||||||
_RoundsTable[round].TextScores[column].MaxWidth = maxw;
|
roundRow.TextScores[column].MaxWidth = maxw;
|
||||||
}
|
}
|
||||||
numberY = numberY + delta + delta;
|
numberY = numberY + delta + delta;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,8 +155,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
if (_Combs.Count == 0)
|
if (_Combs.Count == 0)
|
||||||
_Create();
|
_Create();
|
||||||
|
|
||||||
CCombination combs = new CCombination();
|
|
||||||
|
|
||||||
if (_NumPlayer == _NumMics)
|
if (_NumPlayer == _NumMics)
|
||||||
return _Combs[0];
|
return _Combs[0];
|
||||||
|
|
||||||
|
|||||||
@@ -718,13 +718,12 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
int pos = 1;
|
int pos = 1;
|
||||||
int lastPoints = 0;
|
int lastPoints = 0;
|
||||||
int lastSingPoints = 0;
|
int lastSingPoints = 0;
|
||||||
for (int i = 0; i < _GameData.ResultTable.Count; i++)
|
foreach (CResultTableRow resultRow in _GameData.ResultTable) {
|
||||||
{
|
if (lastPoints > resultRow.NumGamePoints || lastSingPoints > resultRow.NumSingPoints)
|
||||||
if (lastPoints > _GameData.ResultTable[i].NumGamePoints || lastSingPoints > _GameData.ResultTable[i].NumSingPoints)
|
|
||||||
pos++;
|
pos++;
|
||||||
_GameData.ResultTable[i].Position = pos;
|
resultRow.Position = pos;
|
||||||
lastPoints = _GameData.ResultTable[i].NumGamePoints;
|
lastPoints = resultRow.NumGamePoints;
|
||||||
lastSingPoints = _GameData.ResultTable[i].NumSingPoints;
|
lastSingPoints = resultRow.NumSingPoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -412,12 +412,11 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
_RoundsTable.Add(rtr);
|
_RoundsTable.Add(rtr);
|
||||||
}
|
}
|
||||||
//Create statics and texts for rounds
|
//Create statics and texts for rounds
|
||||||
for (int round = 0; round < _RoundsTable.Count; round++)
|
foreach (CRoundsTableRow roundRow in _RoundsTable) {
|
||||||
{
|
|
||||||
//Round-number
|
//Round-number
|
||||||
CText text = GetNewText(_Texts[_TextRoundNumber]);
|
CText text = GetNewText(_Texts[_TextRoundNumber]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].Number = text;
|
roundRow.Number = text;
|
||||||
for (int row = 0; row < 2; row++)
|
for (int row = 0; row < 2; row++)
|
||||||
{
|
{
|
||||||
for (int column = 0; column < 3; column++)
|
for (int column = 0; column < 3; column++)
|
||||||
@@ -425,11 +424,11 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
//Player
|
//Player
|
||||||
text = GetNewText(_Texts[_TextRoundPlayer]);
|
text = GetNewText(_Texts[_TextRoundPlayer]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].TextPlayer.Add(text);
|
roundRow.TextPlayer.Add(text);
|
||||||
//Score
|
//Score
|
||||||
text = GetNewText(_Texts[_TextRoundScore]);
|
text = GetNewText(_Texts[_TextRoundScore]);
|
||||||
_AddText(text);
|
_AddText(text);
|
||||||
_RoundsTable[round].TextScores.Add(text);
|
roundRow.TextScores.Add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,11 +457,10 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
float delta = _Texts[_TextRoundNumber].Height;
|
float delta = _Texts[_TextRoundNumber].Height;
|
||||||
|
|
||||||
//Update statics and texts for rounds
|
//Update statics and texts for rounds
|
||||||
for (int round = 0; round < _RoundsTable.Count; round++)
|
foreach (CRoundsTableRow roundRow in _RoundsTable) {
|
||||||
{
|
|
||||||
//Round-number
|
//Round-number
|
||||||
_RoundsTable[round].Number.X = numberX;
|
roundRow.Number.X = numberX;
|
||||||
_RoundsTable[round].Number.Y = numberY;
|
roundRow.Number.Y = numberY;
|
||||||
int numInnerRows = (int)Math.Ceiling(_GameState.NumPlayerAtOnce / ((double)numPlayerInOneRow));
|
int numInnerRows = (int)Math.Ceiling(_GameState.NumPlayerAtOnce / ((double)numPlayerInOneRow));
|
||||||
for (int row = 0; row < numInnerRows; row++)
|
for (int row = 0; row < numInnerRows; row++)
|
||||||
{
|
{
|
||||||
@@ -479,14 +477,14 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
float x = numberX + 15 + (CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow * (column - row * numPlayerInOneRow) +
|
float x = numberX + 15 + (CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow * (column - row * numPlayerInOneRow) +
|
||||||
((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2;
|
((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2;
|
||||||
float maxw = ((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2 - 5;
|
float maxw = ((CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20) / numPlayerInThisRow) / 2 - 5;
|
||||||
_RoundsTable[round].TextPlayer[column].X = x;
|
roundRow.TextPlayer[column].X = x;
|
||||||
_RoundsTable[round].TextPlayer[column].Y = numberY;
|
roundRow.TextPlayer[column].Y = numberY;
|
||||||
_RoundsTable[round].TextPlayer[column].MaxWidth = maxw;
|
roundRow.TextPlayer[column].MaxWidth = maxw;
|
||||||
//Score
|
//Score
|
||||||
_RoundsTable[round].TextScores[column] = _RoundsTable[round].TextScores[column];
|
roundRow.TextScores[column] = roundRow.TextScores[column];
|
||||||
_RoundsTable[round].TextScores[column].X = x;
|
roundRow.TextScores[column].X = x;
|
||||||
_RoundsTable[round].TextScores[column].Y = numberY + delta;
|
roundRow.TextScores[column].Y = numberY + delta;
|
||||||
_RoundsTable[round].TextScores[column].MaxWidth = maxw;
|
roundRow.TextScores[column].MaxWidth = maxw;
|
||||||
}
|
}
|
||||||
numberY = numberY + delta + delta;
|
numberY = numberY + delta + delta;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
|
|
||||||
_Data.ScreenNames.ProfileIDs = new List<int>();
|
_Data.ScreenNames.ProfileIDs = new List<int>();
|
||||||
|
|
||||||
List<string> buttons = new List<string>();
|
|
||||||
_ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose};
|
_ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose};
|
||||||
|
|
||||||
_Data = new SDataFromScreen();
|
_Data = new SDataFromScreen();
|
||||||
@@ -459,21 +458,20 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
|||||||
|
|
||||||
private bool _OnAdd()
|
private bool _OnAdd()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _PlayerChooseButtons.Count; i++)
|
foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) {
|
||||||
{
|
if (chooseButton.Button.Selected && chooseButton.ProfileID != -1)
|
||||||
if (_PlayerChooseButtons[i].Button.Selected && _PlayerChooseButtons[i].ProfileID != -1)
|
|
||||||
{
|
{
|
||||||
if (_Data.ScreenNames.ProfileIDs.Count < _NumPlayer)
|
if (_Data.ScreenNames.ProfileIDs.Count < _NumPlayer)
|
||||||
{
|
{
|
||||||
_Data.ScreenNames.ProfileIDs.Add(_PlayerChooseButtons[i].ProfileID);
|
_Data.ScreenNames.ProfileIDs.Add(chooseButton.ProfileID);
|
||||||
int added = _Data.ScreenNames.ProfileIDs.Count - 1;
|
int added = _Data.ScreenNames.ProfileIDs.Count - 1;
|
||||||
_UpdateButtonNext();
|
_UpdateButtonNext();
|
||||||
//Update texture and name
|
//Update texture and name
|
||||||
_PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
_PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f);
|
||||||
_PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1);
|
_PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1);
|
||||||
_PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[_PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
_PlayerDestinationButtons[added].Texture = CBase.Profiles.GetProfiles()[chooseButton.ProfileID].Avatar.Texture;
|
||||||
_PlayerDestinationButtons[added].SelTexture = CBase.Profiles.GetProfiles()[_PlayerChooseButtons[i].ProfileID].Avatar.Texture;
|
_PlayerDestinationButtons[added].SelTexture = CBase.Profiles.GetProfiles()[chooseButton.ProfileID].Avatar.Texture;
|
||||||
_PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[_PlayerChooseButtons[i].ProfileID].PlayerName;
|
_PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetProfiles()[chooseButton.ProfileID].PlayerName;
|
||||||
_PlayerDestinationButtons[added].Enabled = true;
|
_PlayerDestinationButtons[added].Enabled = true;
|
||||||
//Update Tiles-List
|
//Update Tiles-List
|
||||||
_UpdateButtonPlayerChoose();
|
_UpdateButtonPlayerChoose();
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
_Data.ScreenNames.ProfileIDsTeam1 = new List<int>();
|
_Data.ScreenNames.ProfileIDsTeam1 = new List<int>();
|
||||||
_Data.ScreenNames.ProfileIDsTeam2 = new List<int>();
|
_Data.ScreenNames.ProfileIDsTeam2 = new List<int>();
|
||||||
|
|
||||||
List<string> buttons = new List<string>();
|
|
||||||
_ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose, _ButtonPlayerChooseScrollUp, _ButtonPlayerChooseScrollDown};
|
_ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose, _ButtonPlayerChooseScrollUp, _ButtonPlayerChooseScrollDown};
|
||||||
|
|
||||||
_Data = new SDataFromScreen();
|
_Data = new SDataFromScreen();
|
||||||
@@ -178,18 +177,17 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
|||||||
_OldMouseX = mouseEvent.X;
|
_OldMouseX = mouseEvent.X;
|
||||||
_OldMouseY = mouseEvent.Y;
|
_OldMouseY = mouseEvent.Y;
|
||||||
//Check if mouse if over tile
|
//Check if mouse if over tile
|
||||||
for (int i = 0; i < _PlayerChooseButtons.Count; i++)
|
foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) {
|
||||||
{
|
if (chooseButton.Button.Selected)
|
||||||
if (_PlayerChooseButtons[i].Button.Selected)
|
|
||||||
{
|
{
|
||||||
_SelectedPlayerNr = _PlayerChooseButtons[i].ProfileID;
|
_SelectedPlayerNr = chooseButton.ProfileID;
|
||||||
if (_SelectedPlayerNr != -1)
|
if (_SelectedPlayerNr != -1)
|
||||||
{
|
{
|
||||||
//Activate mouse-selecting
|
//Activate mouse-selecting
|
||||||
_SelectingMouseActive = true;
|
_SelectingMouseActive = true;
|
||||||
//Update of Drag/Drop-Texture
|
//Update of Drag/Drop-Texture
|
||||||
_ChooseAvatarStatic.Visible = true;
|
_ChooseAvatarStatic.Visible = true;
|
||||||
_ChooseAvatarStatic.Rect = _PlayerChooseButtons[i].Button.Rect;
|
_ChooseAvatarStatic.Rect = chooseButton.Button.Rect;
|
||||||
_ChooseAvatarStatic.Rect.Z = -100;
|
_ChooseAvatarStatic.Rect.Z = -100;
|
||||||
_ChooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
|
_ChooseAvatarStatic.Color = new SColorF(1, 1, 1, 1);
|
||||||
_ChooseAvatarStatic.Texture = CBase.Profiles.GetProfiles()[_SelectedPlayerNr].Avatar.Texture;
|
_ChooseAvatarStatic.Texture = CBase.Profiles.GetProfiles()[_SelectedPlayerNr].Avatar.Texture;
|
||||||
|
|||||||
@@ -280,7 +280,6 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
if (_PreviousFileNames.Count > 0 && _PreviousMusicIndex >= 0)
|
if (_PreviousFileNames.Count > 0 && _PreviousMusicIndex >= 0)
|
||||||
{
|
{
|
||||||
float pos = CSound.GetPosition(_CurrentMusicStream);
|
|
||||||
if (CSound.GetPosition(_CurrentMusicStream) >= 1.5f)
|
if (CSound.GetPosition(_CurrentMusicStream) >= 1.5f)
|
||||||
{
|
{
|
||||||
//Seek to #Start-Tag, if found
|
//Seek to #Start-Tag, if found
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
_CreateOrConvert(oldDBFilePath);
|
_CreateOrConvert(oldDBFilePath);
|
||||||
_CreateOrConvert(_HighscoreFilePath);
|
_CreateOrConvert(_HighscoreFilePath);
|
||||||
_ImportData(oldDBFilePath, _HighscoreFilePath);
|
_ImportData(oldDBFilePath);
|
||||||
|
|
||||||
File.Delete(oldDBFilePath);
|
File.Delete(oldDBFilePath);
|
||||||
}
|
}
|
||||||
@@ -916,7 +916,7 @@ namespace Vocaluxe.Base
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool _ImportData(string sourceDBPath, string destinationDBPath)
|
private static bool _ImportData(string sourceDBPath)
|
||||||
{
|
{
|
||||||
#region open db
|
#region open db
|
||||||
using (SQLiteConnection connSource = new SQLiteConnection())
|
using (SQLiteConnection connSource = new SQLiteConnection())
|
||||||
@@ -936,11 +936,9 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
using (SQLiteCommand cmdSource = new SQLiteCommand(connSource))
|
using (SQLiteCommand cmdSource = new SQLiteCommand(connSource))
|
||||||
{
|
{
|
||||||
SQLiteDataReader source;
|
|
||||||
|
|
||||||
#region import table scores
|
#region import table scores
|
||||||
cmdSource.CommandText = "SELECT SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty FROM Scores";
|
cmdSource.CommandText = "SELECT SongID, PlayerName, Score, LineNr, Date, Medley, Duet, ShortSong, Difficulty FROM Scores";
|
||||||
source = cmdSource.ExecuteReader();
|
SQLiteDataReader source = cmdSource.ExecuteReader();
|
||||||
if (source == null)
|
if (source == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1260,6 +1258,7 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
//If you want to add an image to db, call this method!
|
//If you want to add an image to db, call this method!
|
||||||
|
/*
|
||||||
private static bool _AddImageToCreditsDB(String imagePath)
|
private static bool _AddImageToCreditsDB(String imagePath)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
@@ -1333,6 +1332,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
private static bool _InitCreditsRessourcesDB()
|
private static bool _InitCreditsRessourcesDB()
|
||||||
{
|
{
|
||||||
@@ -1388,6 +1388,7 @@ namespace Vocaluxe.Base
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
private static void _CreateCreditsRessourcesDB()
|
private static void _CreateCreditsRessourcesDB()
|
||||||
{
|
{
|
||||||
using (SQLiteConnection connection = new SQLiteConnection())
|
using (SQLiteConnection connection = new SQLiteConnection())
|
||||||
@@ -1422,6 +1423,7 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endregion CreditsRessources
|
#endregion CreditsRessources
|
||||||
|
|
||||||
private static byte[] _GetBytes(SQLiteDataReader reader)
|
private static byte[] _GetBytes(SQLiteDataReader reader)
|
||||||
|
|||||||
+17
-18
@@ -273,41 +273,40 @@ namespace Vocaluxe.Base
|
|||||||
CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
|
CLog.StopBenchmark(1, "Load Theme " + Enum.GetNames(typeof(EScreens))[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
foreach (IMenu popup in _PopupScreens) {
|
||||||
{
|
popup.Init();
|
||||||
_PopupScreens[i].Init();
|
popup.LoadTheme(CTheme.GetThemeScreensPath(-1));
|
||||||
_PopupScreens[i].LoadTheme(CTheme.GetThemeScreensPath(-1));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ReloadTheme()
|
public static void ReloadTheme()
|
||||||
{
|
{
|
||||||
_ReloadCursor();
|
_ReloadCursor();
|
||||||
for (int i = 0; i < _Screens.Count; i++)
|
foreach (IMenu screen in _Screens)
|
||||||
_Screens[i].ReloadTheme(CTheme.GetThemeScreensPath(-1));
|
screen.ReloadTheme(CTheme.GetThemeScreensPath(-1));
|
||||||
|
|
||||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
foreach (IMenu popup in _PopupScreens)
|
||||||
_PopupScreens[i].ReloadTheme(CTheme.GetThemeScreensPath(-1));
|
popup.ReloadTheme(CTheme.GetThemeScreensPath(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ReloadSkin()
|
public static void ReloadSkin()
|
||||||
{
|
{
|
||||||
_ReloadCursor();
|
_ReloadCursor();
|
||||||
for (int i = 0; i < _Screens.Count; i++)
|
foreach (IMenu menu in _Screens)
|
||||||
_Screens[i].ReloadTextures();
|
menu.ReloadTextures();
|
||||||
|
|
||||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
foreach (IMenu menu in _PopupScreens)
|
||||||
_PopupScreens[i].ReloadTextures();
|
menu.ReloadTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SaveTheme()
|
public static void SaveTheme()
|
||||||
{
|
{
|
||||||
CTheme.SaveTheme();
|
CTheme.SaveTheme();
|
||||||
for (int i = 0; i < _Screens.Count; i++)
|
foreach (IMenu screen in _Screens)
|
||||||
_Screens[i].SaveTheme();
|
screen.SaveTheme();
|
||||||
|
|
||||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
foreach (IMenu popup in _PopupScreens)
|
||||||
_PopupScreens[i].SaveTheme();
|
popup.SaveTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void InitFirstScreen()
|
public static void InitFirstScreen()
|
||||||
@@ -444,8 +443,8 @@ namespace Vocaluxe.Base
|
|||||||
_OldScreen = _Screens[(int)_CurrentScreen];
|
_OldScreen = _Screens[(int)_CurrentScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _PopupScreens.Count; i++)
|
foreach (IMenu popup in _PopupScreens)
|
||||||
_PopupScreens[i].Draw();
|
popup.Draw();
|
||||||
|
|
||||||
_Cursor.Draw();
|
_Cursor.Draw();
|
||||||
_DrawDebugInfos();
|
_DrawDebugInfos();
|
||||||
|
|||||||
@@ -108,12 +108,7 @@ namespace Vocaluxe.Base
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Translate(string keyWord)
|
public static string Translate(string keyWord, int partyModeID = -1)
|
||||||
{
|
|
||||||
return Translate(keyWord, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string Translate(string keyWord, int partyModeID)
|
|
||||||
{
|
{
|
||||||
if (keyWord == null)
|
if (keyWord == null)
|
||||||
return "Error";
|
return "Error";
|
||||||
|
|||||||
+21
-21
@@ -100,33 +100,32 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
List<SPartyModeInfos> infos = new List<SPartyModeInfos>();
|
List<SPartyModeInfos> infos = new List<SPartyModeInfos>();
|
||||||
|
|
||||||
int[] usedKeys = new int[_PartyModes.Count];
|
int[] pmIDs = new int[_PartyModes.Count];
|
||||||
_PartyModes.Keys.CopyTo(usedKeys, 0);
|
_PartyModes.Keys.CopyTo(pmIDs, 0);
|
||||||
|
|
||||||
for (int i = 0; i < usedKeys.Length; i++)
|
foreach (int pmID in pmIDs) {
|
||||||
{
|
if (pmID != _NormalGameModeID)
|
||||||
if (usedKeys[i] != _NormalGameModeID)
|
|
||||||
{
|
{
|
||||||
SPartyMode mode;
|
SPartyMode mode;
|
||||||
_PartyModes.TryGetValue(usedKeys[i], out mode);
|
_PartyModes.TryGetValue(pmID, out mode);
|
||||||
|
|
||||||
if (mode.PartyMode != null)
|
if (mode.PartyMode != null)
|
||||||
{
|
{
|
||||||
SPartyModeInfos info = new SPartyModeInfos();
|
SPartyModeInfos info = new SPartyModeInfos
|
||||||
|
{
|
||||||
info.Author = mode.Author;
|
Author = mode.Author,
|
||||||
info.Description = mode.Description;
|
Description = mode.Description,
|
||||||
info.Name = mode.Name;
|
Name = mode.Name,
|
||||||
info.PartyModeID = mode.PartyModeID;
|
PartyModeID = mode.PartyModeID,
|
||||||
info.Playable = mode.NoErrors;
|
Playable = mode.NoErrors,
|
||||||
info.VersionMajor = mode.PartyModeVersionMajor;
|
VersionMajor = mode.PartyModeVersionMajor,
|
||||||
info.VersionMinor = mode.PartyModeVersionMinor;
|
VersionMinor = mode.PartyModeVersionMinor,
|
||||||
|
TargetAudience = mode.TargetAudience,
|
||||||
info.TargetAudience = mode.TargetAudience;
|
MaxPlayers = mode.PartyMode.GetMaxPlayer(),
|
||||||
info.MaxPlayers = mode.PartyMode.GetMaxPlayer();
|
MinPlayers = mode.PartyMode.GetMinPlayer(),
|
||||||
info.MinPlayers = mode.PartyMode.GetMinPlayer();
|
MaxTeams = mode.PartyMode.GetMaxTeams(),
|
||||||
info.MaxTeams = mode.PartyMode.GetMaxTeams();
|
MinTeams = mode.PartyMode.GetMinTeams()
|
||||||
info.MinTeams = mode.PartyMode.GetMinTeams();
|
};
|
||||||
|
|
||||||
infos.Add(info);
|
infos.Add(info);
|
||||||
}
|
}
|
||||||
@@ -348,6 +347,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
CompilerParameters compilerParams = new CompilerParameters();
|
CompilerParameters compilerParams = new CompilerParameters();
|
||||||
compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll");
|
compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll");
|
||||||
|
compilerParams.ReferencedAssemblies.Add("System.Core.dll");
|
||||||
compilerParams.ReferencedAssemblies.Add("VocaluxeLib.dll");
|
compilerParams.ReferencedAssemblies.Add("VocaluxeLib.dll");
|
||||||
compilerParams.GenerateInMemory = true;
|
compilerParams.GenerateInMemory = true;
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|||||||
@@ -263,11 +263,10 @@ namespace Vocaluxe.Base
|
|||||||
string artist = line.Substring(0, pos - 1).Trim();
|
string artist = line.Substring(0, pos - 1).Trim();
|
||||||
string title = line.Substring(pos + 1, line.Length - pos - 1).Trim();
|
string title = line.Substring(pos + 1, line.Length - pos - 1).Trim();
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (int s = 0; s < allSongs.Length; s++)
|
foreach (CSong song in allSongs) {
|
||||||
{
|
if (song.Artist == artist && song.Title == title)
|
||||||
if (allSongs[s].Artist == artist && allSongs[s].Title == title)
|
|
||||||
{
|
{
|
||||||
pl.AddSong(allSongs[s].ID);
|
pl.AddSong(song.ID);
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ namespace Vocaluxe.Base
|
|||||||
public bool Visible;
|
public bool Visible;
|
||||||
public bool PartyHidden;
|
public bool PartyHidden;
|
||||||
|
|
||||||
public SSongPointer(int iD, string sortString)
|
public SSongPointer(int id, string sortString)
|
||||||
{
|
{
|
||||||
SongID = iD;
|
SongID = id;
|
||||||
SortString = sortString;
|
SortString = sortString;
|
||||||
CatIndex = -1;
|
CatIndex = -1;
|
||||||
Visible = false;
|
Visible = false;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace Vocaluxe.Base
|
|||||||
#region Playback
|
#region Playback
|
||||||
private static IPlayback _Playback;
|
private static IPlayback _Playback;
|
||||||
|
|
||||||
public static bool PlaybackInit()
|
public static bool Init()
|
||||||
{
|
{
|
||||||
switch (CConfig.PlayBackLib)
|
switch (CConfig.PlayBackLib)
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ namespace Vocaluxe.Base
|
|||||||
_Playback = new CPortAudioPlay();
|
_Playback = new CPortAudioPlay();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return _Playback.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetGlobalVolume(float volume)
|
public static void SetGlobalVolume(float volume)
|
||||||
@@ -613,7 +613,7 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
float dt = Time;
|
float dt = Time;
|
||||||
|
|
||||||
float diff = _ExternTime.Time - dt;
|
float diff = et - dt;
|
||||||
if (Math.Abs(diff) > 0.05f)
|
if (Math.Abs(diff) > 0.05f)
|
||||||
{
|
{
|
||||||
_Timer.Reset();
|
_Timer.Reset();
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
if (!_Initialized)
|
if (!_Initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int i = 0; i < _Buffer.Length; i++)
|
foreach (CBuffer buffer in _Buffer)
|
||||||
_Buffer[i].Reset();
|
buffer.Reset();
|
||||||
|
|
||||||
_DeviceConfig = deviceConfig;
|
_DeviceConfig = deviceConfig;
|
||||||
bool[] active = new bool[deviceConfig.Length];
|
bool[] active = new bool[deviceConfig.Length];
|
||||||
@@ -373,8 +373,8 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
if (_Notifications != null)
|
if (_Notifications != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _Notifications.Count; i++)
|
foreach (NotificationPosition notification in _Notifications)
|
||||||
_Notifications[i].Event.Close();
|
notification.Event.Close();
|
||||||
|
|
||||||
_Notifications.Clear();
|
_Notifications.Clear();
|
||||||
_Notifications = null;
|
_Notifications = null;
|
||||||
@@ -420,7 +420,7 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
protected virtual void Dispose(bool disposing)
|
protected void Dispose(bool disposing)
|
||||||
// ReSharper restore InconsistentNaming
|
// ReSharper restore InconsistentNaming
|
||||||
{
|
{
|
||||||
if (disposing)
|
if (disposing)
|
||||||
|
|||||||
@@ -28,9 +28,8 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
//static float LastPosition;
|
//static float LastPosition;
|
||||||
|
|
||||||
#region log
|
#region log
|
||||||
public CGstreamerAudioWrapper.LogCallback Log;
|
|
||||||
|
|
||||||
private void _LogHandler(string text)
|
private static void _LogHandler(string text)
|
||||||
{
|
{
|
||||||
CLog.LogError(text);
|
CLog.LogError(text);
|
||||||
}
|
}
|
||||||
@@ -38,11 +37,9 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
public CGstreamerAudio()
|
public CGstreamerAudio()
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
Log = _LogHandler;
|
|
||||||
//Is this really needed? CodaAnalyzer complains about it...
|
//Is this really needed? CodaAnalyzer complains about it...
|
||||||
//GC.SuppressFinalize(Log);
|
//GC.SuppressFinalize(Log);
|
||||||
CGstreamerAudioWrapper.SetLogCallback(Log);
|
CGstreamerAudioWrapper.SetLogCallback(_LogHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Init()
|
public bool Init()
|
||||||
|
|||||||
@@ -40,11 +40,6 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
private List<SAudioStreams> _Streams;
|
private List<SAudioStreams> _Streams;
|
||||||
|
|
||||||
public COpenALPlay()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Init()
|
public bool Init()
|
||||||
{
|
{
|
||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
@@ -335,15 +330,6 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _EndSync(int handle, int stream, int data, IntPtr user)
|
|
||||||
{
|
|
||||||
if (_Initialized)
|
|
||||||
{
|
|
||||||
if (_AlreadyAdded(stream))
|
|
||||||
Close(stream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _CloseProc(int streamID)
|
private void _CloseProc(int streamID)
|
||||||
{
|
{
|
||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
@@ -40,11 +41,6 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
private List<SAudioStreams> _Streams;
|
private List<SAudioStreams> _Streams;
|
||||||
|
|
||||||
public CPortAudioPlay()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Init()
|
public bool Init()
|
||||||
{
|
{
|
||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
@@ -302,12 +298,7 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
|
|
||||||
private bool _AlreadyAdded(int stream)
|
private bool _AlreadyAdded(int stream)
|
||||||
{
|
{
|
||||||
foreach (SAudioStreams st in _Streams)
|
return _Streams.Any(st => st.Handle == stream);
|
||||||
{
|
|
||||||
if (st.Handle == stream)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _GetStreamIndex(int stream)
|
private int _GetStreamIndex(int stream)
|
||||||
@@ -320,15 +311,6 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _EndSync(int handle, int stream, int data, IntPtr user)
|
|
||||||
{
|
|
||||||
if (_Initialized)
|
|
||||||
{
|
|
||||||
if (_AlreadyAdded(stream))
|
|
||||||
Close(stream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _CloseProc(int streamID)
|
private void _CloseProc(int streamID)
|
||||||
{
|
{
|
||||||
if (_Initialized)
|
if (_Initialized)
|
||||||
|
|||||||
@@ -189,8 +189,8 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
if (!_Initialized)
|
if (!_Initialized)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int i = 0; i < _RecHandle.Length; i++)
|
foreach (IntPtr handle in _RecHandle)
|
||||||
CPortAudio.Pa_StopStream(_RecHandle[i]);
|
CPortAudio.Pa_StopStream(handle);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace Vocaluxe.Lib.Sound.Decoder
|
|||||||
|
|
||||||
public void Init() {}
|
public void Init() {}
|
||||||
|
|
||||||
public void Open(string fileName, bool loop)
|
public void Open(string fileName)
|
||||||
{
|
{
|
||||||
_FileName = fileName;
|
_FileName = fileName;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Vocaluxe.Lib.Sound.Decoder
|
|||||||
void Init();
|
void Init();
|
||||||
void Close();
|
void Close();
|
||||||
|
|
||||||
void Open(string fileName, bool loop = false);
|
void Open(string fileName);
|
||||||
SFormatInfo GetFormatInfo();
|
SFormatInfo GetFormatInfo();
|
||||||
|
|
||||||
float GetLength();
|
float GetLength();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace Vocaluxe.Lib.Sound.PortAudio
|
|||||||
PortAudio v.19 bindings for .NET
|
PortAudio v.19 bindings for .NET
|
||||||
</summary>
|
</summary>
|
||||||
*/
|
*/
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
|
|
||||||
public static class CPortAudio
|
public static class CPortAudio
|
||||||
{
|
{
|
||||||
@@ -550,4 +551,6 @@ namespace Vocaluxe.Lib.Sound.PortAudio
|
|||||||
public static extern void Pa_Sleep(int msec);
|
public static extern void Pa_Sleep(int msec);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
// ReSharper restore UnusedMember.Global
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ namespace Vocaluxe.Lib.Video
|
|||||||
class CVideoDecoderGstreamer : IVideoDecoder
|
class CVideoDecoderGstreamer : IVideoDecoder
|
||||||
{
|
{
|
||||||
#region log
|
#region log
|
||||||
private CGstreamerVideoWrapper.LogCallback Log;
|
private CGstreamerVideoWrapper.LogCallback _Log;
|
||||||
|
|
||||||
private void _LogHandler(string text)
|
private void _LogHandler(string text)
|
||||||
{
|
{
|
||||||
@@ -38,10 +38,10 @@ namespace Vocaluxe.Lib.Video
|
|||||||
public bool Init()
|
public bool Init()
|
||||||
{
|
{
|
||||||
bool retval = CGstreamerVideoWrapper.InitVideo();
|
bool retval = CGstreamerVideoWrapper.InitVideo();
|
||||||
Log = _LogHandler;
|
_Log = _LogHandler;
|
||||||
//Really needed? CodeAnalysis complains
|
//Really needed? CodeAnalysis complains
|
||||||
//GC.SuppressFinalize(Log);
|
//GC.SuppressFinalize(Log);
|
||||||
CGstreamerVideoWrapper.SetVideoLogCallback(Log);
|
CGstreamerVideoWrapper.SetVideoLogCallback(_Log);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -114,7 +114,7 @@ namespace Vocaluxe
|
|||||||
|
|
||||||
// Init Playback
|
// Init Playback
|
||||||
CLog.StartBenchmark(0, "Init Playback");
|
CLog.StartBenchmark(0, "Init Playback");
|
||||||
CSound.PlaybackInit();
|
CSound.Init();
|
||||||
CLog.StopBenchmark(0, "Init Playback");
|
CLog.StopBenchmark(0, "Init Playback");
|
||||||
|
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
|
|||||||
@@ -204,35 +204,33 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
//Prepare Text
|
//Prepare Text
|
||||||
int lastY = 280;
|
int lastY = 280;
|
||||||
for (int i = 0; i < _Paragraphs.Count; i++)
|
foreach (string[] paragraph in _Paragraphs) {
|
||||||
{
|
|
||||||
string line = "";
|
string line = "";
|
||||||
for (int e = 0; e < _Paragraphs[i].Length; e++)
|
for (int e = 0; e < paragraph.Length; e++)
|
||||||
{
|
{
|
||||||
if (_Paragraphs[i][e] != null)
|
if (paragraph[e] == null)
|
||||||
|
continue;
|
||||||
|
string newLine = " " + paragraph[e];
|
||||||
|
CText text = GetNewText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line);
|
||||||
|
if (CDraw.GetTextBounds(text).Width < (CSettings.RenderW - 220))
|
||||||
{
|
{
|
||||||
string newline = line + " " + _Paragraphs[i][e];
|
line += newLine;
|
||||||
CText text = GetNewText(75, lastY, -2, 30, -1, EAlignment.Left, EStyle.Bold, "Outline", new SColorF(1, 1, 1, 1), line);
|
|
||||||
if (CDraw.GetTextBounds(text).Width < (CSettings.RenderW - 220))
|
|
||||||
{
|
|
||||||
line = line + " " + _Paragraphs[i][e];
|
|
||||||
|
|
||||||
//Check if all words are used
|
//Check if all words are used
|
||||||
if ((e + 1) == _Paragraphs[i].Length)
|
if ((e + 1) == paragraph.Length)
|
||||||
{
|
|
||||||
text.Text = line;
|
|
||||||
_ParagraphTexts.Add(text);
|
|
||||||
line = "";
|
|
||||||
lastY += 40;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
text.Text = line;
|
||||||
_ParagraphTexts.Add(text);
|
_ParagraphTexts.Add(text);
|
||||||
line = " " + _Paragraphs[i][e];
|
line = "";
|
||||||
lastY += 27;
|
lastY += 40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_ParagraphTexts.Add(text);
|
||||||
|
line = newLine;
|
||||||
|
lastY += 27;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -276,7 +274,7 @@ namespace Vocaluxe.Screens
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CParticleEffect GetStarParticles(int numStars, bool isRed, SRectF rect, bool bigParticles)
|
private CParticleEffect _GetStarParticles(int numStars, bool isRed, SRectF rect, bool bigParticles)
|
||||||
{
|
{
|
||||||
SColorF partColor = isRed ? new SColorF(1, 0, 0, 1) : new SColorF(0.149f, 0.415f, 0.819f, 1);
|
SColorF partColor = isRed ? new SColorF(1, 0, 0, 1) : new SColorF(0.149f, 0.415f, 0.819f, 1);
|
||||||
int partSize = bigParticles ? 35 : 25;
|
int partSize = bigParticles ? 35 : 25;
|
||||||
@@ -296,7 +294,7 @@ namespace Vocaluxe.Screens
|
|||||||
SRectF imgDotRect = new SRectF(particleRect);
|
SRectF imgDotRect = new SRectF(particleRect);
|
||||||
imgDotRect.Z = -5;
|
imgDotRect.Z = -5;
|
||||||
CStatic imgDot = GetNewStatic(texDot, new SColorF(1, 1, 1, 1), imgDotRect);
|
CStatic imgDot = GetNewStatic(texDot, new SColorF(1, 1, 1, 1), imgDotRect);
|
||||||
CParticleEffect particle = GetStarParticles(partCount, isRight, particleRect, bigParticles);
|
CParticleEffect particle = _GetStarParticles(partCount, isRight, particleRect, bigParticles);
|
||||||
|
|
||||||
CCreditName credit = new CCreditName(image, imgDot, particle, particleOffsetX, particleOffsetY);
|
CCreditName credit = new CCreditName(image, imgDot, particle, particleOffsetX, particleOffsetY);
|
||||||
|
|
||||||
@@ -324,8 +322,8 @@ namespace Vocaluxe.Screens
|
|||||||
//Little stars for logo
|
//Little stars for logo
|
||||||
int numstars = (int)(_Logo.Rect.W * 0.25f / 2f);
|
int numstars = (int)(_Logo.Rect.W * 0.25f / 2f);
|
||||||
SRectF partRect = new SRectF(_Logo.Rect.X, _Logo.Rect.Y, _Logo.Rect.W, _Logo.Rect.H, -1);
|
SRectF partRect = new SRectF(_Logo.Rect.X, _Logo.Rect.Y, _Logo.Rect.W, _Logo.Rect.H, -1);
|
||||||
_StarsRed = GetStarParticles(numstars, true, partRect, true);
|
_StarsRed = _GetStarParticles(numstars, true, partRect, true);
|
||||||
_StarsBlue = GetStarParticles(numstars, false, partRect, true);
|
_StarsBlue = _GetStarParticles(numstars, false, partRect, true);
|
||||||
|
|
||||||
//Credit names
|
//Credit names
|
||||||
_CreditNames = new List<CCreditName>();
|
_CreditNames = new List<CCreditName>();
|
||||||
@@ -371,8 +369,8 @@ namespace Vocaluxe.Screens
|
|||||||
//Draw Text
|
//Draw Text
|
||||||
if (_TextTimer.IsRunning)
|
if (_TextTimer.IsRunning)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _ParagraphTexts.Count; i++)
|
foreach (CText text in _ParagraphTexts)
|
||||||
_ParagraphTexts[i].Draw();
|
text.Draw();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,6 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
_IsDuet = false;
|
_IsDuet = false;
|
||||||
CPoints points = CGame.GetPoints();
|
CPoints points = CGame.GetPoints();
|
||||||
SPlayer player = points.GetPlayer(_Round, CGame.NumPlayer)[0];
|
|
||||||
CSong song = CGame.GetSong(_Round + 1);
|
CSong song = CGame.GetSong(_Round + 1);
|
||||||
if (song == null)
|
if (song == null)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -654,10 +654,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
for (int p = 0; p < CGame.NumPlayer; p++)
|
for (int p = 0; p < CGame.NumPlayer; p++)
|
||||||
{
|
{
|
||||||
_NoteLines[p] = _SingNotes[_SingBars].AddPlayer(
|
_NoteLines[p] = _SingNotes[_SingBars].AddPlayer(_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1],CTheme.GetPlayerColor(p + 1),p);
|
||||||
_SingNotes[_SingBars].BarPos[p, CGame.NumPlayer - 1],
|
|
||||||
CTheme.GetPlayerColor(p + 1),
|
|
||||||
p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -294,17 +294,7 @@ namespace VocaluxeLib.Menu
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw(bool forceDraw = false)
|
||||||
{
|
|
||||||
Draw(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ForceDraw()
|
|
||||||
{
|
|
||||||
Draw(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Draw(bool forceDraw)
|
|
||||||
{
|
{
|
||||||
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !forceDraw)
|
if (!Visible && CBase.Settings.GetGameState() != EGameState.EditTheme && !forceDraw)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -139,17 +139,7 @@ namespace VocaluxeLib.Menu
|
|||||||
rect = new RectangleF(left, upper, rigth - left, lower - upper);
|
rect = new RectangleF(left, upper, rigth - left, lower - upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<string> ListFiles(string path, string cast)
|
public static List<string> ListFiles(string path, string cast, bool recursive = false, bool fullpath = false)
|
||||||
{
|
|
||||||
return ListFiles(path, cast, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<string> ListFiles(string path, string cast, bool recursive)
|
|
||||||
{
|
|
||||||
return ListFiles(path, cast, recursive, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<string> ListFiles(string path, string cast, bool recursive, bool fullpath)
|
|
||||||
{
|
{
|
||||||
List<string> files = new List<string>();
|
List<string> files = new List<string>();
|
||||||
DirectoryInfo dir = new DirectoryInfo(path);
|
DirectoryInfo dir = new DirectoryInfo(path);
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ namespace VocaluxeLib.Menu
|
|||||||
_PartyModeID = partyModeID;
|
_PartyModeID = partyModeID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetPartyModeID()
|
|
||||||
{
|
|
||||||
return _PartyModeID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AssingPartyMode(IPartyMode partyMode)
|
public void AssingPartyMode(IPartyMode partyMode)
|
||||||
{
|
{
|
||||||
_PartyMode = partyMode;
|
_PartyMode = partyMode;
|
||||||
|
|||||||
@@ -244,16 +244,6 @@ namespace VocaluxeLib.Menu
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw()
|
||||||
{
|
|
||||||
Draw(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ForceDraw()
|
|
||||||
{
|
|
||||||
Draw(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Draw(bool forceDraw)
|
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (CTile tile in _Tiles)
|
foreach (CTile tile in _Tiles)
|
||||||
|
|||||||
@@ -412,17 +412,7 @@ namespace VocaluxeLib.Menu
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw(bool forceDraw = false)
|
||||||
{
|
|
||||||
Draw(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ForceDraw()
|
|
||||||
{
|
|
||||||
Draw(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Draw(bool forceDraw)
|
|
||||||
{
|
{
|
||||||
if (_PlaylistElements.Count <= 0)
|
if (_PlaylistElements.Count <= 0)
|
||||||
LoadPlaylist(0);
|
LoadPlaylist(0);
|
||||||
@@ -1226,7 +1216,7 @@ namespace VocaluxeLib.Menu
|
|||||||
CSong song = CBase.Songs.GetSongByID(pec.SongID);
|
CSong song = CBase.Songs.GetSongByID(pec.SongID);
|
||||||
_PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
_PlaylistElements[i].Cover.Texture = song.CoverTextureSmall;
|
||||||
string t1 = _Theme.Text1.Text.Replace("%a", song.Artist).Replace("%t", song.Title);
|
string t1 = _Theme.Text1.Text.Replace("%a", song.Artist).Replace("%t", song.Title);
|
||||||
_PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ song.Artist + " - " + song.Title; //TODO: Add text field for the number
|
_PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ t1; //TODO: Add text field for the number
|
||||||
_PlaylistElements[i].SelectSlide.Clear();
|
_PlaylistElements[i].SelectSlide.Clear();
|
||||||
for (int g = 0; g < pec.Modes.Length; g++)
|
for (int g = 0; g < pec.Modes.Length; g++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -693,17 +693,12 @@ namespace VocaluxeLib.Menu
|
|||||||
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
CBase.Drawing.DrawColor(new SColorF(0.5f, 1f, 0.5f, 0.5f), new SRectF(x, Y, bounds.Width, bounds.Height, Z));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawRelative(float x, float y)
|
|
||||||
{
|
|
||||||
DrawRelative(x, y, false, 0f, 0f, 0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DrawRelative(float x, float y, float reflectionSpace, float reflectionHeigth, float rectHeight)
|
public void DrawRelative(float x, float y, float reflectionSpace, float reflectionHeigth, float rectHeight)
|
||||||
{
|
{
|
||||||
DrawRelative(x, y, true, reflectionSpace, reflectionHeigth, rectHeight);
|
DrawRelative(x, y, true, reflectionSpace, reflectionHeigth, rectHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawRelative(float rx, float ry, bool reflection, float reflectionSpace, float reflectionHeight, float rectHeight)
|
public void DrawRelative(float rx, float ry, bool reflection = false, float reflectionSpace = 0f, float reflectionHeight = 0f, float rectHeight = 0f)
|
||||||
{
|
{
|
||||||
// Update Text
|
// Update Text
|
||||||
Text = Text;
|
Text = Text;
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ namespace VocaluxeLib.Menu
|
|||||||
{
|
{
|
||||||
Mouse,
|
Mouse,
|
||||||
Keyboard,
|
Keyboard,
|
||||||
WiiMote,
|
WiiMote
|
||||||
Gamepad
|
|
||||||
}
|
}
|
||||||
#endregion Inputs
|
#endregion Inputs
|
||||||
|
|
||||||
@@ -126,7 +125,9 @@ namespace VocaluxeLib.Menu
|
|||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
// don't change the order!
|
// don't change the order!
|
||||||
TR_CONFIG_OFF, //no debug infos
|
TR_CONFIG_OFF, //no debug infos
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
TR_CONFIG_ONLY_FPS,
|
TR_CONFIG_ONLY_FPS,
|
||||||
|
// ReSharper restore UnusedMember.Global
|
||||||
TR_CONFIG_LEVEL1,
|
TR_CONFIG_LEVEL1,
|
||||||
TR_CONFIG_LEVEL2,
|
TR_CONFIG_LEVEL2,
|
||||||
TR_CONFIG_LEVEL3,
|
TR_CONFIG_LEVEL3,
|
||||||
@@ -213,7 +214,9 @@ namespace VocaluxeLib.Menu
|
|||||||
public enum ECoverLoading
|
public enum ECoverLoading
|
||||||
{
|
{
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
TR_CONFIG_COVERLOADING_ONDEMAND,
|
TR_CONFIG_COVERLOADING_ONDEMAND,
|
||||||
|
// ReSharper restore UnusedMember.Global
|
||||||
TR_CONFIG_COVERLOADING_ATSTART,
|
TR_CONFIG_COVERLOADING_ATSTART,
|
||||||
TR_CONFIG_COVERLOADING_DYNAMIC
|
TR_CONFIG_COVERLOADING_DYNAMIC
|
||||||
// ReSharper restore InconsistentNaming
|
// ReSharper restore InconsistentNaming
|
||||||
@@ -222,9 +225,11 @@ namespace VocaluxeLib.Menu
|
|||||||
public enum EGameDifficulty
|
public enum EGameDifficulty
|
||||||
{
|
{
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
TR_CONFIG_EASY,
|
TR_CONFIG_EASY,
|
||||||
TR_CONFIG_NORMAL,
|
TR_CONFIG_NORMAL,
|
||||||
TR_CONFIG_HARD
|
TR_CONFIG_HARD
|
||||||
|
// ReSharper restore UnusedMember.Global
|
||||||
// ReSharper restore InconsistentNaming
|
// ReSharper restore InconsistentNaming
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,7 +265,9 @@ namespace VocaluxeLib.Menu
|
|||||||
TR_CONFIG_PLAYERINFO_BOTH,
|
TR_CONFIG_PLAYERINFO_BOTH,
|
||||||
TR_CONFIG_PLAYERINFO_NAME,
|
TR_CONFIG_PLAYERINFO_NAME,
|
||||||
TR_CONFIG_PLAYERINFO_AVATAR,
|
TR_CONFIG_PLAYERINFO_AVATAR,
|
||||||
|
// ReSharper disable UnusedMember.Global
|
||||||
TR_CONFIG_PLAYERINFO_OFF
|
TR_CONFIG_PLAYERINFO_OFF
|
||||||
|
// ReSharper restore UnusedMember.Global
|
||||||
// ReSharper restore InconsistentNaming
|
// ReSharper restore InconsistentNaming
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,26 +59,20 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
|
|
||||||
public abstract class CSingNotes : IMenuElement
|
public abstract class CSingNotes : IMenuElement
|
||||||
{
|
{
|
||||||
protected int _PartyModeID;
|
protected readonly int _PartyModeID;
|
||||||
private SThemeSingBar _Theme;
|
private SThemeSingBar _Theme;
|
||||||
private bool _ThemeLoaded;
|
private bool _ThemeLoaded;
|
||||||
|
|
||||||
private readonly List<SPlayerNotes> _PlayerNotes;
|
private readonly List<SPlayerNotes> _PlayerNotes;
|
||||||
private int _ActID;
|
private int _ActID;
|
||||||
|
|
||||||
private SRectF[,] _BarPos;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Player bar positions
|
/// Player bar positions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// first index = player number; second index = num players seen on screen
|
/// first index = player number; second index = num players seen on screen
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public SRectF[,] BarPos
|
public SRectF[,] BarPos { get; set; }
|
||||||
{
|
|
||||||
get { return _BarPos; }
|
|
||||||
set { _BarPos = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public CSingNotes(int partyModeID)
|
public CSingNotes(int partyModeID)
|
||||||
{
|
{
|
||||||
@@ -112,20 +106,20 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinToneHelper", out _Theme.SkinToneHelperName, String.Empty);
|
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinToneHelper", out _Theme.SkinToneHelperName, String.Empty);
|
||||||
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinPerfectNoteStar", out _Theme.SkinPerfectNoteStarName, String.Empty);
|
_ThemeLoaded &= xmlReader.GetValue(item + "/SkinPerfectNoteStar", out _Theme.SkinPerfectNoteStarName, String.Empty);
|
||||||
|
|
||||||
_BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()];
|
BarPos = new SRectF[CBase.Settings.GetMaxNumPlayer(),CBase.Settings.GetMaxNumPlayer()];
|
||||||
for (int numplayer = 0; numplayer < CBase.Settings.GetMaxNumPlayer(); numplayer++)
|
for (int numplayer = 0; numplayer < CBase.Settings.GetMaxNumPlayer(); numplayer++)
|
||||||
{
|
{
|
||||||
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
||||||
{
|
{
|
||||||
if (player <= numplayer)
|
if (player <= numplayer)
|
||||||
{
|
{
|
||||||
_BarPos[player, numplayer] = new SRectF();
|
BarPos[player, numplayer] = new SRectF();
|
||||||
string target = "/BarPositions/P" + (player + 1) + "N" + (numplayer + 1);
|
string target = "/BarPositions/P" + (player + 1) + "N" + (numplayer + 1);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "X", ref _BarPos[player, numplayer].X);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "X", ref BarPos[player, numplayer].X);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "Y", ref _BarPos[player, numplayer].Y);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "Y", ref BarPos[player, numplayer].Y);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "Z", ref _BarPos[player, numplayer].Z);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "Z", ref BarPos[player, numplayer].Z);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "W", ref _BarPos[player, numplayer].W);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "W", ref BarPos[player, numplayer].W);
|
||||||
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "H", ref _BarPos[player, numplayer].H);
|
_ThemeLoaded &= xmlReader.TryGetFloatValue(item + target + "H", ref BarPos[player, numplayer].H);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,16 +174,15 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
{
|
{
|
||||||
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
for (int player = 0; player < CBase.Settings.GetMaxNumPlayer(); player++)
|
||||||
{
|
{
|
||||||
if (player <= numplayer)
|
if (player > numplayer)
|
||||||
{
|
continue;
|
||||||
string target = "P" + (player + 1) + "N" + (numplayer + 1);
|
string target = "P" + (player + 1) + "N" + (numplayer + 1);
|
||||||
|
|
||||||
writer.WriteElementString(target + "X", _BarPos[player, numplayer].X.ToString("#0"));
|
writer.WriteElementString(target + "X", BarPos[player, numplayer].X.ToString("#0"));
|
||||||
writer.WriteElementString(target + "Y", _BarPos[player, numplayer].Y.ToString("#0"));
|
writer.WriteElementString(target + "Y", BarPos[player, numplayer].Y.ToString("#0"));
|
||||||
writer.WriteElementString(target + "Z", _BarPos[player, numplayer].Z.ToString("#0.00"));
|
writer.WriteElementString(target + "Z", BarPos[player, numplayer].Z.ToString("#0.00"));
|
||||||
writer.WriteElementString(target + "W", _BarPos[player, numplayer].W.ToString("#0"));
|
writer.WriteElementString(target + "W", BarPos[player, numplayer].W.ToString("#0"));
|
||||||
writer.WriteElementString(target + "H", _BarPos[player, numplayer].H.ToString("#0"));
|
writer.WriteElementString(target + "H", BarPos[player, numplayer].H.ToString("#0"));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.WriteEndElement(); //BarPositions
|
writer.WriteEndElement(); //BarPositions
|
||||||
@@ -210,33 +203,35 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
|
|
||||||
public virtual int AddPlayer(SRectF rect, SColorF color, int playerNr)
|
public virtual int AddPlayer(SRectF rect, SColorF color, int playerNr)
|
||||||
{
|
{
|
||||||
SPlayerNotes notes = new SPlayerNotes();
|
SPlayerNotes notes = new SPlayerNotes
|
||||||
|
{
|
||||||
|
Rect = rect,
|
||||||
|
Color = color,
|
||||||
|
Alpha = 1f,
|
||||||
|
ID = ++_ActID,
|
||||||
|
Lines = null,
|
||||||
|
LineNr = -1,
|
||||||
|
PlayerNr = playerNr,
|
||||||
|
Timer = new Stopwatch(),
|
||||||
|
GoldenStars = new List<CParticleEffect>(),
|
||||||
|
Flares = new List<CParticleEffect>(),
|
||||||
|
PerfectNoteEffect = new List<CParticleEffect>(),
|
||||||
|
PerfectLineTwinkle = new List<CParticleEffect>()
|
||||||
|
};
|
||||||
|
|
||||||
notes.Rect = rect;
|
|
||||||
notes.Color = color;
|
|
||||||
notes.Alpha = 1f;
|
|
||||||
notes.ID = ++_ActID;
|
|
||||||
notes.Lines = null;
|
|
||||||
notes.LineNr = -1;
|
|
||||||
notes.PlayerNr = playerNr;
|
|
||||||
notes.Timer = new Stopwatch();
|
|
||||||
notes.GoldenStars = new List<CParticleEffect>();
|
|
||||||
notes.Flares = new List<CParticleEffect>();
|
|
||||||
notes.PerfectNoteEffect = new List<CParticleEffect>();
|
|
||||||
notes.PerfectLineTwinkle = new List<CParticleEffect>();
|
|
||||||
_PlayerNotes.Add(notes);
|
_PlayerNotes.Add(notes);
|
||||||
|
|
||||||
return notes.ID;
|
return notes.ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void RemovePlayer(int iD) {}
|
public virtual void RemovePlayer(int id) {}
|
||||||
|
|
||||||
public virtual void AddLine(int iD, CLine[] line, int lineNr, int player)
|
public virtual void AddLine(int id, CLine[] line, int lineNr, int player)
|
||||||
{
|
{
|
||||||
if (line == null)
|
if (line == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int n = _FindPlayerLine(iD);
|
int n = _FindPlayerLine(id);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -258,13 +253,13 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
_PlayerNotes.Add(notes);
|
_PlayerNotes.Add(notes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void RemoveLine(int iD) {}
|
public virtual void RemoveLine(int id) {}
|
||||||
|
|
||||||
public virtual void AddNote(int iD, CNote note) {}
|
public virtual void AddNote(int id, CNote note) {}
|
||||||
|
|
||||||
public virtual void SetAlpha(int iD, float alpha)
|
public virtual void SetAlpha(int id, float alpha)
|
||||||
{
|
{
|
||||||
int n = _FindPlayerLine(iD);
|
int n = _FindPlayerLine(id);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -273,23 +268,23 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
_PlayerNotes[n] = pn;
|
_PlayerNotes[n] = pn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual float GetAlpha(int iD)
|
public virtual float GetAlpha(int id)
|
||||||
{
|
{
|
||||||
int n = _FindPlayerLine(iD);
|
int n = _FindPlayerLine(id);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
return 0f;
|
return 0f;
|
||||||
|
|
||||||
return _PlayerNotes[n].Alpha;
|
return _PlayerNotes[n].Alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Draw(int iD, int player)
|
public virtual void Draw(int id, int player)
|
||||||
{
|
{
|
||||||
Draw(iD, null, player);
|
Draw(id, null, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Draw(int iD, List<CLine> singLine, int player)
|
public virtual void Draw(int id, List<CLine> singLine, int player)
|
||||||
{
|
{
|
||||||
int n = _FindPlayerLine(iD);
|
int n = _FindPlayerLine(id);
|
||||||
if (n == -1)
|
if (n == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -467,30 +462,21 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
LoadTextures();
|
LoadTextures();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int _FindPlayerLine(int iD)
|
private int _FindPlayerLine(int id)
|
||||||
{
|
{
|
||||||
if (iD < 0 || iD > _PlayerNotes.Count)
|
if (id < 0 || id > _PlayerNotes.Count)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
int n = -1;
|
|
||||||
for (int i = 0; i < _PlayerNotes.Count; i++)
|
for (int i = 0; i < _PlayerNotes.Count; i++)
|
||||||
{
|
{
|
||||||
if (_PlayerNotes[i].ID == iD)
|
if (_PlayerNotes[i].ID == id)
|
||||||
{
|
return i;
|
||||||
n = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _DrawNote(SRectF rect, SColorF color)
|
private void _DrawNote(SRectF rect, SColorF color, float factor = 1f)
|
||||||
{
|
|
||||||
_DrawNote(rect, color, 1f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _DrawNote(SRectF rect, SColorF color, float factor)
|
|
||||||
{
|
{
|
||||||
const int spacing = 0;
|
const int spacing = 0;
|
||||||
|
|
||||||
@@ -584,12 +570,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _AddGoldenNote(SRectF rect, int n, int nr)
|
private void _AddGoldenNote(SRectF rect, int n, int nr, float factor = 1f)
|
||||||
{
|
|
||||||
_AddGoldenNote(rect, n, nr, 1f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _AddGoldenNote(SRectF rect, int n, int nr, float factor)
|
|
||||||
{
|
{
|
||||||
const int spacing = 0;
|
const int spacing = 0;
|
||||||
|
|
||||||
@@ -615,12 +596,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _AddFlare(SRectF rect, int n)
|
private void _AddFlare(SRectF rect, int n, float factor = 1f)
|
||||||
{
|
|
||||||
_AddFlare(rect, n, 1f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _AddFlare(SRectF rect, int n, float factor)
|
|
||||||
{
|
{
|
||||||
const int spacing = 0;
|
const int spacing = 0;
|
||||||
|
|
||||||
@@ -642,12 +618,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
|||||||
_PlayerNotes[n].Flares.Add(flares);
|
_PlayerNotes[n].Flares.Add(flares);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _AddPerfectNote(SRectF rect, int n)
|
private void _AddPerfectNote(SRectF rect, int n, float factor = 1f)
|
||||||
{
|
|
||||||
_AddPerfectNote(rect, n, 1f);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void _AddPerfectNote(SRectF rect, int n, float factor)
|
|
||||||
{
|
{
|
||||||
const int spacing = 0;
|
const int spacing = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1027,10 +1027,5 @@ namespace VocaluxeLib.Menu.SongMenu
|
|||||||
|
|
||||||
ShortEnd = stop;
|
ShortEnd = stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
public object Clone()
|
|
||||||
{
|
|
||||||
return MemberwiseClone();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user