aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-17 09:47:02 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-05-17 09:47:02 +0000
commitc07c700247d4c70f79d2f7fb9c5b368196d1cf53 (patch)
treebbed2e41da29b706f897d385a2cb1e3c224430c2
parent6fa77c016ad823cf4ed0c808a0decebb859b32c2 (diff)
downloadusdx-c07c700247d4c70f79d2f7fb9c5b368196d1cf53.tar.gz
usdx-c07c700247d4c70f79d2f7fb9c5b368196d1cf53.tar.xz
usdx-c07c700247d4c70f79d2f7fb9c5b368196d1cf53.zip
Added functionality to Cancel Button in ScreenOpen
Pressing ESC in ScreenOpen now causes last Screen to be displayed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@205 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Screens/UScreenOpen.pas18
1 files changed, 14 insertions, 4 deletions
diff --git a/Game/Code/Screens/UScreenOpen.pas b/Game/Code/Screens/UScreenOpen.pas
index f5e121f9..af984a21 100644
--- a/Game/Code/Screens/UScreenOpen.pas
+++ b/Game/Code/Screens/UScreenOpen.pas
@@ -35,7 +35,6 @@ begin
begin
if Interaction = 0 then begin
Text[TextN].Text := Text[TextN].Text + chr(ScanCode);
- FileName := Text[TextN].Text;
end;
end;
end;
@@ -50,18 +49,29 @@ begin
if Interaction = 0 then
begin
Text[TextN].DeleteLastL;
- FileName := Text[TextN].Text;
end;
end;
SDLK_ESCAPE:
begin
- result := false;
+ //Empty Filename and go to last Screen
+ FileName := '';
+ Music.PlayBack;
+ FadeTo(BackScreen);
end;
SDLK_RETURN:
begin
- if Interaction = 2 then begin
+ if (Interaction = 2) then begin
+ //Update Filename and go to last Screen
+ FileName := Text[TextN].Text;
+ Music.PlayBack;
+ FadeTo(BackScreen);
+ end
+ else if (Interaction = 1) then
+ begin
+ //Empty Filename and go to last Screen
+ FileName := '';
Music.PlayBack;
FadeTo(BackScreen);
end;