aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src/menu/UDisplay.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-25 17:07:38 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-04-25 17:07:38 +0000
commitf9ba297eeb7c0c611c7a753c8ccd65b2484a0729 (patch)
tree07af74310aeb62967cff858ae7943039570d7c94 /Lua/src/menu/UDisplay.pas
parent07a20d04a3ec9bfa3fb50bc0e6372ba31388389c (diff)
downloadusdx-f9ba297eeb7c0c611c7a753c8ccd65b2484a0729.tar.gz
usdx-f9ba297eeb7c0c611c7a753c8ccd65b2484a0729.tar.xz
usdx-f9ba297eeb7c0c611c7a753c8ccd65b2484a0729.zip
added Display.FadeTo
reimplementation of TPartyGame in UParty nearly finished to-do next: changes on party screens changes on TScreenSing.OnShow -> split code to more specialized functions port first party mode git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1697 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-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;