Input
Updated for version 3.38
BeardLib.Utils.Input / BeardLib.Utils.MouseInput
An utility class for dealing with input.
BeardLib.Utils.MouseInput is for dealing with mouse input.
Also useful for bringing a few Input:keyboard()/Input:mouse() functions into a cozy place.
Functions
Get
Function | Return Type | Description |
---|---|---|
Down(Idstring/String key) | Boolean | Returns true if the key that is defined in |
Released(Idstring/String key) | Boolean | Returns true if the key that is defined in |
Pressed(Idstring/String key) | Boolean | Returns true if the key that is defined in |
Trigger(Idstring/String key, function clbk) | Userdata (trigger) | Adds a trigger, basically every time the key gets pressed the callback will run, returns a trigger object |
TriggerRelease(Idstring/String key, function clbk) | Userdata (trigger) | Adds a release trigger, same as trigger just for releasing the key and returns a trigger object also |
Triggered(Table trigger, Boolean check_mouse_too) | Boolean | Checks trigger table (not be confused with the trigger userdata object) if it's pressed. The trigger is a product from the function |
TriggerDataFromString(String str, Function clbk) | Table | Converts a string to a table of trigger data. The table contains |
Other
Function | Description |
---|---|
RemoveTrigger(Userdata trigger) | Removes a trigger by passing a trigger object |
Last updated