From 78c0c01f78b649bdc8e74c7c14d07590070a8765 Mon Sep 17 00:00:00 2001 From: jaybinks Date: Wed, 13 Feb 2008 12:04:57 +0000 Subject: small modification to the FadeTo function... it can now take a TAudioPlaybackStream as an optional 2nd paramater. so you can do a screen fade & play the swoosh sound, in 1 function call. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@848 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UMenu.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Game/Code/Menu/UMenu.pas') diff --git a/Game/Code/Menu/UMenu.pas b/Game/Code/Menu/UMenu.pas index e6bb6b45..339402a2 100644 --- a/Game/Code/Menu/UMenu.pas +++ b/Game/Code/Menu/UMenu.pas @@ -9,7 +9,7 @@ interface {$I switches.inc} uses OpenGL12, SysUtils, UTexture, UMenuStatic, UMenuText, UMenuButton, UMenuSelect, UMenuSelectSlide, - UMenuInteract, UThemes, UMenuButtonCollection, Math; + UMenuInteract, UThemes, UMenuButtonCollection, Math, UMusic; type { Int16 = SmallInt;} @@ -112,7 +112,8 @@ type // function AddWidget(X, Y : UInt16; WidgetSrc : PSDL_Surface): Int16; // procedure ClearWidgets(MinNumber : Int16); - procedure FadeTo(Screen: PMenu); + procedure FadeTo(Screen: PMenu); overload; + procedure FadeTo(Screen: PMenu; aSound: TAudioPlaybackStream); overload; //popup hack procedure CheckFadeTo(Screen: PMenu; msg: String); @@ -967,6 +968,13 @@ begin Display.NextScreen := Screen; end; +procedure TMenu.FadeTo(Screen: PMenu; aSound: TAudioPlaybackStream); +begin + FadeTo( Screen ); + AudioPlayback.PlaySound( aSound ); +end; + + //popup hack procedure TMenu.CheckFadeTo(Screen: PMenu; msg: String); begin -- cgit v1.2.3