Merge branch 'develop' into nugetDependencies
This commit is contained in:
commit
a504a77bef
9 files changed
+192
-42
No files matched your search
@@ -8,7 +8,7 @@
|
||||
<Folder>Challenge</Folder>
|
||||
<PartyModeFile>CPartyModeChallenge</PartyModeFile>
|
||||
<PartyModeVersionMajor>0</PartyModeVersionMajor>
|
||||
<PartyModeVersionMinor>1</PartyModeVersionMinor>
|
||||
<PartyModeVersionMinor>3</PartyModeVersionMinor>
|
||||
<TargetAudience>TR_PARTYMODE_AUDIENCE</TargetAudience>
|
||||
</Info>
|
||||
<PartyScreens>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
<string name="TR_SCREENCONFIG_NUMPLAYERS">Number of players</string>
|
||||
<string name="TR_SCREENCONFIG_NUMMICS">Number of mics</string>
|
||||
<string name="TR_SCREENCONFIG_NUMROUNDS">Number of rounds</string>
|
||||
<string name="TR_SCREENCONFIG_NUMJOKERS">Number of jokers</string>
|
||||
<string name="TR_SCREENCONFIG_REFILLJOKERS">Refill jokers every round</string>
|
||||
<string name="TR_SCREENNAMES_TITLE">Challenge Mode: Choose Player</string>
|
||||
<string name="TR_SCREENNAMES_BUTTON_RANDOM">Select random</string>
|
||||
<string name="TR_SCREENMAIN_TITLE">Challenge Mode: Overview</string>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>PartyScreenChallengeConfig</ScreenName>
|
||||
<ScreenVersion>1</ScreenVersion>
|
||||
<ScreenVersion>3</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -82,6 +82,34 @@
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENCONFIG_NUMROUNDS</Text>
|
||||
</Text>
|
||||
<Text Name="Text5">
|
||||
<X>75</X>
|
||||
<Y>285</Y>
|
||||
<Z>0</Z>
|
||||
<H>27</H>
|
||||
<MaxW>0</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Left</Align>
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENCONFIG_NUMJOKERS</Text>
|
||||
</Text>
|
||||
<Text Name="Text6">
|
||||
<X>75</X>
|
||||
<Y>345</Y>
|
||||
<Z>0</Z>
|
||||
<H>27</H>
|
||||
<MaxW>0</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Left</Align>
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENCONFIG_REFILLJOKERS</Text>
|
||||
</Text>
|
||||
</Texts>
|
||||
<Buttons>
|
||||
@@ -284,6 +312,90 @@
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>10</NumVisible>
|
||||
</SelectSlide>
|
||||
<SelectSlide Name="SelectSlideNumJokers">
|
||||
<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>1170</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="TextColor" />
|
||||
<TextSelColor Name="TextSelColor" />
|
||||
<TextH>27</TextH>
|
||||
<TextRelativeX>50</TextRelativeX>
|
||||
<TextRelativeY>0</TextRelativeY>
|
||||
<TextMaxW>205.33</TextMaxW>
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>10</NumVisible>
|
||||
</SelectSlide>
|
||||
<SelectSlide Name="SelectSlideRefillJokers">
|
||||
<Skin/>
|
||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||
<SkinSelected>SelectSlide</SkinSelected>
|
||||
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>500</X>
|
||||
<Y>340</Y>
|
||||
<W>700</W>
|
||||
<H>50</H>
|
||||
<Z>0</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>505</X>
|
||||
<Y>345</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>0</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>1170</X>
|
||||
<Y>345</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="TextColor" />
|
||||
<TextSelColor Name="TextSelColor" />
|
||||
<TextH>27</TextH>
|
||||
<TextRelativeX>50</TextRelativeX>
|
||||
<TextRelativeY>0</TextRelativeY>
|
||||
<TextMaxW>205.33</TextMaxW>
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>2</NumVisible>
|
||||
</SelectSlide>
|
||||
</SelectSlides>
|
||||
<SingNotes />
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
Minus
|
||||
RepeatIcon
|
||||
</Textures>
|
||||
<Videos>
|
||||
BG_Video
|
||||
</Videos>
|
||||
<Videos></Videos>
|
||||
<Colors>
|
||||
Player1
|
||||
Player2
|
||||
|
||||
@@ -113,6 +113,9 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
public int NumPlayer;
|
||||
public int NumPlayerAtOnce;
|
||||
public int NumRounds;
|
||||
public int NumJokers;
|
||||
public bool RefillJokers;
|
||||
public int[] Jokers;
|
||||
public List<int> ProfileIDs;
|
||||
|
||||
public CChallengeRounds Rounds;
|
||||
@@ -147,7 +150,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_ScreenSongOptions.Sorting.SearchActive = false;
|
||||
_ScreenSongOptions.Sorting.DuetOptions = EDuetOptions.NoDuets;
|
||||
|
||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
||||
GameData = new SData {NumPlayer = 4, NumPlayerAtOnce = 2, NumRounds = 12, NumJokers = 5, RefillJokers = true, CurrentRoundNr = 1, ProfileIDs = new List<int>(), CatSongIndices = null, Results = null};
|
||||
}
|
||||
|
||||
public override bool Init()
|
||||
@@ -213,6 +216,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
GameData.ResultTable = new List<CResultTableRow>();
|
||||
GameData.Rounds = new CChallengeRounds(GameData.NumRounds, GameData.NumPlayer, GameData.NumPlayerAtOnce);
|
||||
GameData.CurrentRoundNr = 1;
|
||||
GameData.Jokers = null;
|
||||
break;
|
||||
case EStage.Main:
|
||||
_Stage = EStage.Singing;
|
||||
@@ -320,6 +324,11 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
if (teamNr >= _ScreenSongOptions.Selection.NumJokers.Length)
|
||||
return;
|
||||
|
||||
if (!GameData.RefillJokers)
|
||||
{
|
||||
CRound round = GameData.Rounds[GameData.CurrentRoundNr - 1];
|
||||
GameData.Jokers[round.Players[teamNr]]--;
|
||||
}
|
||||
_ScreenSongOptions.Selection.NumJokers[teamNr]--;
|
||||
_ScreenSongOptions.Selection.RandomOnly = true;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = false;
|
||||
@@ -373,35 +382,29 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
|
||||
private void _SetNumJokers()
|
||||
{
|
||||
switch (GameData.NumPlayerAtOnce)
|
||||
{
|
||||
case 1:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {10};
|
||||
break;
|
||||
|
||||
case 2:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
|
||||
break;
|
||||
|
||||
case 3:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {4, 4, 4};
|
||||
break;
|
||||
|
||||
case 4:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {3, 3, 3, 3};
|
||||
break;
|
||||
|
||||
case 5:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2};
|
||||
break;
|
||||
|
||||
case 6:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {2, 2, 2, 2, 2, 2};
|
||||
break;
|
||||
default:
|
||||
_ScreenSongOptions.Selection.NumJokers = new int[] {5, 5};
|
||||
break;
|
||||
int[] jokers = new int[GameData.NumPlayerAtOnce];
|
||||
if (GameData.RefillJokers)
|
||||
{
|
||||
for (int i = 0; i < jokers.Length; i++)
|
||||
jokers[i] = GameData.NumJokers;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GameData.Jokers == null)
|
||||
{
|
||||
GameData.Jokers = new int[GameData.NumPlayer];
|
||||
for (int i = 0; i < GameData.ProfileIDs.Count; i++)
|
||||
{
|
||||
GameData.Jokers[i] = GameData.NumJokers;
|
||||
}
|
||||
}
|
||||
CRound round = GameData.Rounds[GameData.CurrentRoundNr - 1];
|
||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||
{
|
||||
jokers[i] = GameData.Jokers[round.Players[i]];
|
||||
}
|
||||
}
|
||||
_ScreenSongOptions.Selection.NumJokers = jokers;
|
||||
}
|
||||
|
||||
private void _SetTeamNames()
|
||||
|
||||
@@ -27,12 +27,14 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
// 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 3; }
|
||||
}
|
||||
|
||||
private const string _SelectSlideNumPlayers = "SelectSlideNumPlayers";
|
||||
private const string _SelectSlideNumMics = "SelectSlideNumMics";
|
||||
private const string _SelectSlideNumRounds = "SelectSlideNumRounds";
|
||||
private const string _SelectSlideNumJokers = "SelectSlideNumJokers";
|
||||
private const string _SelectSlideRefillJokers = "SelectSlideRefillJokers";
|
||||
private const string _ButtonNext = "ButtonNext";
|
||||
private const string _ButtonBack = "ButtonBack";
|
||||
|
||||
@@ -43,7 +45,7 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
{
|
||||
base.Init();
|
||||
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds};
|
||||
_ThemeSelectSlides = new string[] { _SelectSlideNumPlayers, _SelectSlideNumMics, _SelectSlideNumRounds, _SelectSlideNumJokers, _SelectSlideRefillJokers };
|
||||
_ThemeButtons = new string[] {_ButtonNext, _ButtonBack};
|
||||
}
|
||||
|
||||
@@ -123,6 +125,20 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_SelectSlides[_SelectSlideNumPlayers].AddValue(i.ToString());
|
||||
_SelectSlides[_SelectSlideNumPlayers].SelectedValue = _PartyMode.GameData.NumPlayer.ToString();
|
||||
|
||||
// build num joker slide 1 to 10
|
||||
_SelectSlides[_SelectSlideNumJokers].Clear();
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideNumJokers].AddValue(i.ToString());
|
||||
}
|
||||
_SelectSlides[_SelectSlideNumJokers].SelectedValue = "5";
|
||||
|
||||
//build joker config slide
|
||||
_SelectSlides[_SelectSlideRefillJokers].Clear();
|
||||
_SelectSlides[_SelectSlideRefillJokers].AddValue(CBase.Language.Translate("TR_BUTTON_NO", PartyModeID));
|
||||
_SelectSlides[_SelectSlideRefillJokers].AddValue(CBase.Language.Translate("TR_BUTTON_YES", PartyModeID));
|
||||
_SelectSlides[_SelectSlideRefillJokers].SelectLastValue();
|
||||
|
||||
_UpdateMicsAtOnce();
|
||||
_SetRoundSteps();
|
||||
_UpdateSlideRounds();
|
||||
@@ -135,6 +151,8 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_PartyMode.GameData.NumPlayer = _SelectSlides[_SelectSlideNumPlayers].Selection + _PartyMode.MinPlayers;
|
||||
_PartyMode.GameData.NumPlayerAtOnce = _SelectSlides[_SelectSlideNumMics].Selection + _PartyMode.MinPlayers;
|
||||
_PartyMode.GameData.NumRounds = (_SelectSlides[_SelectSlideNumRounds].Selection + 1) * _RoundSteps;
|
||||
_PartyMode.GameData.NumJokers = _SelectSlides[_SelectSlideNumJokers].Selection + 1;
|
||||
_PartyMode.GameData.RefillJokers = (_SelectSlides[_SelectSlideRefillJokers].Selection == 1) ? true : false;
|
||||
|
||||
_UpdateMicsAtOnce();
|
||||
_SetRoundSteps();
|
||||
|
||||
@@ -41,6 +41,10 @@ namespace Vocaluxe.Base
|
||||
public void Load(string videoName)
|
||||
{
|
||||
_VideoStream = CThemes.GetSkinVideo(videoName, -1, false);
|
||||
if (_VideoStream == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_Loaded = true;
|
||||
CVideo.Pause(_VideoStream);
|
||||
}
|
||||
@@ -68,6 +72,11 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
if (!_Loaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_Finished)
|
||||
{
|
||||
float videoTime = _VideoTimer.ElapsedMilliseconds / 1000f;
|
||||
@@ -83,6 +92,10 @@ namespace Vocaluxe.Base
|
||||
|
||||
public void PreLoad()
|
||||
{
|
||||
if (!_Loaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool paused = _VideoTimer.IsRunning;
|
||||
if (paused)
|
||||
CVideo.Resume(_VideoStream);
|
||||
|
||||
@@ -178,8 +178,8 @@ namespace Vocaluxe.Base.ThemeSystem
|
||||
CVideoSkinElement sk = new CVideoSkinElement {FileName = kvp.Value};
|
||||
if (!File.Exists(Path.Combine(_Folder, sk.FileName)))
|
||||
{
|
||||
CLog.LogError("Video \"" + kvp.Key + "\": (" + sk.FileName + ") not found!", true);
|
||||
return false;
|
||||
CLog.LogError("Video \"" + kvp.Key + "\": (" + sk.FileName + ") not found!");
|
||||
continue;
|
||||
}
|
||||
_Videos.Add(kvp.Key, sk);
|
||||
}
|
||||
|
||||
@@ -318,11 +318,15 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawVideo()
|
||||
{
|
||||
CBase.Video.GetFrame(_VideoStream, _VideoStream.VideoTime);
|
||||
if (_VideoStream.Texture != null)
|
||||
if (_VideoStream != null)
|
||||
{
|
||||
CBase.Drawing.DrawTexture(_VideoStream.Texture, Rect, EAspect.Crop);
|
||||
return true;
|
||||
CBase.Video.GetFrame(_VideoStream, _VideoStream.VideoTime);
|
||||
if (_VideoStream.Texture != null)
|
||||
{
|
||||
CBase.Drawing.DrawTexture(_VideoStream.Texture, Rect, EAspect.Crop);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user