Make partymodes reload their themes
Move PartyModeIds into Partymodes Fix bug where wrong text size is used (CalculatedFont is now used) Fix bug where text of the main table in partymodes is displayed wrong
This commit is contained in:
1 parent
5d28b19066
commit
aa0579a4f1
16 files changed
+194
-113
No files matched your search
@@ -158,8 +158,8 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
private SData _GameData;
|
||||
private EStage _Stage;
|
||||
|
||||
public CPartyModeChallenge(string folder)
|
||||
: base(folder)
|
||||
public CPartyModeChallenge(int id, string folder)
|
||||
: base(id, folder)
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = true;
|
||||
|
||||
@@ -431,6 +431,8 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
|
||||
private void _BuildRoundsTable()
|
||||
{
|
||||
if (_RoundsTable.Count == 0)
|
||||
return;
|
||||
_RoundsTableScrollArea = new SRectF();
|
||||
|
||||
const int numPlayerInOneRow = 3;
|
||||
@@ -439,14 +441,14 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
if (_NumRoundsVisible > _GameState.Combs.Count)
|
||||
_NumRoundsVisible = _GameState.Combs.Count;
|
||||
|
||||
float numberX = _Texts[_TextRoundNumber].X;
|
||||
float numberY = _Texts[_TextRoundNumber].Y;
|
||||
float numberX = _RoundsTable[0].Number.X;
|
||||
float numberY = _RoundsTable[0].Number.Y;
|
||||
|
||||
_RoundsTableScrollArea.X = numberX;
|
||||
_RoundsTableScrollArea.Y = numberY;
|
||||
_RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20;
|
||||
_RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - _RoundsTable[0].Number.X - 20;
|
||||
|
||||
float delta = _Texts[_TextRoundNumber].Rect.H;
|
||||
float delta = _RoundsTable[0].Number.Rect.H;
|
||||
|
||||
//Update statics and texts for rounds
|
||||
foreach (CRoundsTableRow roundRow in _RoundsTable)
|
||||
@@ -479,7 +481,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
roundRow.TextScores[column].Y = numberY + delta;
|
||||
roundRow.TextScores[column].MaxWidth = maxw;
|
||||
}
|
||||
numberY = numberY + 2*delta;
|
||||
numberY = numberY + 2 * delta;
|
||||
}
|
||||
numberY = numberY + delta / 2;
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
private SData _GameData;
|
||||
private EStage _Stage;
|
||||
|
||||
public CPartyModeChallengeMedley(string folder)
|
||||
: base(folder)
|
||||
public CPartyModeChallengeMedley(int id, string folder)
|
||||
: base(id, folder)
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = true;
|
||||
|
||||
@@ -431,6 +431,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
|
||||
private void _BuildRoundsTable()
|
||||
{
|
||||
if (_RoundsTable.Count == 0)
|
||||
return;
|
||||
_RoundsTableScrollArea = new SRectF();
|
||||
|
||||
const int numPlayerInOneRow = 3;
|
||||
@@ -439,14 +441,14 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
if (_NumRoundsVisible > _GameState.Combs.Count)
|
||||
_NumRoundsVisible = _GameState.Combs.Count;
|
||||
|
||||
float numberX = _Texts[_TextRoundNumber].X;
|
||||
float numberY = _Texts[_TextRoundNumber].Y;
|
||||
float numberX = _RoundsTable[0].Number.X;
|
||||
float numberY = _RoundsTable[0].Number.Y;
|
||||
|
||||
_RoundsTableScrollArea.X = numberX;
|
||||
_RoundsTableScrollArea.Y = numberY;
|
||||
_RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - _Texts[_TextRoundNumber].X - 20;
|
||||
_RoundsTableScrollArea.W = CBase.Settings.GetRenderW() - _RoundsTable[0].Number.X - 20;
|
||||
|
||||
float delta = _Texts[_TextRoundNumber].Rect.H;
|
||||
float delta = _RoundsTable[0].Number.Rect.H;
|
||||
|
||||
//Update statics and texts for rounds
|
||||
foreach (CRoundsTableRow roundRow in _RoundsTable)
|
||||
|
||||
@@ -180,8 +180,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
private SData _GameData;
|
||||
private EStage _Stage;
|
||||
|
||||
public CPartyModeTicTacToe(string folder)
|
||||
: base(folder)
|
||||
public CPartyModeTicTacToe(int id, string folder)
|
||||
: base(id, folder)
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||
_ScreenSongOptions.Selection.PartyMode = true;
|
||||
|
||||
Reference in new issue
Block a user