aboutsummaryrefslogtreecommitdiffstats
path: root/Lua/src
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-09 16:26:54 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-12-09 16:26:54 +0000
commit2f26128c08c4833e2cd8419920869af97d7e8a09 (patch)
treead10ad653d095b7848c06d5c64258b2361859f3a /Lua/src
parent8d31fd845c65367301f36faac77d86cb929ef69c (diff)
downloadusdx-2f26128c08c4833e2cd8419920869af97d7e8a09.tar.gz
usdx-2f26128c08c4833e2cd8419920869af97d7e8a09.tar.xz
usdx-2f26128c08c4833e2cd8419920869af97d7e8a09.zip
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
Diffstat (limited to 'Lua/src')
-rw-r--r--Lua/src/screens/UScreenSing.pas8
1 files changed, 7 insertions, 1 deletions
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;