1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Updated LUA Events (markdown)

Robert Beekman 2016-11-03 13:47:55 +01:00
parent fb3ebfa3d5
commit f97956545e

@ -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.