diff --git a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeConfig.xml b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeConfig.xml
index 282b4c1d..ab0ac65f 100644
--- a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeConfig.xml
+++ b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeConfig.xml
@@ -82,7 +82,7 @@
Outline
- TR_SCREENCONFIG_NUMPLAYERST1
+ TR_SCREENCONFIG_NUMFIELDS
@@ -111,41 +111,12 @@
Outline
- TR_SCREENCONFIG_NUMPLAYERST2
+ TR_SCREENCONFIG_SONGSOURCE
-
- 75
- 225
-
- 0,00
-
- 27
-
-
-
- StaticColor
-
-
- TextSColor
-
- Left
-
- Center
-
-
-
- Outline
-
- TR_SCREENCONFIG_NUMFIELDS
-
-
-
-
-
75
285
@@ -169,40 +140,11 @@
Outline
- TR_SCREENCONFIG_SONGSOURCE
-
-
-
-
-
-
- 75
- 405
-
- 0,00
-
- 27
-
-
-
- StaticColor
-
-
- TextSColor
-
- Left
-
- Center
-
-
-
- Outline
-
TR_SCREENCONFIG_GAMEMODE
-
+
Button
@@ -317,7 +259,7 @@
26
-
+
Invisible
@@ -380,9 +322,9 @@
Bold
- 9
-
-
+ 3
+
+
Invisible
@@ -445,9 +387,9 @@
Bold
- 9
-
-
+ 3
+
+
Invisible
@@ -510,9 +452,74 @@
Bold
- 3
-
-
+ 1
+
+
+
+ Invisible
+
+ SelectSlideArrowLeft
+
+ SelectSlideArrowRight
+
+ SelectSlide
+
+ SelectSlideArrowLeft
+
+ SelectSlideArrowRight
+
+ SelectSlide
+
+ 500
+ 220
+ 0,00
+ 700
+ 50
+
+ 505
+ 225
+ 0,00
+ 40
+ 40
+
+ 1170
+ 225
+ 0,00
+ 40
+ 40
+
+
+ SelectSlideColor
+
+
+ SelectSlideSColor
+
+
+ SelectSlideHColor
+
+
+ ArrowColor
+
+
+ ArrowSColor
+
+
+ TextColor
+
+
+ TextSColor
+
+ 27,00
+
+ 205,33
+
+ Outline
+
+ Bold
+
+ 1
+
+
Invisible
@@ -575,201 +582,6 @@
Bold
- 3
-
-
-
- Invisible
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- 500
- 340
- 0,00
- 700
- 50
-
- 505
- 345
- 0,00
- 40
- 40
-
- 1170
- 345
- 0,00
- 40
- 40
-
-
- SelectSlideColor
-
-
- SelectSlideSColor
-
-
- SelectSlideHColor
-
-
- ArrowColor
-
-
- ArrowSColor
-
-
- TextColor
-
-
- TextSColor
-
- 27,00
-
- 205,33
-
- Outline
-
- Bold
-
- 1
-
-
-
- Invisible
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- 500
- 340
- 0,00
- 700
- 50
-
- 505
- 345
- 0,00
- 40
- 40
-
- 1170
- 345
- 0,00
- 40
- 40
-
-
- SelectSlideColor
-
-
- SelectSlideSColor
-
-
- SelectSlideHColor
-
-
- ArrowColor
-
-
- ArrowSColor
-
-
- TextColor
-
-
- TextSColor
-
- 27,00
-
- 205,33
-
- Outline
-
- Bold
-
- 1
-
-
-
- Invisible
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- SelectSlideArrowLeft
-
- SelectSlideArrowRight
-
- SelectSlide
-
- 500
- 400
- 0,00
- 700
- 50
-
- 505
- 405
- 0,00
- 40
- 40
-
- 1170
- 405
- 0,00
- 40
- 40
-
-
- SelectSlideColor
-
-
- SelectSlideSColor
-
-
- SelectSlideHColor
-
-
- ArrowColor
-
-
- ArrowSColor
-
-
- TextColor
-
-
- TextSColor
-
- 27,00
-
- 205,33
-
- Outline
-
- Bold
-
1
diff --git a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml
index 00a64260..f2fd787a 100644
--- a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml
+++ b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml
@@ -178,8 +178,8 @@
Plus
- 145
- 1200
+ 1210
+ 210
0,00
40
40
@@ -227,8 +227,8 @@
Minus
- 145
- 1200
+ 1160
+ 210
0,00
40
40
@@ -387,7 +387,7 @@
40
100
0,00
- 1200
+ 1100
50
45
@@ -396,7 +396,7 @@
40
40
- 1170
+ 1050
105
0,00
40
@@ -454,7 +454,7 @@
40
160
0,00
- 1200
+ 1100
150
45
@@ -463,7 +463,7 @@
40
40
- 1170
+ 1050
210
0,00
40
diff --git a/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs b/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs
index 203d54f2..d12ff061 100644
--- a/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs
+++ b/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs
@@ -34,7 +34,6 @@ namespace VocaluxeLib.PartyModes.Challenge
get { return 1; }
}
- private int _NumPlayer = 4;
private SDataFromScreen _Data;
public override void Init()
@@ -45,6 +44,8 @@ namespace VocaluxeLib.PartyModes.Challenge
_Data = new SDataFromScreen();
var names = new SFromScreenNames {FadeBack = false, ProfileIDs = new List()};
_Data.ScreenNames = names;
+
+ _AllowChangePlayerNum = false;
}
public override void DataToScreen(object receivedData)
@@ -54,7 +55,7 @@ namespace VocaluxeLib.PartyModes.Challenge
var config = (SDataToScreenNames)receivedData;
_Data.ScreenNames.ProfileIDs = config.ProfileIDs ?? new List();
- _NumPlayer = config.NumPlayer;
+ SetPartyModeData(config.NumPlayer);
while (_Data.ScreenNames.ProfileIDs.Count > _NumPlayer)
_Data.ScreenNames.ProfileIDs.RemoveAt(_Data.ScreenNames.ProfileIDs.Count - 1);
@@ -73,16 +74,18 @@ namespace VocaluxeLib.PartyModes.Challenge
public override void Back()
{
- List ids = GetTeamIDs(0);
- _Data.ScreenNames.ProfileIDs = ids;
+ SPartyNameOptions options = GetData();
+ if(options.TeamList.Length == 1)
+ _Data.ScreenNames.ProfileIDs = options.TeamList[0];
_Data.ScreenNames.FadeBack = true;
_PartyMode.DataFromScreen(ThemeName, _Data);
}
public override void Next()
{
- List ids = GetTeamIDs(0);
- _Data.ScreenNames.ProfileIDs = ids;
+ SPartyNameOptions options = GetData();
+ if (options.TeamList.Length == 1)
+ _Data.ScreenNames.ProfileIDs = options.TeamList[0];
_Data.ScreenNames.FadeBack = false;
_PartyMode.DataFromScreen(ThemeName, _Data);
}
diff --git a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs
index 404ae1f5..c695a1c7 100644
--- a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs
+++ b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs
@@ -58,8 +58,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
#region ToScreen
public struct SDataToScreenConfig
{
- public int NumPlayerTeam1;
- public int NumPlayerTeam2;
public int NumFields;
public ESongSource SongSource;
public int CategoryID;
@@ -99,8 +97,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public struct SFromScreenConfig
{
- public int NumPlayerTeam1;
- public int NumPlayerTeam2;
public int NumFields;
public ESongSource SongSource;
public int CategoryID;
@@ -111,6 +107,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public struct SFromScreenNames
{
public bool FadeToConfig;
+ public int NumPlayerTeam1;
+ public int NumPlayerTeam2;
public List ProfileIDsTeam1;
public List ProfileIDsTeam2;
}
@@ -255,8 +253,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
try
{
dataFrom = (SDataFromScreen)data;
- _GameData.NumPlayerTeam1 = dataFrom.ScreenConfig.NumPlayerTeam1;
- _GameData.NumPlayerTeam2 = dataFrom.ScreenConfig.NumPlayerTeam2;
_GameData.NumFields = dataFrom.ScreenConfig.NumFields;
_GameData.SongSource = dataFrom.ScreenConfig.SongSource;
_GameData.CategoryID = dataFrom.ScreenConfig.CategoryID;
@@ -281,6 +277,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
else
{
_GameData.Team = CBase.Game.GetRandom(100) < 50 ? 0 : 1;
+ _GameData.NumPlayerTeam1 = dataFrom.ScreenNames.NumPlayerTeam1;
+ _GameData.NumPlayerTeam2 = dataFrom.ScreenNames.NumPlayerTeam2;
_GameData.ProfileIDsTeam1 = dataFrom.ScreenNames.ProfileIDsTeam1;
_GameData.ProfileIDsTeam2 = dataFrom.ScreenNames.ProfileIDsTeam2;
_Stage = EStage.Names;
@@ -348,8 +346,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_Screens.TryGetValue("CPartyScreenTicTacToeConfig", out screen);
if (screen != null)
{
- _ToScreenConfig.NumPlayerTeam1 = _GameData.NumPlayerTeam1;
- _ToScreenConfig.NumPlayerTeam2 = _GameData.NumPlayerTeam2;
_ToScreenConfig.NumFields = _GameData.NumFields;
_ToScreenConfig.SongSource = _GameData.SongSource;
_ToScreenConfig.CategoryID = _GameData.CategoryID;
diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeConfig.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeConfig.cs
index 0e1aab3a..894f6386 100644
--- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeConfig.cs
+++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeConfig.cs
@@ -34,8 +34,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
get { return 1; }
}
- private const string _SelectSlideNumPlayerTeam1 = "SelectSlideNumPlayerTeam1";
- private const string _SelectSlideNumPlayerTeam2 = "SelectSlideNumPlayerTeam2";
private const string _SelectSlideNumFields = "SelectSlideNumFields";
private const string _SelectSlideSongSource = "SelectSlideSongSource";
private const string _SelectSlidePlaylist = "SelectSlidePlaylist";
@@ -54,8 +52,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_ThemeSelectSlides = new string[]
{
- _SelectSlideNumPlayerTeam1, _SelectSlideNumPlayerTeam2, _SelectSlideNumFields, _SelectSlideSongSource, _SelectSlidePlaylist, _SelectSlideCategory,
- _SelectSlideGameMode
+ _SelectSlideNumFields, _SelectSlideSongSource, _SelectSlidePlaylist, _SelectSlideCategory, _SelectSlideGameMode
};
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
@@ -64,8 +61,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
{
PlaylistID = 0,
NumFields = 9,
- NumPlayerTeam1 = 2,
- NumPlayerTeam2 = 2,
GameMode = EPartyGameMode.TR_GAMEMODE_NORMAL,
CategoryID = 0,
SongSource = ESongSource.TR_ALLSONGS
@@ -79,8 +74,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
{
var config = (SDataToScreenConfig)receivedData;
_Data.ScreenConfig.NumFields = config.NumFields;
- _Data.ScreenConfig.NumPlayerTeam1 = config.NumPlayerTeam1;
- _Data.ScreenConfig.NumPlayerTeam2 = config.NumPlayerTeam2;
_Data.ScreenConfig.PlaylistID = config.PlaylistID;
_Data.ScreenConfig.CategoryID = config.CategoryID;
_Data.ScreenConfig.SongSource = config.SongSource;
@@ -173,17 +166,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private void _FillSlides()
{
- // build num player slide (min player ... max player);
- _SelectSlides[_SelectSlideNumPlayerTeam1].Clear();
- for (int i = _PartyMode.GetMinPlayer() / 2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
- _SelectSlides[_SelectSlideNumPlayerTeam1].AddValue(i.ToString());
- _SelectSlides[_SelectSlideNumPlayerTeam1].Selection = _Data.ScreenConfig.NumPlayerTeam1 - (_PartyMode.GetMinPlayer() / 2);
-
- _SelectSlides[_SelectSlideNumPlayerTeam2].Clear();
- for (int i = _PartyMode.GetMinPlayer() / 2; i <= _PartyMode.GetMaxPlayer() / 2; i++)
- _SelectSlides[_SelectSlideNumPlayerTeam2].AddValue(i.ToString());
- _SelectSlides[_SelectSlideNumPlayerTeam2].Selection = _Data.ScreenConfig.NumPlayerTeam2 - (_PartyMode.GetMinPlayer() / 2);
-
_SelectSlides[_SelectSlideNumFields].Clear();
_SelectSlides[_SelectSlideNumFields].AddValue("9");
_SelectSlides[_SelectSlideNumFields].AddValue("16");
@@ -226,9 +208,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private void _UpdateSlides()
{
- _Data.ScreenConfig.NumPlayerTeam1 = _SelectSlides[_SelectSlideNumPlayerTeam1].Selection + (_PartyMode.GetMinPlayer() / 2);
- _Data.ScreenConfig.NumPlayerTeam2 = _SelectSlides[_SelectSlideNumPlayerTeam2].Selection + (_PartyMode.GetMinPlayer() / 2);
-
if (_SelectSlides[_SelectSlideNumFields].Selection == 0)
_Data.ScreenConfig.NumFields = 9;
else if (_SelectSlides[_SelectSlideNumFields].Selection == 1)
diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
index 0fd0d3cd..9e2e5c05 100644
--- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
+++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs
@@ -39,12 +39,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private SDataFromScreen _Data;
- private class CPlayerChooseButton
- {
- public CButton Button;
- public int ProfileID;
- }
-
public override void Init()
{
base.Init();
@@ -92,11 +86,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public override void Back()
{
- List[] ids = GetTeamIDs();
- if(ids.Length == 2)
+ SPartyNameOptions options = GetData();
+ if(options.TeamList.Length == 2)
{
- _Data.ScreenNames.ProfileIDsTeam1 = ids[0];
- _Data.ScreenNames.ProfileIDsTeam2 = ids[1];
+ _Data.ScreenNames.ProfileIDsTeam1 = options.TeamList[0];
+ _Data.ScreenNames.ProfileIDsTeam2 = options.TeamList[1];
+ }
+ if (options.NumPlayerTeams.Length == 2)
+ {
+ _Data.ScreenNames.NumPlayerTeam1 = options.NumPlayerTeams[0];
+ _Data.ScreenNames.NumPlayerTeam2 = options.NumPlayerTeams[1];
}
_Data.ScreenNames.FadeToConfig = true;
_PartyMode.DataFromScreen(ThemeName, _Data);
@@ -104,11 +103,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public override void Next()
{
- List[] ids = GetTeamIDs();
- if (ids.Length == 2)
+ SPartyNameOptions options = GetData();
+ if (options.TeamList.Length == 2)
{
- _Data.ScreenNames.ProfileIDsTeam1 = ids[0];
- _Data.ScreenNames.ProfileIDsTeam2 = ids[1];
+ _Data.ScreenNames.ProfileIDsTeam1 = options.TeamList[0];
+ _Data.ScreenNames.ProfileIDsTeam2 = options.TeamList[1];
+ }
+ if (options.NumPlayerTeams.Length == 2)
+ {
+ _Data.ScreenNames.NumPlayerTeam1 = options.NumPlayerTeams[0];
+ _Data.ScreenNames.NumPlayerTeam2 = options.NumPlayerTeams[1];
}
_Data.ScreenNames.FadeToConfig = false;
_PartyMode.DataFromScreen(ThemeName, _Data);
diff --git a/VocaluxeLib/Menu/CMenuPartyNameSelection.cs b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs
index 42497756..5b0bb03a 100644
--- a/VocaluxeLib/Menu/CMenuPartyNameSelection.cs
+++ b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs
@@ -25,6 +25,11 @@ using VocaluxeLib.Profile;
namespace VocaluxeLib.Menu
{
+ public struct SPartyNameOptions
+ {
+ public int[] NumPlayerTeams;
+ public List[] TeamList;
+ }
public abstract class CMenuPartyNameSelection : CMenuParty
{
private bool _Teams;
@@ -64,8 +69,6 @@ namespace VocaluxeLib.Menu
public override void Init()
{
base.Init();
- _Teams = _PartyMode.GetMinTeams() > 0;
-
_ThemeButtons = new string[] { _ButtonBack, _ButtonNext, _ButtonIncreaseTeams, _ButtonDecreaseTeams, _ButtonIncreasePlayer, _ButtonDecreasePlayer };
_ThemeSelectSlides = new string[] { _SelectSlideTeams, _SelectSlidePlayer };
_ThemeNameSelections = new string[] { _NameSelection };
@@ -100,8 +103,12 @@ namespace VocaluxeLib.Menu
for (int i = 0; i < _TeamList.Length; i++)
_TeamList[i] = new List();
+ _Teams = _NumTeams > 0;
+
_UpdateSlides();
_LoadProfiles();
+ _UpdateButtonVisibility();
+ _UpdateButtonState();
}
public override bool HandleInput(SKeyEvent keyEvent)
@@ -349,7 +356,7 @@ namespace VocaluxeLib.Menu
else if (mouseEvent.RB)
{
bool exit = true;
- if (_SelectSlides[_SelectSlidePlayer].Selected && _SelectSlides[_SelectSlidePlayer].NumValues > 0 )
+ if (_SelectSlides[_SelectSlidePlayer].Selected && _TeamList[_CurrentTeam].Count > 0 )
{
int currentSelection = _SelectSlides[_SelectSlidePlayer].Selection;
int id = _TeamList[_CurrentTeam][currentSelection];
@@ -402,11 +409,6 @@ namespace VocaluxeLib.Menu
base.LoadTheme(xmlPath);
_SelectSlides[_SelectSlidePlayer].WithTextures = true;
_SelectSlides[_SelectSlidePlayer].SelectionByHover = true;
- _SelectSlides[_SelectSlideTeams].Visible = _Teams;
- _Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams;
- _Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams;
- _Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum;
- _Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum;
}
public override bool UpdateGame()
@@ -422,6 +424,9 @@ namespace VocaluxeLib.Menu
_NameSelections[_NameSelection].Init();
base.OnShow();
+
+ _UpdateButtonVisibility();
+ _UpdateButtonState();
}
public override bool Draw()
@@ -437,16 +442,12 @@ namespace VocaluxeLib.Menu
public abstract void Back();
public abstract void Next();
- public List GetTeamIDs(int team)
+ public SPartyNameOptions GetData()
{
- if (team < _TeamList.Length)
- return _TeamList[team];
- return null;
- }
-
- public List[] GetTeamIDs()
- {
- return _TeamList;
+ SPartyNameOptions option = new SPartyNameOptions();
+ option.NumPlayerTeams = _NumPlayerTeams;
+ option.TeamList = _TeamList;
+ return option;
}
public void IncreaseTeamNum()
@@ -475,6 +476,7 @@ namespace VocaluxeLib.Menu
}
}
}
+ _UpdateButtonState();
}
public void DecreaseTeamNum()
@@ -486,25 +488,27 @@ namespace VocaluxeLib.Menu
{
_NumTeams--;
}
+ _UpdateButtonState();
}
public void IncreasePlayerNum(int team)
{
if (!_AllowChangePlayerNum)
return;
- if (_NumPlayerTeams.Length < team)
+ if (_NumPlayerTeams.Length > team)
{
if (_NumPlayerTeams[team] + 1 <= _PartyMode.GetMaxPlayerPerTeam())
_NumPlayerTeams[team]++;
_UpdatePlayerSlide();
- }
+ }
+ _UpdateButtonState();
}
public void DecreasePlayerNum(int team)
{
if (!_AllowChangePlayerNum)
return;
- if (_NumPlayerTeams.Length < team)
+ if (_NumPlayerTeams.Length > team)
{
if (_NumPlayerTeams[team] - 1 >= _PartyMode.GetMinPlayerPerTeam())
_NumPlayerTeams[team]--;
@@ -512,6 +516,7 @@ namespace VocaluxeLib.Menu
_RemovePlayerByIndex(team, _NumPlayerTeams[team] - 1);
_UpdatePlayerSlide();
}
+ _UpdateButtonState();
}
#region private methods
@@ -563,7 +568,7 @@ namespace VocaluxeLib.Menu
}
for (int i = _TeamList[_CurrentTeam].Count; i < _NumPlayerTeams[_CurrentTeam]; i++)
{
- _SelectSlides[_SelectSlidePlayer].AddValue("Test", _NameSelections[_NameSelection].TextureEmptyTile);
+ _SelectSlides[_SelectSlidePlayer].AddValue("", _NameSelections[_NameSelection].TextureEmptyTile);
}
if (selection >= _TeamList[_CurrentTeam].Count)
selection = _TeamList[_CurrentTeam].Count - 1;
@@ -572,12 +577,37 @@ namespace VocaluxeLib.Menu
private void _UpdateTeamSlide()
{
+ _SelectSlides[_SelectSlideTeams].Visible = _Teams;
_SelectSlides[_SelectSlideTeams].Clear();
for (int i = 1; i <= _NumTeams; i++)
_SelectSlides[_SelectSlideTeams].AddValue("Team " + i);
}
+ private void _UpdateButtonVisibility()
+ {
+ _Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.GetMinTeams() != _PartyMode.GetMaxTeams();
+ _Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.GetMinTeams() != _PartyMode.GetMaxTeams();
+ _Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum;
+ _Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum;
+ }
+
+ private void _UpdateButtonState()
+ {
+ _Buttons[_ButtonIncreaseTeams].Enabled = _NumTeams < _PartyMode.GetMaxTeams();
+ _Buttons[_ButtonDecreaseTeams].Enabled = _NumTeams > _PartyMode.GetMinTeams();
+ if (_NumPlayerTeams != null && _NumPlayerTeams.Length > _CurrentTeam)
+ {
+ _Buttons[_ButtonIncreasePlayer].Enabled = _NumPlayerTeams[_CurrentTeam] < _PartyMode.GetMaxPlayerPerTeam();
+ _Buttons[_ButtonDecreasePlayer].Enabled = _NumPlayerTeams[_CurrentTeam] > _PartyMode.GetMinPlayerPerTeam();
+ }
+ else
+ {
+ _Buttons[_ButtonIncreasePlayer].Enabled = false;
+ _Buttons[_ButtonDecreasePlayer].Enabled = false;
+ }
+ }
+
private void _AddPlayer(int team, int profileID)
{
if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic)