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

@@ -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;
}
}
}