aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/menu
diff options
context:
space:
mode:
Diffstat (limited to 'Lua/src/menu')
-rw-r--r--Lua/src/menu/UDisplay.pas20
1 files changed, 19 insertions, 1 deletions
diff --git a/Lua/src/menu/UDisplay.pas b/Lua/src/menu/UDisplay.pas
index f4cca4a5..86bad12c 100644
--- a/Lua/src/menu/UDisplay.pas
+++ b/Lua/src/menu/UDisplay.pas
@@ -39,7 +39,8 @@ uses
UMenu,
gl,
glu,
- SysUtils;
+ SysUtils,
+ UMusic;
type
TDisplay = class
@@ -77,6 +78,9 @@ type
procedure SaveScreenShot;
+ { fades to specific screen (playing specified sound) }
+ function FadeTo(Screen: PMenu; const aSound: TAudioPlaybackStream = nil): PMenu;
+
function Draw: Boolean;
end;
@@ -307,6 +311,20 @@ begin
end; // for
end;
+{ fades to specific screen (playing specified sound)
+ returns old screen }
+function TDisplay.FadeTo(Screen: PMenu; const aSound: TAudioPlaybackStream = nil): PMenu;
+begin
+ Result := CurrentScreen;
+ if (Result <> nil) then
+ begin
+ if (aSound <> nil) then
+ Result.FadeTo(Screen, aSound)
+ else
+ Result.FadeTo(Screen);
+ end;
+end;
+
procedure TDisplay.SaveScreenShot;
var
Num: integer;