From f9ba297eeb7c0c611c7a753c8ccd65b2484a0729 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sat, 25 Apr 2009 17:07:38 +0000 Subject: 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 --- Lua/src/menu/UDisplay.pas | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Lua/src/menu') 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; -- cgit v1.2.3