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
+18 -148

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">
<Informations>
<ScreenName>PartyScreenTicTacToeConfig</ScreenName>
<ScreenVersion>1</ScreenVersion>
<ScreenVersion>2</ScreenVersion>
</Informations>
<Backgrounds>
<Background Name="Background1">
@@ -55,7 +55,7 @@
<Font>Outline</Font>
<Text>TR_SCREENCONFIG_NUMFIELDS</Text>
</Text>
<Text Name="TextSongSource">
<Text Name="TextRefillJoker">
<X>75</X>
<Y>165</Y>
<Z>0</Z>
@@ -67,21 +67,7 @@
<ResizeAlign>Center</ResizeAlign>
<Style>Bold</Style>
<Font>Outline</Font>
<Text>TR_SCREENCONFIG_SONGSOURCE</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>TR_SCREENCONFIG_REFILLJOKER</Text>
</Text>
</Texts>
<Buttons>
@@ -201,7 +187,7 @@
<TextStyle>Bold</TextStyle>
<NumVisible>3</NumVisible>
</SelectSlide>
<SelectSlide Name="SelectSlideSongSource">
<SelectSlide Name="SelectSlideRefillJokers">
<Skin/>
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
@@ -241,133 +227,7 @@
<TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle>
<NumVisible>3</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>
<NumVisible>2</NumVisible>
</SelectSlide>
</SelectSlides>
<SingNotes />
@@ -376,4 +236,4 @@
<Playlists />
<ParticleEffects />
<ScreenSettings />
</Screen>
</Screen>
@@ -125,6 +125,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
public int[] NumJokerRandom;
public int[] NumJokerRetry;
public EOffOn RefillJokers;
}
public SData GameData;
@@ -162,7 +163,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe
Rounds = new List<CRound>(),
Songs = new List<int>(),
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;
GameData.Team = GameData.Team == 1 ? 0 : 1;
_UpdatePlayerList();
if (GameData.RefillJokers == EOffOn.TR_CONFIG_ON)
_SetNumJokers();
break;
default:
throw new ArgumentException("Invalid stage: " + _Stage);
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.Diagnostics;
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!
protected override int _ScreenVersion
{
get { return 1; }
get { return 2; }
}
private const string _SelectSlideNumFields = "SelectSlideNumFields";
private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
private const string _ButtonNext = "ButtonNext";
private const string _ButtonBack = "ButtonBack";
@@ -128,11 +130,15 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_SelectSlides[_SelectSlideNumFields].AddValue(25);
_SelectSlides[_SelectSlideNumFields].SelectedTag = _PartyMode.GameData.NumFields;
_SelectSlides[_SelectSlideRefillJokers].AddValues(Enum.GetNames(typeof(EOffOn)));
_SelectSlides[_SelectSlideRefillJokers].Selection = (int)_PartyMode.GameData.RefillJokers;
}
private void _UpdateSlides()
{
_PartyMode.GameData.NumFields = _SelectSlides[_SelectSlideNumFields].SelectedTag;
_PartyMode.GameData.RefillJokers = (EOffOn)_SelectSlides[_SelectSlideRefillJokers].Selection;
}
}
}