mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Revert f92d75d55a7c54ca2fc42d606e95065cf0bd5a4d...4d1102f2b35e8169aa9ff4bf4128874d8070c831 on LUA Events
parent
66507c690a
commit
a96e966a51
@ -15,7 +15,7 @@ If you want to change the way a layer is drawn, this is a good place to do so.
|
||||
**Note:** This event triggers for every device each frame. This means it can trigger 6 times, 25 times a second.
|
||||
#### Parameters
|
||||
```lua
|
||||
profileUpdatingEventArgs eventArgs
|
||||
profile profile, profileUpdatingEventArgs eventArgs
|
||||
```
|
||||
#### Event Arguments
|
||||
- **DeviceType:** An string describing the device type (keyboard, mouse, headset, generic or mousemat).
|
||||
@ -25,7 +25,7 @@ profileUpdatingEventArgs eventArgs
|
||||
#### Example
|
||||
```lua
|
||||
-- This function will be called after every profile update, before every profile draw.
|
||||
function updateHandler(eventArgs)
|
||||
function updateHandler(profile, eventArgs)
|
||||
-- In this example we only want to update once per frame when the keyboard is updated
|
||||
if eventArgs.DeviceType != "keyboard" then
|
||||
return
|
||||
@ -47,7 +47,7 @@ For more info on drawing, see the [Drawing](https://github.com/SpoinkyNL/Artemis
|
||||
**Note:** This event triggers for every device each frame. This means it can trigger 6 times, 25 times a second.
|
||||
#### Parameters
|
||||
```lua
|
||||
profileDrawingEventArgs eventArgs
|
||||
profile profile, profileDrawingEventArgs eventArgs
|
||||
```
|
||||
#### Event Arguments
|
||||
- **DeviceType:** An string describing the device type (keyboard, mouse, headset, generic or mousemat).
|
||||
@ -58,7 +58,7 @@ profileDrawingEventArgs eventArgs
|
||||
#### Example
|
||||
```lua
|
||||
-- This function will be called after every profile draw.
|
||||
function drawHandler(eventArgs)
|
||||
function drawHandler(profile, eventArgs)
|
||||
-- In this example we only want to draw to the keyboard
|
||||
if eventArgs.DeviceType != "keyboard" then
|
||||
return
|
||||
@ -78,7 +78,7 @@ Events.DeviceDrawing.add(drawHandler);
|
||||
Triggers whenever the user presses a key.
|
||||
#### Parameters
|
||||
```lua
|
||||
keyPressEventArgs eventArgs
|
||||
profile profile, keyPressEventArgs eventArgs
|
||||
```
|
||||
#### Event Arguments
|
||||
- **Key:** The key that was pressed, for a list of possible keys, see [MSDN](https://msdn.microsoft.com/en-us/library/system.windows.forms.keys(v=vs.110).aspx).
|
||||
@ -88,7 +88,7 @@ keyPressEventArgs eventArgs
|
||||
#### Example
|
||||
```lua
|
||||
-- This function will be called after every key press.
|
||||
function keyHandler(eventArgs)
|
||||
function keyHandler(profile, keyboard, eventArgs)
|
||||
print("You pressed: " .. eventArgs.Key);
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user