From 2f26128c08c4833e2cd8419920869af97d7e8a09 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Wed, 9 Dec 2009 16:26:54 +0000 Subject: adds event ScreenSing.SongLoaded event is triggered after a new song is loaded git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2008 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Lua/src/screens/UScreenSing.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Lua/src/screens/UScreenSing.pas b/Lua/src/screens/UScreenSing.pas index e3614d6c..cbd30a8e 100644 --- a/Lua/src/screens/UScreenSing.pas +++ b/Lua/src/screens/UScreenSing.pas @@ -49,7 +49,8 @@ uses UMenu, gl, UThemes, UGraphicClasses, - USingScores; + USingScores, + UHookableEvent; type TLyricsSyncSource = class(TSyncSource) @@ -60,6 +61,7 @@ type TScreenSing = class(TMenu) private VideoLoaded: boolean; + eSongLoaded: THookableEvent; //< event is called after lyrics of a song are loaded on OnShow protected Paused: boolean; //Pause Mod LyricsSync: TLyricsSyncSource; @@ -316,6 +318,8 @@ begin LyricsSync := TLyricsSyncSource.Create(); + eSongLoaded := THookableEvent.Create('ScreenSing.SongLoaded'); + ClearSettings; end; @@ -626,6 +630,8 @@ begin if Lines[0].Line[P].TotalNotes = 0 then Inc(NumEmptySentences); + eSongLoaded.CallHookChain(False); + Log.LogStatus('End', 'onShow'); end; -- cgit v1.2.3