Start (un)endless name-selection with "P". "P" for next player, "enter" for select profile, "escape" for stop selecting.
This commit is contained in:
1 parent
1cca599a74
commit
f6cbc2687b
1 file changed
+48
-4
@@ -34,6 +34,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private bool selectingMouseActive = false;
|
private bool selectingMouseActive = false;
|
||||||
private bool selectingKeyboardActive = false;
|
private bool selectingKeyboardActive = false;
|
||||||
|
private bool selectingKeyboardUnendless = false;
|
||||||
private int selectingKeyboardPlayerNr = 0;
|
private int selectingKeyboardPlayerNr = 0;
|
||||||
private int SelectedPlayerNr;
|
private int SelectedPlayerNr;
|
||||||
|
|
||||||
@@ -137,6 +138,22 @@ namespace Vocaluxe.Screens
|
|||||||
NameSelections[htNameSelections(NameSelection)].UpdateList();
|
NameSelections[htNameSelections(NameSelection)].UpdateList();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Keys.P:
|
||||||
|
if (!selectingKeyboardActive)
|
||||||
|
{
|
||||||
|
selectingKeyboardPlayerNr = 1;
|
||||||
|
selectingKeyboardUnendless = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (selectingKeyboardPlayerNr + 1 <= CGame.NumPlayer)
|
||||||
|
selectingKeyboardPlayerNr++;
|
||||||
|
else
|
||||||
|
selectingKeyboardPlayerNr = 1;
|
||||||
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
//Check if selecting with keyboard is active
|
//Check if selecting with keyboard is active
|
||||||
if (selectingKeyboardActive)
|
if (selectingKeyboardActive)
|
||||||
@@ -166,10 +183,29 @@ namespace Vocaluxe.Screens
|
|||||||
NameSelections[htNameSelections(NameSelection)].UpdateList();
|
NameSelections[htNameSelections(NameSelection)].UpdateList();
|
||||||
SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
|
SetInteractionToButton(Buttons[htButtons(ButtonStart)]);
|
||||||
}
|
}
|
||||||
//Reset all values
|
//Started selecting with 'P'
|
||||||
selectingKeyboardPlayerNr = 0;
|
if (selectingKeyboardUnendless)
|
||||||
selectingKeyboardActive = false;
|
{
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
if (selectingKeyboardPlayerNr == CGame.NumPlayer)
|
||||||
|
{
|
||||||
|
//Reset all values
|
||||||
|
selectingKeyboardPlayerNr = 0;
|
||||||
|
selectingKeyboardActive = false;
|
||||||
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
selectingKeyboardPlayerNr++;
|
||||||
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, selectingKeyboardPlayerNr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Reset all values
|
||||||
|
selectingKeyboardPlayerNr = 0;
|
||||||
|
selectingKeyboardActive = false;
|
||||||
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.D1:
|
case Keys.D1:
|
||||||
@@ -186,6 +222,7 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 1;
|
selectingKeyboardPlayerNr = 1;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 1);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 1);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
case Keys.D2:
|
case Keys.D2:
|
||||||
case Keys.NumPad2:
|
case Keys.NumPad2:
|
||||||
@@ -201,6 +238,7 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 2;
|
selectingKeyboardPlayerNr = 2;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 2);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 2);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
case Keys.D3:
|
case Keys.D3:
|
||||||
case Keys.NumPad3:
|
case Keys.NumPad3:
|
||||||
@@ -216,6 +254,7 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 3;
|
selectingKeyboardPlayerNr = 3;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 3);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 3);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
case Keys.D4:
|
case Keys.D4:
|
||||||
case Keys.NumPad4:
|
case Keys.NumPad4:
|
||||||
@@ -231,6 +270,7 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 4;
|
selectingKeyboardPlayerNr = 4;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 4);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 4);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
case Keys.D5:
|
case Keys.D5:
|
||||||
case Keys.NumPad5:
|
case Keys.NumPad5:
|
||||||
@@ -246,6 +286,7 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 5;
|
selectingKeyboardPlayerNr = 5;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 5);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 5);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
case Keys.D6:
|
case Keys.D6:
|
||||||
case Keys.NumPad6:
|
case Keys.NumPad6:
|
||||||
@@ -261,11 +302,14 @@ namespace Vocaluxe.Screens
|
|||||||
selectingKeyboardPlayerNr = 6;
|
selectingKeyboardPlayerNr = 6;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 6);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(true, 6);
|
||||||
}
|
}
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.Escape:
|
case Keys.Escape:
|
||||||
//Reset all values
|
//Reset all values
|
||||||
selectingKeyboardPlayerNr = 0;
|
selectingKeyboardPlayerNr = 0;
|
||||||
selectingKeyboardActive = false;
|
selectingKeyboardActive = false;
|
||||||
|
selectingKeyboardUnendless = false;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user