Added slides to challenge-config.
This commit is contained in:
1 parent
60ae51ff90
commit
cbed73a568
3 files changed
+81
-9
No files matched your search
@@ -12,9 +12,15 @@ namespace Vocaluxe.PartyModes
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
const int ScreenVersion = 1;
|
const int ScreenVersion = 1;
|
||||||
|
|
||||||
|
const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
|
||||||
|
const string SelectSlideNumMics = "SelectSlideNumMics";
|
||||||
|
const string SelectSlideNumRounds = "SelectSlideNumRounds";
|
||||||
const string ButtonNext = "ButtonNext";
|
const string ButtonNext = "ButtonNext";
|
||||||
const string ButtonBack = "ButtonBack";
|
const string ButtonBack = "ButtonBack";
|
||||||
|
|
||||||
|
private int MaxNumMics = 2;
|
||||||
|
private int MaxNumRounds = 10;
|
||||||
|
|
||||||
DataFromScreen Data;
|
DataFromScreen Data;
|
||||||
|
|
||||||
public PartyScreenChallengeConfig()
|
public PartyScreenChallengeConfig()
|
||||||
@@ -26,6 +32,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
_ThemeName = "PartyScreenChallengeConfig";
|
_ThemeName = "PartyScreenChallengeConfig";
|
||||||
|
_ThemeSelectSlides = new string[] { SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds };
|
||||||
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
|
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
|
||||||
_ScreenVersion = ScreenVersion;
|
_ScreenVersion = ScreenVersion;
|
||||||
|
|
||||||
@@ -77,6 +84,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||||
{
|
{
|
||||||
|
UpdateSlides();
|
||||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||||
Back();
|
Back();
|
||||||
|
|
||||||
@@ -95,6 +103,24 @@ namespace Vocaluxe.PartyModes
|
|||||||
public override void OnShow()
|
public override void OnShow()
|
||||||
{
|
{
|
||||||
base.OnShow();
|
base.OnShow();
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
|
||||||
|
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
//TODO: Max number of mics should be number of mics available
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
|
for (int i = 1; i <= MaxNumMics; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
//TODO: Max number ofs round should depend on number of players and mics
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
|
||||||
|
for (int i = 1; i <= MaxNumRounds; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
UpdateSlides();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool UpdateGame()
|
public override bool UpdateGame()
|
||||||
@@ -113,6 +139,11 @@ namespace Vocaluxe.PartyModes
|
|||||||
base.OnClose();
|
base.OnClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateSlides()
|
||||||
|
{
|
||||||
|
//Update slides when one value was changed
|
||||||
|
}
|
||||||
|
|
||||||
private void Back()
|
private void Back()
|
||||||
{
|
{
|
||||||
FadeTo(EScreens.ScreenParty);
|
FadeTo(EScreens.ScreenParty);
|
||||||
@@ -120,9 +151,9 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
private void Next()
|
private void Next()
|
||||||
{
|
{
|
||||||
Data.ScreenConfig.NumPlayers = 4;
|
Data.ScreenConfig.NumPlayers = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
Data.ScreenConfig.NumPlayersAtOnce = 2;
|
Data.ScreenConfig.NumPlayersAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection;
|
||||||
Data.ScreenConfig.NumRounds = 8;
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection;
|
||||||
|
|
||||||
_PartyMode.DataFromScreen(_ThemeName, Data);
|
_PartyMode.DataFromScreen(_ThemeName, Data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,7 +322,7 @@
|
|||||||
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<!--<NumVisible>: Number of visible elements in the slide-->
|
<!--<NumVisible>: Number of visible elements in the slide-->
|
||||||
<NumVisible>3</NumVisible>
|
<NumVisible>9</NumVisible>
|
||||||
</SelectSlideNumPlayers>
|
</SelectSlideNumPlayers>
|
||||||
<SelectSlideNumMics>
|
<SelectSlideNumMics>
|
||||||
<!--<Skin>: Texture name-->
|
<!--<Skin>: Texture name-->
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<!--<NumVisible>: Number of visible elements in the slide-->
|
<!--<NumVisible>: Number of visible elements in the slide-->
|
||||||
<NumVisible>3</NumVisible>
|
<NumVisible>2</NumVisible>
|
||||||
</SelectSlideNumMics>
|
</SelectSlideNumMics>
|
||||||
<SelectSlideNumRounds>
|
<SelectSlideNumRounds>
|
||||||
<!--<Skin>: Texture name-->
|
<!--<Skin>: Texture name-->
|
||||||
@@ -452,7 +452,7 @@
|
|||||||
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
|
||||||
<TextStyle>Bold</TextStyle>
|
<TextStyle>Bold</TextStyle>
|
||||||
<!--<NumVisible>: Number of visible elements in the slide-->
|
<!--<NumVisible>: Number of visible elements in the slide-->
|
||||||
<NumVisible>3</NumVisible>
|
<NumVisible>10</NumVisible>
|
||||||
</SelectSlideNumRounds>
|
</SelectSlideNumRounds>
|
||||||
</PartyScreenChallengeConfig>
|
</PartyScreenChallengeConfig>
|
||||||
</root>
|
</root>
|
||||||
@@ -12,9 +12,15 @@ namespace Vocaluxe.PartyModes
|
|||||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||||
const int ScreenVersion = 1;
|
const int ScreenVersion = 1;
|
||||||
|
|
||||||
|
const string SelectSlideNumPlayers = "SelectSlideNumPlayers";
|
||||||
|
const string SelectSlideNumMics = "SelectSlideNumMics";
|
||||||
|
const string SelectSlideNumRounds = "SelectSlideNumRounds";
|
||||||
const string ButtonNext = "ButtonNext";
|
const string ButtonNext = "ButtonNext";
|
||||||
const string ButtonBack = "ButtonBack";
|
const string ButtonBack = "ButtonBack";
|
||||||
|
|
||||||
|
private int MaxNumMics = 2;
|
||||||
|
private int MaxNumRounds = 10;
|
||||||
|
|
||||||
DataFromScreen Data;
|
DataFromScreen Data;
|
||||||
|
|
||||||
public PartyScreenChallengeConfig()
|
public PartyScreenChallengeConfig()
|
||||||
@@ -26,6 +32,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
base.Init();
|
base.Init();
|
||||||
|
|
||||||
_ThemeName = "PartyScreenChallengeConfig";
|
_ThemeName = "PartyScreenChallengeConfig";
|
||||||
|
_ThemeSelectSlides = new string[] { SelectSlideNumPlayers, SelectSlideNumMics, SelectSlideNumRounds };
|
||||||
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
|
_ThemeButtons = new string[] { ButtonNext, ButtonBack };
|
||||||
_ScreenVersion = ScreenVersion;
|
_ScreenVersion = ScreenVersion;
|
||||||
|
|
||||||
@@ -60,12 +67,22 @@ namespace Vocaluxe.PartyModes
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
|
UpdateSlides();
|
||||||
|
|
||||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||||
Back();
|
Back();
|
||||||
|
|
||||||
if (Buttons[htButtons(ButtonNext)].Selected)
|
if (Buttons[htButtons(ButtonNext)].Selected)
|
||||||
Next();
|
Next();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Keys.Left:
|
||||||
|
UpdateSlides();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Keys.Right:
|
||||||
|
UpdateSlides();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -77,6 +94,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
if (MouseEvent.LB && IsMouseOver(MouseEvent))
|
||||||
{
|
{
|
||||||
|
UpdateSlides();
|
||||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||||
Back();
|
Back();
|
||||||
|
|
||||||
@@ -95,6 +113,24 @@ namespace Vocaluxe.PartyModes
|
|||||||
public override void OnShow()
|
public override void OnShow()
|
||||||
{
|
{
|
||||||
base.OnShow();
|
base.OnShow();
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Clear();
|
||||||
|
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumPlayers)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
//TODO: Max number of mics should be number of mics available
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].Clear();
|
||||||
|
for (int i = 1; i <= MaxNumMics; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumMics)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
//TODO: Max number ofs round should depend on number of players and mics
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumRounds)].Clear();
|
||||||
|
for (int i = 1; i <= MaxNumRounds; i++)
|
||||||
|
{
|
||||||
|
SelectSlides[htSelectSlides(SelectSlideNumRounds)].AddValue(i.ToString());
|
||||||
|
}
|
||||||
|
UpdateSlides();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool UpdateGame()
|
public override bool UpdateGame()
|
||||||
@@ -113,6 +149,11 @@ namespace Vocaluxe.PartyModes
|
|||||||
base.OnClose();
|
base.OnClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateSlides()
|
||||||
|
{
|
||||||
|
//Update slides when one value was changed
|
||||||
|
}
|
||||||
|
|
||||||
private void Back()
|
private void Back()
|
||||||
{
|
{
|
||||||
FadeTo(EScreens.ScreenParty);
|
FadeTo(EScreens.ScreenParty);
|
||||||
@@ -120,9 +161,9 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
private void Next()
|
private void Next()
|
||||||
{
|
{
|
||||||
Data.ScreenConfig.NumPlayers = 4;
|
Data.ScreenConfig.NumPlayers = (SelectSlides[htSelectSlides(SelectSlideNumPlayers)].Selection + _PartyMode.GetMinPlayer());
|
||||||
Data.ScreenConfig.NumPlayersAtOnce = 2;
|
Data.ScreenConfig.NumPlayersAtOnce = SelectSlides[htSelectSlides(SelectSlideNumMics)].Selection;
|
||||||
Data.ScreenConfig.NumRounds = 8;
|
Data.ScreenConfig.NumRounds = SelectSlides[htSelectSlides(SelectSlideNumRounds)].Selection;
|
||||||
|
|
||||||
_PartyMode.DataFromScreen(_ThemeName, Data);
|
_PartyMode.DataFromScreen(_ThemeName, Data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user