PlayerNames: Change player/team-num on NamesScreen. TODO: Theme-stuff and remove options from config screen.

This commit is contained in:
Florian Küpper committed 2013-12-26 13:02:00 +01:00
1 parent bdf28a5daf
commit aa481bb3f8
12 files changed
+536 -5

No files matched your search

@@ -172,6 +172,202 @@
<Height>26</Height>
</SReflection>
</ButtonBack>
<ButtonIncreasePlayer>
<!--<Skin>: Texture name-->
<Skin>Plus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Plus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonIncreasePlayer>
<ButtonDecreasePlayer>
<!--<Skin>: Texture name-->
<Skin>Minus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Minus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonDecreasePlayer>
<ButtonIncreaseTeams>
<!--<Skin>: Texture name-->
<Skin>Plus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Plus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonIncreaseTeams>
<ButtonDecreaseTeams>
<!--<Skin>: Texture name-->
<Skin>Minus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Minus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonDecreaseTeams>
<SelectSlideTeams>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

@@ -149,6 +149,8 @@
<ScrollDown>ScrollDown.png</ScrollDown>
<Invisible>Invisible.png</Invisible>
<PlayerSelector>PlayerSelector.png</PlayerSelector>
<Plus>Plus.png</Plus>
<Minus>Minus.png</Minus>
</Skins>
<Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video>
@@ -172,6 +172,202 @@
<Height>26</Height>
</SReflection>
</ButtonBack>
<ButtonIncreasePlayer>
<!--<Skin>: Texture name-->
<Skin>Plus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Plus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonIncreasePlayer>
<ButtonDecreasePlayer>
<!--<Skin>: Texture name-->
<Skin>Minus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Minus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonDecreasePlayer>
<ButtonIncreaseTeams>
<!--<Skin>: Texture name-->
<Skin>Plus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Plus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonIncreaseTeams>
<ButtonDecreaseTeams>
<!--<Skin>: Texture name-->
<Skin>Minus</Skin>
<!--<SkinSelected>: Texture name for selected button-->
<SkinSelected>Minus</SkinSelected>
<!--<X>, <Y>, <Z>, <W>, <H>: Button position, width and height-->
<X>145</X>
<Y>1200</Y>
<Z>0,00</Z>
<W>40</W>
<H>40</H>
<!--<Color>: Button color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonColor</Color>
<!--<SColor>: Selected button color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonSColor</SColor>
<Text>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>10</Y>
<!--<H>: Text height-->
<H>27</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>142</MaxW>
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>ButtonTextColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>ButtonTextSColor</SColor>
<!--<Align>: Text align horizontal: Left, Center, Right-->
<Align>Center</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text />
</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
<!--<SReflection> If exists:-->
<!-- <Space>: Reflection Space of selected button-->
<!-- <Height>: Reflection Height of selected button-->
</ButtonDecreaseTeams>
<SelectSlideTeams>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

@@ -223,6 +223,8 @@
<ScrollDown>ScrollDown.png</ScrollDown>
<Invisible>Invisible.png</Invisible>
<PlayerSelector>PlayerSelector.png</PlayerSelector>
<Plus>Plus.png</Plus>
<Minus>Minus.png</Minus>
</Skins>
<Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video>
@@ -135,6 +135,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
private const int _MinPlayer = 2;
private const int _MaxTeams = 2;
private const int _MinTeams = 2;
private const int _MinPlayerPerTeam = 1;
private const int _MaxPlayerPerTeam = 10;
private const int _NumFields = 9;
private enum EStage
@@ -480,6 +482,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe
return _MinTeams;
}
public override int GetMinPlayerPerTeam()
{
return _MinPlayerPerTeam;
}
public override int GetMaxPlayerPerTeam()
{
return _MaxPlayerPerTeam;
}
public override int GetMaxNumRounds()
{
return _NumFields;
+116 -5
View File
@@ -31,6 +31,9 @@ namespace VocaluxeLib.Menu
protected int _NumTeams = -1;
protected int _NumPlayer = -1;
protected int[] _NumPlayerTeams;
protected bool _AllowChangePlayerNum = true;
protected bool _AllowChangeTeamNum = true;
protected bool _ChangePlayerNumDynamic = true;
private int _CurrentTeam = 0;
private bool _AvatarsChanged;
@@ -48,6 +51,10 @@ namespace VocaluxeLib.Menu
private const string _ButtonNext = "ButtonNext";
private const string _ButtonBack = "ButtonBack";
private const string _ButtonIncreaseTeams = "ButtonIncreaseTeams";
private const string _ButtonDecreaseTeams = "ButtonDecreaseTeams";
private const string _ButtonIncreasePlayer = "ButtonIncreasePlayer";
private const string _ButtonDecreasePlayer = "ButtonDecreasePlayer";
private const string _SelectSlideTeams = "SelectSlideTeams";
private const string _SelectSlidePlayer = "SelectSlidePlayer";
private const string _NameSelection = "NameSelection";
@@ -59,7 +66,7 @@ namespace VocaluxeLib.Menu
base.Init();
_Teams = _PartyMode.GetMinTeams() > 0;
_ThemeButtons = new string[] { _ButtonBack, _ButtonNext };
_ThemeButtons = new string[] { _ButtonBack, _ButtonNext, _ButtonIncreaseTeams, _ButtonDecreaseTeams, _ButtonIncreasePlayer, _ButtonDecreasePlayer };
_ThemeSelectSlides = new string[] { _SelectSlideTeams, _SelectSlidePlayer };
_ThemeNameSelections = new string[] { _NameSelection };
@@ -120,8 +127,12 @@ namespace VocaluxeLib.Menu
_AddPlayer(_CurrentTeam, _SelectedProfileID);
}
//Started selecting with 'P'
if (_SelectingFast &&_SelectSlides[_SelectSlidePlayer].NumValues == _NumPlayerTeams[_CurrentTeam])
if (_SelectingFast) {
if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam])
resetSelection = true;
else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam())
resetSelection = true;
}
else if(!_SelectingFast)
resetSelection = true;
break;
@@ -166,6 +177,18 @@ namespace VocaluxeLib.Menu
if (_Buttons[_ButtonNext].Selected)
Next();
if (_Buttons[_ButtonIncreaseTeams].Selected)
IncreaseTeamNum();
if (_Buttons[_ButtonDecreaseTeams].Selected)
DecreaseTeamNum();
if (_Buttons[_ButtonIncreasePlayer].Selected)
IncreasePlayerNum(_CurrentTeam);
if (_Buttons[_ButtonDecreasePlayer].Selected)
DecreasePlayerNum(_CurrentTeam);
break;
case Keys.Delete:
@@ -272,7 +295,9 @@ namespace VocaluxeLib.Menu
_AddPlayer(_CurrentTeam, _SelectedProfileID);
if (_SelectSlides[_SelectSlidePlayer].NumValues == _NumPlayerTeams[_CurrentTeam])
if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam])
stopSelectingFast = true;
else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam())
stopSelectingFast = true;
}
else
@@ -288,6 +313,18 @@ namespace VocaluxeLib.Menu
if (_Buttons[_ButtonNext].Selected)
Next();
if (_Buttons[_ButtonIncreaseTeams].Selected)
IncreaseTeamNum();
if (_Buttons[_ButtonDecreaseTeams].Selected)
DecreaseTeamNum();
if (_Buttons[_ButtonIncreasePlayer].Selected)
IncreasePlayerNum(_CurrentTeam);
if (_Buttons[_ButtonDecreasePlayer].Selected)
DecreasePlayerNum(_CurrentTeam);
if (_SelectSlides[_SelectSlideTeams].Selected)
_OnChangeTeamSlide();
@@ -327,7 +364,9 @@ namespace VocaluxeLib.Menu
if (mouseEvent.MB && _SelectingFast)
{
if (_SelectSlides[_SelectSlidePlayer].NumValues == _NumPlayerTeams[_CurrentTeam])
if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam])
stopSelectingFast = true;
else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam())
stopSelectingFast = true;
}
else if (mouseEvent.MB)
@@ -364,6 +403,10 @@ namespace VocaluxeLib.Menu
_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()
@@ -405,6 +448,72 @@ namespace VocaluxeLib.Menu
{
return _TeamList;
}
public void IncreaseTeamNum()
{
if (!_AllowChangeTeamNum)
return;
if (_NumTeams + 1 <= _PartyMode.GetMaxTeams())
{
_NumTeams++;
int[] numPlayerTeams = _NumPlayerTeams;
List<int>[] teamList = _TeamList;
_NumPlayerTeams = new int[_NumTeams];
_TeamList = new List<int>[_NumTeams];
for (int i = 0; i < _NumPlayerTeams.Length; i++)
{
if (i < numPlayerTeams.Length)
{
_NumPlayerTeams[i] = numPlayerTeams[i];
_TeamList[i] = teamList[i];
}
else
{
_NumPlayerTeams[i] = _NumPlayer;
_TeamList[i] = new List<int>();
}
}
}
}
public void DecreaseTeamNum()
{
if (!_AllowChangeTeamNum)
return;
if (_NumTeams - 1 >= _PartyMode.GetMinTeams())
{
_NumTeams--;
}
}
public void IncreasePlayerNum(int team)
{
if (!_AllowChangePlayerNum)
return;
if (_NumPlayerTeams.Length < team)
{
if (_NumPlayerTeams[team] + 1 <= _PartyMode.GetMaxPlayerPerTeam())
_NumPlayerTeams[team]++;
_UpdatePlayerSlide();
}
}
public void DecreasePlayerNum(int team)
{
if (!_AllowChangePlayerNum)
return;
if (_NumPlayerTeams.Length < team)
{
if (_NumPlayerTeams[team] - 1 >= _PartyMode.GetMinPlayerPerTeam())
_NumPlayerTeams[team]--;
if (_TeamList[team].Count > _NumPlayerTeams[team])
_RemovePlayerByIndex(team, _NumPlayerTeams[team] - 1);
_UpdatePlayerSlide();
}
}
#region private methods
private void _OnProfileChanged(EProfileChangedFlags flags)
@@ -471,7 +580,9 @@ namespace VocaluxeLib.Menu
private void _AddPlayer(int team, int profileID)
{
if (_NumPlayerTeams[team] == _TeamList[team].Count)
if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic)
return;
else if (_NumPlayerTeams[team] == _PartyMode.GetMaxPlayerPerTeam())
return;
_NameSelections[_NameSelection].UseProfile(profileID);
+10
View File
@@ -95,6 +95,16 @@ namespace VocaluxeLib.PartyModes
return 0;
}
public virtual int GetMinPlayerPerTeam()
{
return GetMinPlayer();
}
public virtual int GetMaxPlayerPerTeam()
{
return GetMaxPlayer();
}
public virtual int GetMaxNumRounds()
{
return 1;
+2
View File
@@ -101,6 +101,8 @@ namespace VocaluxeLib.PartyModes
int GetMinPlayer();
int GetMaxTeams();
int GetMinTeams();
int GetMinPlayerPerTeam();
int GetMaxPlayerPerTeam();
int GetMaxNumRounds();
string GetFolder();
void SetFolder(string folder);