From cd74ff602e4e66f7b1ce534065328c28f032a390 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Sat, 15 Dec 2012 23:59:50 +0100 Subject: [PATCH] Work on challenge-names. Problem: Screen loads only 6 player-buttons. --- .../Code/PartyScreenChallengeConfig.cs | 10 + .../Code/PartyScreenChallengeNames.cs | 33 +- .../Screens/PartyScreenChallengeNames.xml | 504 +++++++++++++++++- .../PartyScreenChallengeNames.cs | 32 +- 4 files changed, 568 insertions(+), 11 deletions(-) diff --git a/Output/PartyModes/Challenge/Code/PartyScreenChallengeConfig.cs b/Output/PartyModes/Challenge/Code/PartyScreenChallengeConfig.cs index d39126c5..c8940e0b 100644 --- a/Output/PartyModes/Challenge/Code/PartyScreenChallengeConfig.cs +++ b/Output/PartyModes/Challenge/Code/PartyScreenChallengeConfig.cs @@ -67,12 +67,22 @@ namespace Vocaluxe.PartyModes break; case Keys.Enter: + UpdateSlides(); + if (Buttons[htButtons(ButtonBack)].Selected) Back(); if (Buttons[htButtons(ButtonNext)].Selected) Next(); break; + + case Keys.Left: + UpdateSlides(); + break; + + case Keys.Right: + UpdateSlides(); + break; } } return true; diff --git a/Output/PartyModes/Challenge/Code/PartyScreenChallengeNames.cs b/Output/PartyModes/Challenge/Code/PartyScreenChallengeNames.cs index af961585..0e4d4420 100644 --- a/Output/PartyModes/Challenge/Code/PartyScreenChallengeNames.cs +++ b/Output/PartyModes/Challenge/Code/PartyScreenChallengeNames.cs @@ -14,6 +14,12 @@ namespace Vocaluxe.PartyModes const string ButtonNext = "ButtonNext"; const string ButtonBack = "ButtonBack"; + const string NameSelection = "NameSelection"; + + private List PlayerButtons; + + //TODO: Get this data from party-mode! + private int NumPlayers = 10; private DataFromScreen Data; @@ -25,8 +31,19 @@ namespace Vocaluxe.PartyModes { base.Init(); + PlayerButtons = new List(); + for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) + { + PlayerButtons.Add("ButtonPlayer" + i); + } + _ThemeName = "PartyScreenChallengeNames"; - _ThemeButtons = new string[] { ButtonNext, ButtonBack }; + List buttons = new List(); + buttons.Add(ButtonNext); + buttons.Add(ButtonBack); + buttons.AddRange(PlayerButtons); + _ThemeButtons = buttons.ToArray(); + _ThemeNameSelections = new string[] { NameSelection }; _ScreenVersion = ScreenVersion; Data = new DataFromScreen(); @@ -87,7 +104,7 @@ namespace Vocaluxe.PartyModes if (MouseEvent.RB) { - FadeTo(EScreens.ScreenParty); + Back(); } return true; @@ -96,6 +113,18 @@ namespace Vocaluxe.PartyModes public override void OnShow() { base.OnShow(); + Buttons[htButtons(ButtonBack)].Text.Text = _PartyMode.GetMaxPlayer().ToString(); + /** + for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) + { + Buttons[htButtons("ButtonPlayer" + i)].Text.Text = "Player " + i; + if (i <= NumPlayers) + Buttons[htButtons("ButtonPlayer" + i)].Visible = true; + else + Buttons[htButtons("ButtonPlayer" + i)].Visible = false; + } + **/ + NameSelections[htNameSelections(NameSelection)].Init(); } public override bool UpdateGame() diff --git a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml index 3587a6fc..8f3ea66b 100644 --- a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml +++ b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml @@ -172,12 +172,502 @@ 26 + + + CoverTile + + CoverTile + + 900 + 105 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1015 + 105 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1130 + 105 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 900 + 230 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1015 + 230 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1130 + 230 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 952 + 345 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1077 + 345 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 952 + 460 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + CoverTile + + CoverTile + + 1077 + 460 + 0,00 + 100 + 100 + + + ButtonColor + + + ButtonSColor + + + 50 + 102 + + 20 + + 98 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + - 172 - 127 + 52 + 105 0,00 - 945 + 805 393 CoverTile @@ -195,11 +685,11 @@ 100 100 - 8 - 3 + 7 + 4 - 20,71 - 30,00 + 15,00 + 25,00 diff --git a/PartyModeChallenge/PartyScreenChallengeNames.cs b/PartyModeChallenge/PartyScreenChallengeNames.cs index af961585..e0d093bd 100644 --- a/PartyModeChallenge/PartyScreenChallengeNames.cs +++ b/PartyModeChallenge/PartyScreenChallengeNames.cs @@ -14,6 +14,12 @@ namespace Vocaluxe.PartyModes const string ButtonNext = "ButtonNext"; const string ButtonBack = "ButtonBack"; + const string NameSelection = "NameSelection"; + + private List PlayerButtons; + + //TODO: Get this data from party-mode! + private int NumPlayers = 10; private DataFromScreen Data; @@ -25,8 +31,19 @@ namespace Vocaluxe.PartyModes { base.Init(); + PlayerButtons = new List(); + for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) + { + PlayerButtons.Add("ButtonPlayer" + i); + } + _ThemeName = "PartyScreenChallengeNames"; - _ThemeButtons = new string[] { ButtonNext, ButtonBack }; + List buttons = new List(); + buttons.Add(ButtonNext); + buttons.Add(ButtonBack); + buttons.AddRange(PlayerButtons); + _ThemeButtons = buttons.ToArray(); + _ThemeNameSelections = new string[] { NameSelection }; _ScreenVersion = ScreenVersion; Data = new DataFromScreen(); @@ -87,7 +104,7 @@ namespace Vocaluxe.PartyModes if (MouseEvent.RB) { - FadeTo(EScreens.ScreenParty); + Back(); } return true; @@ -96,6 +113,17 @@ namespace Vocaluxe.PartyModes public override void OnShow() { base.OnShow(); + /** + for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) + { + Buttons[htButtons("ButtonPlayer" + i)].Text.Text = "Player " + i; + if (i <= NumPlayers) + Buttons[htButtons("ButtonPlayer" + i)].Visible = true; + else + Buttons[htButtons("ButtonPlayer" + i)].Visible = false; + } + **/ + NameSelections[htNameSelections(NameSelection)].Init(); } public override bool UpdateGame()