From f97956545ea1c812dd6b46ef9382b136f7fb59fa Mon Sep 17 00:00:00 2001 From: Robert Beekman Date: Thu, 3 Nov 2016 13:47:55 +0100 Subject: [PATCH] Updated LUA Events (markdown) --- LUA-Events.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/LUA-Events.md b/LUA-Events.md index 116d73e..da78fa7 100644 --- a/LUA-Events.md +++ b/LUA-Events.md @@ -19,8 +19,8 @@ profile profile, profileUpdatingEventArgs eventArgs ```lua -- This function will be called after every profile update, before every profile draw. function updateHandler(profile, eventArgs) - -- Put your code here - -- The Event Arguments are inside the eventArgs parameter, in a Windows Profile, you could do this: + -- The Event Arguments are inside the eventArgs parameter + -- In a Windows Profile, you could do this: local currentSong = eventArgs.DataModel.Spotify.SongName; end @@ -45,8 +45,8 @@ profile profile, profileDrawingEventArgs eventArgs ```lua -- This function will be called after every profile draw. function drawHandler(profile, eventArgs) - -- Put your code here - -- The Event Arguments are inside the eventArgs parameter, in a Windows Profile, you could do this: + -- The Event Arguments are inside the eventArgs parameter + -- In a Windows Profile, you could do this: local currentSong = eventArgs.DataModel.Spotify.SongName; end @@ -70,8 +70,7 @@ profile profile, keyboard keyboard, keyPressEventArgs eventArgs ```lua -- This function will be called after every key press. function keyHandler(profile, eventArgs) - -- Put your code here - print("You pressed: " .. eventArgs.Key .. " - X: " .. eventArgs.X .. ", Y: " .. eventArgs.Y); + print("You pressed: " .. eventArgs.Key); end -- Subscribe to the event AFTER defining the function which must be subscribed.