Some clean-up.
This commit is contained in:
1 parent
6567aa413d
commit
8f91d60270
2 files changed
+8
-14
No files matched your search
@@ -92,7 +92,7 @@ namespace Vocaluxe.Menu
|
|||||||
{
|
{
|
||||||
SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
SRectF rect = new SRectF(Rect.X + j * (_TileW + _SpaceW), Rect.Y + i * (_TileH + _SpaceH), _TileW, _TileH, Rect.Z);
|
||||||
CStatic tileStatic = new CStatic(_TextureEmptyTile, ColorEmptyTile, rect);
|
CStatic tileStatic = new CStatic(_TextureEmptyTile, ColorEmptyTile, rect);
|
||||||
CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "Name");
|
CText tileText = new CText(rect.X + rect.W / 2, rect.Y + rect.H + _Theme.NameSpace, rect.Z, _Theme.NameHeight, rect.W, EAlignment.Center, _Theme.NameStyle, _Theme.NameFont, _Theme.NameColor, "");
|
||||||
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
_Tiles.Add(new CTile(tileStatic, tileText, -1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,12 +92,15 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
public override bool HandleInput(KeyEvent KeyEvent)
|
public override bool HandleInput(KeyEvent KeyEvent)
|
||||||
{
|
{
|
||||||
|
//Check if selecting with keyboard is active
|
||||||
if (selectingKeyboardActive)
|
if (selectingKeyboardActive)
|
||||||
{
|
{
|
||||||
|
//Handle left/right/up/down
|
||||||
NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent);
|
NameSelections[htNameSelections(NameSelection)].HandleInput(KeyEvent);
|
||||||
switch (KeyEvent.Key)
|
switch (KeyEvent.Key)
|
||||||
{
|
{
|
||||||
case Keys.Enter:
|
case Keys.Enter:
|
||||||
|
//Check, if a player is selected
|
||||||
if (NameSelections[htNameSelections(NameSelection)].Selection > -1)
|
if (NameSelections[htNameSelections(NameSelection)].Selection > -1)
|
||||||
{
|
{
|
||||||
SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].Selection;
|
SelectedPlayerNr = NameSelections[htNameSelections(NameSelection)].Selection;
|
||||||
@@ -109,18 +112,21 @@ namespace Vocaluxe.Screens
|
|||||||
Statics[htStatics(StaticPlayer[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture;
|
Statics[htStatics(StaticPlayer[selectingKeyboardPlayerNr-1])].Texture = NameSelections[htNameSelections(NameSelection)].TilePlayerAvatar(SelectedPlayerNr).Texture;
|
||||||
Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
|
Texts[htTexts(TextPlayer[selectingKeyboardPlayerNr-1])].Text = CProfiles.Profiles[SelectedPlayerNr].PlayerName;
|
||||||
}
|
}
|
||||||
|
//Reset all values
|
||||||
selectingKeyboardPlayerNr = 0;
|
selectingKeyboardPlayerNr = 0;
|
||||||
selectingKeyboardActive = false;
|
selectingKeyboardActive = false;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Keys.Escape:
|
case Keys.Escape:
|
||||||
|
//Reset all values
|
||||||
selectingKeyboardPlayerNr = 0;
|
selectingKeyboardPlayerNr = 0;
|
||||||
selectingKeyboardActive = false;
|
selectingKeyboardActive = false;
|
||||||
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
NameSelections[htNameSelections(NameSelection)].KeyboardSelection(false, -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Normal Keyboard handling
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
base.HandleInput(KeyEvent);
|
base.HandleInput(KeyEvent);
|
||||||
@@ -288,6 +294,7 @@ namespace Vocaluxe.Screens
|
|||||||
CGraphics.FadeTo(EScreens.ScreenSong);
|
CGraphics.FadeTo(EScreens.ScreenSong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Check mouse-wheel for scrolling
|
||||||
if (MouseEvent.Wheel != 0)
|
if (MouseEvent.Wheel != 0)
|
||||||
{
|
{
|
||||||
if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent))
|
if (CHelper.IsInBounds(NameSelections[htNameSelections(NameSelection)].Rect, MouseEvent))
|
||||||
@@ -361,14 +368,6 @@ namespace Vocaluxe.Screens
|
|||||||
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1;
|
SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection = CConfig.NumPlayer - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSelection()
|
|
||||||
{
|
|
||||||
for (int i = 0; i < _PlayerNr.Length; i++)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdatePlayerNumber()
|
private void UpdatePlayerNumber()
|
||||||
{
|
{
|
||||||
CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
|
CConfig.NumPlayer = (int)SelectSlides[htSelectSlides(SelectSlidePlayerNumber)].Selection + 1;
|
||||||
@@ -390,11 +389,6 @@ namespace Vocaluxe.Screens
|
|||||||
CheckMics();
|
CheckMics();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateVisibility()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckMics()
|
private void CheckMics()
|
||||||
{
|
{
|
||||||
List<int> _PlayerWithoutMicro = new List<int>();
|
List<int> _PlayerWithoutMicro = new List<int>();
|
||||||
|
|||||||
Reference in new issue
Block a user