RefillJokers option for tic tac toe mode (closes #220)

This commit is contained in:
Florian Küpper committed 2017-09-12 08:34:49 +02:00
1 parent 770247248e
commit 0ee24a2304
3 files changed
+17 -147

No files matched your search

@@ -2,7 +2,7 @@
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Informations> <Informations>
<ScreenName>PartyScreenTicTacToeConfig</ScreenName> <ScreenName>PartyScreenTicTacToeConfig</ScreenName>
<ScreenVersion>1</ScreenVersion> <ScreenVersion>2</ScreenVersion>
</Informations> </Informations>
<Backgrounds> <Backgrounds>
<Background Name="Background1"> <Background Name="Background1">
@@ -55,7 +55,7 @@
<Font>Outline</Font> <Font>Outline</Font>
<Text>TR_SCREENCONFIG_NUMFIELDS</Text> <Text>TR_SCREENCONFIG_NUMFIELDS</Text>
</Text> </Text>
<Text Name="TextSongSource"> <Text Name="TextRefillJoker">
<X>75</X> <X>75</X>
<Y>165</Y> <Y>165</Y>
<Z>0</Z> <Z>0</Z>
@@ -67,21 +67,7 @@
<ResizeAlign>Center</ResizeAlign> <ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style> <Style>Bold</Style>
<Font>Outline</Font> <Font>Outline</Font>
<Text>TR_SCREENCONFIG_SONGSOURCE</Text> <Text>TR_SCREENCONFIG_REFILLJOKER</Text>
</Text>
<Text Name="TextGameMode">
<X>75</X>
<Y>285</Y>
<Z>0</Z>
<H>27</H>
<MaxW>0</MaxW>
<Color Name="TextColor" />
<SelColor Name="TextSelColor" />
<Align>Left</Align>
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENCONFIG_GAMEMODE</Text>
</Text> </Text>
</Texts> </Texts>
<Buttons> <Buttons>
@@ -201,7 +187,7 @@
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
<NumVisible>3</NumVisible> <NumVisible>3</NumVisible>
</SelectSlide> </SelectSlide>
<SelectSlide Name="SelectSlideSongSource"> <SelectSlide Name="SelectSlideRefillJokers">
<Skin/> <Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft> <SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight> <SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
@@ -241,133 +227,7 @@
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
<NumVisible>3</NumVisible> <NumVisible>2</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlidePlaylist">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
<X>500</X>
<Y>220</Y>
<W>700</W>
<H>50</H>
<Z>0</Z>
</Rect>
<RectArrowLeft>
<X>505</X>
<Y>225</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowLeft>
<RectArrowRight>
<X>1155</X>
<Y>225</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowRight>
<Color Name="SelectSlideColor" />
<SelColor Name="SelectSlideSelColor" />
<ArrowColor Name="ArrowColor" />
<ArrowSelColor Name="ArrowSelColor" />
<TextColor Name="TextColorAlpha" />
<TextSelColor Name="TextSelColor" />
<TextH>27</TextH>
<TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>1</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideCategory">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
<X>500</X>
<Y>220</Y>
<W>700</W>
<H>50</H>
<Z>0</Z>
</Rect>
<RectArrowLeft>
<X>505</X>
<Y>225</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowLeft>
<RectArrowRight>
<X>1155</X>
<Y>225</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowRight>
<Color Name="SelectSlideColor" />
<SelColor Name="SelectSlideSelColor" />
<ArrowColor Name="ArrowColor" />
<ArrowSelColor Name="ArrowSelColor" />
<TextColor Name="TextColorAlpha" />
<TextSelColor Name="TextSelColor" />
<TextH>27</TextH>
<TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>1</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideGameMode">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<SkinSelected>SelectSlide</SkinSelected>
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<Rect>
<X>500</X>
<Y>280</Y>
<W>700</W>
<H>50</H>
<Z>0</Z>
</Rect>
<RectArrowLeft>
<X>505</X>
<Y>285</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowLeft>
<RectArrowRight>
<X>1155</X>
<Y>285</Y>
<W>40</W>
<H>40</H>
<Z>0</Z>
</RectArrowRight>
<Color Name="SelectSlideColor" />
<SelColor Name="SelectSlideSelColor" />
<ArrowColor Name="ArrowColor" />
<ArrowSelColor Name="ArrowSelColor" />
<TextColor Name="TextColorAlpha" />
<TextSelColor Name="TextSelColor" />
<TextH>27</TextH>
<TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>1</NumVisible>
</SelectSlide> </SelectSlide>
</SelectSlides> </SelectSlides>
<SingNotes /> <SingNotes />
@@ -125,6 +125,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public int[] NumJokerRandom; public int[] NumJokerRandom;
public int[] NumJokerRetry; public int[] NumJokerRetry;
public EOffOn RefillJokers;
} }
public SData GameData; public SData GameData;
@@ -162,7 +163,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
Rounds = new List<CRound>(), Rounds = new List<CRound>(),
Songs = new List<int>(), Songs = new List<int>(),
NumJokerRandom = new int[2], NumJokerRandom = new int[2],
NumJokerRetry = new int[2] NumJokerRetry = new int[2],
RefillJokers = EOffOn.TR_CONFIG_OFF
}; };
} }
@@ -254,6 +256,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_Stage = EStage.Main; _Stage = EStage.Main;
GameData.Team = GameData.Team == 1 ? 0 : 1; GameData.Team = GameData.Team == 1 ? 0 : 1;
_UpdatePlayerList(); _UpdatePlayerList();
if (GameData.RefillJokers == EOffOn.TR_CONFIG_ON)
_SetNumJokers();
break; break;
default: default:
throw new ArgumentException("Invalid stage: " + _Stage); throw new ArgumentException("Invalid stage: " + _Stage);
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>. // along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion #endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
@@ -30,10 +31,11 @@ namespace VocaluxeLib.PartyModes.TicTacToe
// 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!
protected override int _ScreenVersion protected override int _ScreenVersion
{ {
get { return 1; } get { return 2; }
} }
private const string _SelectSlideNumFields = "SelectSlideNumFields"; private const string _SelectSlideNumFields = "SelectSlideNumFields";
private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
private const string _ButtonNext = "ButtonNext"; private const string _ButtonNext = "ButtonNext";
private const string _ButtonBack = "ButtonBack"; private const string _ButtonBack = "ButtonBack";
@@ -128,11 +130,15 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_SelectSlides[_SelectSlideNumFields].AddValue(25); _SelectSlides[_SelectSlideNumFields].AddValue(25);
_SelectSlides[_SelectSlideNumFields].SelectedTag = _PartyMode.GameData.NumFields; _SelectSlides[_SelectSlideNumFields].SelectedTag = _PartyMode.GameData.NumFields;
_SelectSlides[_SelectSlideRefillJokers].AddValues(Enum.GetNames(typeof(EOffOn)));
_SelectSlides[_SelectSlideRefillJokers].Selection = (int)_PartyMode.GameData.RefillJokers;
} }
private void _UpdateSlides() private void _UpdateSlides()
{ {
_PartyMode.GameData.NumFields = _SelectSlides[_SelectSlideNumFields].SelectedTag; _PartyMode.GameData.NumFields = _SelectSlides[_SelectSlideNumFields].SelectedTag;
_PartyMode.GameData.RefillJokers = (EOffOn)_SelectSlides[_SelectSlideRefillJokers].Selection;
} }
} }
} }