Update challenge-config: Update mic-num automaticly
This commit is contained in:
1 parent
88630e5161
commit
bcbda3aa9e
2 files changed
+61
-7
No files matched your search
@@ -18,7 +18,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
const string ButtonNext = "ButtonNext";
|
const string ButtonNext = "ButtonNext";
|
||||||
const string ButtonBack = "ButtonBack";
|
const string ButtonBack = "ButtonBack";
|
||||||
|
|
||||||
private int MaxNumMics = 2;
|
private int MaxNumMics = 4;
|
||||||
private int MaxNumRounds = 100;
|
private int MaxNumRounds = 100;
|
||||||
|
|
||||||
DataFromScreen Data;
|
DataFromScreen Data;
|
||||||
@@ -140,8 +140,11 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
|
|
||||||
//TODO: Max number of mics should be number of mics available
|
//TODO: Max number of mics should be number of mics available
|
||||||
|
int _MaxNumMics = MaxNumMics;
|
||||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
for (int i = 1; i <= MaxNumMics; i++)
|
if (Data.ScreenConfig.NumPlayer < MaxNumMics)
|
||||||
|
_MaxNumMics = Data.ScreenConfig.NumPlayer;
|
||||||
|
for (int i = 1; i <= _MaxNumMics; i++)
|
||||||
{
|
{
|
||||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
}
|
}
|
||||||
@@ -177,6 +180,29 @@ namespace Vocaluxe.PartyModes
|
|||||||
private void UpdateSlides()
|
private void UpdateSlides()
|
||||||
{
|
{
|
||||||
//Update slides when one value was changed
|
//Update slides when one value was changed
|
||||||
|
if (Data.ScreenConfig.NumPlayer != (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer()))
|
||||||
|
{
|
||||||
|
if (Data.ScreenConfig.NumPlayerAtOnce != (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer()))
|
||||||
|
{
|
||||||
|
int OldValueNumPlayer = Data.ScreenConfig.NumPlayer;
|
||||||
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
|
int _MaxNumMics = MaxNumMics;
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
|
if (Data.ScreenConfig.NumPlayer < MaxNumMics)
|
||||||
|
_MaxNumMics = Data.ScreenConfig.NumPlayer;
|
||||||
|
for (int i = 1; i <= _MaxNumMics; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
if (SelectSlides[htSelectSlides(SelectSlideNumMics)].NumValues >= Data.ScreenConfig.NumPlayerAtOnce)
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - 1;
|
||||||
|
if (OldValueNumPlayer == Data.ScreenConfig.NumPlayerAtOnce)
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = SelectSlides[htSelectSlides(SelectSlideNumMics)].NumValues - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
|
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + 1;
|
||||||
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Back()
|
private void Back()
|
||||||
@@ -187,8 +213,8 @@ namespace Vocaluxe.PartyModes
|
|||||||
private void Next()
|
private void Next()
|
||||||
{
|
{
|
||||||
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection;
|
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + 1;
|
||||||
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection;
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1;
|
||||||
|
|
||||||
_PartyMode.DataFromScreen(_ThemeName, Data);
|
_PartyMode.DataFromScreen(_ThemeName, Data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,8 +140,11 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
|
|
||||||
//TODO: Max number of mics should be number of mics available
|
//TODO: Max number of mics should be number of mics available
|
||||||
|
int _MaxNumMics = MaxNumMics;
|
||||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
for (int i = 1; i <= MaxNumMics; i++)
|
if (Data.ScreenConfig.NumPlayer < MaxNumMics)
|
||||||
|
_MaxNumMics = Data.ScreenConfig.NumPlayer;
|
||||||
|
for (int i = 1; i <= _MaxNumMics; i++)
|
||||||
{
|
{
|
||||||
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
}
|
}
|
||||||
@@ -177,6 +180,31 @@ namespace Vocaluxe.PartyModes
|
|||||||
private void UpdateSlides()
|
private void UpdateSlides()
|
||||||
{
|
{
|
||||||
//Update slides when one value was changed
|
//Update slides when one value was changed
|
||||||
|
if (Data.ScreenConfig.NumPlayer != (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer()))
|
||||||
|
{
|
||||||
|
if (Data.ScreenConfig.NumPlayerAtOnce != (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer()))
|
||||||
|
{
|
||||||
|
int OldValueNumPlayer = Data.ScreenConfig.NumPlayer;
|
||||||
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
|
int _MaxNumMics = MaxNumMics;
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
|
if (Data.ScreenConfig.NumPlayer < MaxNumMics)
|
||||||
|
_MaxNumMics = Data.ScreenConfig.NumPlayer;
|
||||||
|
for (int i = 1; i <= _MaxNumMics; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
//Set to old selection
|
||||||
|
if (SelectSlides[htSelectSlides(SelectSlideNumMics)].NumValues >= Data.ScreenConfig.NumPlayerAtOnce)
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = Data.ScreenConfig.NumPlayerAtOnce - 1;
|
||||||
|
//Update selection, if old selection = max player num
|
||||||
|
if (OldValueNumPlayer == Data.ScreenConfig.NumPlayerAtOnce)
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection = SelectSlides[htSelectSlides(SelectSlideNumMics)].NumValues - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
|
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + 1;
|
||||||
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Back()
|
private void Back()
|
||||||
@@ -187,8 +215,8 @@ namespace Vocaluxe.PartyModes
|
|||||||
private void Next()
|
private void Next()
|
||||||
{
|
{
|
||||||
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
Data.ScreenConfig.NumPlayer = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection;
|
Data.ScreenConfig.NumPlayerAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection + 1;
|
||||||
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection;
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection + 1;
|
||||||
|
|
||||||
_PartyMode.DataFromScreen(_ThemeName, Data);
|
_PartyMode.DataFromScreen(_ThemeName, Data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user