From 3ecabca816142dcc2b7044aa637285514a4f9b2d Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Thu, 14 Jun 2007 12:52:43 +0000 Subject: No Up/Down needed anymore in Jump to Menu Type can be changed now by pressing Left/Right while Button is Selected git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@261 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenSongJumpto.pas | 60 ++++++++------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Screens/UScreenSongJumpto.pas b/Game/Code/Screens/UScreenSongJumpto.pas index 560868a5..7103257d 100644 --- a/Game/Code/Screens/UScreenSongJumpto.pas +++ b/Game/Code/Screens/UScreenSongJumpto.pas @@ -38,36 +38,6 @@ implementation uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, USongs, UScreenSong, ULog; function TScreenSongJumpto.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; - function IsVisible: Boolean; - begin - Result := True; - if (Interactions[Interaction].Typ = 0) then - begin - Result := Button[Interactions[Interaction].Num].Visible; - end - else if (Interactions[Interaction].Typ = 1) then - begin - //Result := Selects[Interactions[Interaction].Num].Visible; - end - else if (Interactions[Interaction].Typ = 3) then - begin - Result := SelectsS[Interactions[Interaction].Num].Visible; - end; - end; - - Procedure SelectNext; - begin - repeat - InteractNext; - until IsVisible; - end; - - Procedure SelectPrev; - begin - repeat - InteractPrev; - until IsVisible; - end; begin Result := true; If (PressedDown) Then @@ -109,33 +79,31 @@ begin // functions like this one, called so many times SDLK_DOWN: begin - SelectNext; - Button[0].Text[0].Selected := (Interaction = 0); + {SelectNext; + Button[0].Text[0].Selected := (Interaction = 0);} end; SDLK_UP: begin - SelectPrev; - Button[0].Text[0].Selected := (Interaction = 0); + {SelectPrev; + Button[0].Text[0].Selected := (Interaction = 0); } end; SDLK_RIGHT: begin - if (Interaction=1) then - begin - InteractInc; - if (Length(Button[0].Text[0].Text) > 0) then - SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType)); - end; + Interaction := 1; + InteractInc; + if (Length(Button[0].Text[0].Text) > 0) then + SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType)); + Interaction := 0; end; SDLK_LEFT: begin - if (Interaction=1) then - begin - InteractDec; - if (Length(Button[0].Text[0].Text) > 0) then - SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType)); - end; + Interaction := 1; + InteractDec; + if (Length(Button[0].Text[0].Text) > 0) then + SetTextFound(CatSongs.SetFilter(Button[0].Text[0].Text, SelectType)); + Interaction := 0; end; end; end; -- cgit v1.2.3