Lua doc (#1552)
This commit is contained in:
27
docs/lua/classes/base_text_element.md
Normal file
27
docs/lua/classes/base_text_element.md
Normal file
@ -0,0 +1,27 @@
|
||||
# Class: base_text_element
|
||||
|
||||
Class representing a gui text element.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `set_text(new_text)`
|
||||
|
||||
- **Parameters:**
|
||||
- `new_text` (string): The new text for that gui text element.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
base_text_element:set_text(new_text)
|
||||
```
|
||||
|
||||
### `get_text()`
|
||||
|
||||
- **Returns:**
|
||||
- `string`: Returns the current text for that gui text element.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
string = base_text_element:get_text()
|
||||
```
|
||||
|
||||
|
6
docs/lua/classes/button.md
Normal file
6
docs/lua/classes/button.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Class: button
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class representing a gui button.
|
||||
|
29
docs/lua/classes/checkbox.md
Normal file
29
docs/lua/classes/checkbox.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Class: checkbox
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class representing a gui checkbox.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `is_enabled()`
|
||||
|
||||
- **Returns:**
|
||||
- `boolean`: Is the checkbox checked?
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
boolean = checkbox:is_enabled()
|
||||
```
|
||||
|
||||
### `set_enabled(enabled)`
|
||||
|
||||
- **Parameters:**
|
||||
- `enabled` (boolean): The desired enabled state of the checkbox.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
checkbox:set_enabled(enabled)
|
||||
```
|
||||
|
||||
|
29
docs/lua/classes/input_float.md
Normal file
29
docs/lua/classes/input_float.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Class: input_float
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class for representing an input field for editing a float value within the GUI.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `get_value()`
|
||||
|
||||
- **Returns:**
|
||||
- `float`: Get the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
float = input_float:get_value()
|
||||
```
|
||||
|
||||
### `set_value(val)`
|
||||
|
||||
- **Parameters:**
|
||||
- `val` (float): Set the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_float:set_value(val)
|
||||
```
|
||||
|
||||
|
29
docs/lua/classes/input_int.md
Normal file
29
docs/lua/classes/input_int.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Class: input_int
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class for representing an input field for editing an integer value within the GUI.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `get_value()`
|
||||
|
||||
- **Returns:**
|
||||
- `integer`: Get the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
integer = input_int:get_value()
|
||||
```
|
||||
|
||||
### `set_value(val)`
|
||||
|
||||
- **Parameters:**
|
||||
- `val` (integer): Set the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_int:set_value(val)
|
||||
```
|
||||
|
||||
|
29
docs/lua/classes/input_string.md
Normal file
29
docs/lua/classes/input_string.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Class: input_string
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class for representing an input field for editing a string value within the GUI.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `get_value()`
|
||||
|
||||
- **Returns:**
|
||||
- `string`: Get the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
string = input_string:get_value()
|
||||
```
|
||||
|
||||
### `set_value(val)`
|
||||
|
||||
- **Parameters:**
|
||||
- `val` (string): Set the value currently written inside the input field.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_string:set_value(val)
|
||||
```
|
||||
|
||||
|
25
docs/lua/classes/lua_patch.md
Normal file
25
docs/lua/classes/lua_patch.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Class: lua_patch
|
||||
|
||||
Class representing a in-memory patch.
|
||||
|
||||
## Functions (2)
|
||||
|
||||
### `apply()`
|
||||
|
||||
Apply the modified value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch:apply()
|
||||
```
|
||||
|
||||
### `restore()`
|
||||
|
||||
Restore the original value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch:restore()
|
||||
```
|
||||
|
||||
|
322
docs/lua/classes/pointer.md
Normal file
322
docs/lua/classes/pointer.md
Normal file
@ -0,0 +1,322 @@
|
||||
# Class: pointer
|
||||
|
||||
Class representing a 64-bit memory address.
|
||||
|
||||
## Constructors (1)
|
||||
|
||||
### `new(address)`
|
||||
|
||||
Returns a memory instance, with the given address.
|
||||
|
||||
- **Parameters:**
|
||||
- `address` (integer): Address
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
myInstance = pointer:new(address)
|
||||
```
|
||||
|
||||
## Functions (23)
|
||||
|
||||
### `add(offset)`
|
||||
|
||||
Adds an offset to the current memory address and returns a new pointer object.
|
||||
|
||||
- **Parameters:**
|
||||
- `offset` (integer): offset
|
||||
|
||||
- **Returns:**
|
||||
- `pointer`: new pointer object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer = pointer:add(offset)
|
||||
```
|
||||
|
||||
### `sub(offset)`
|
||||
|
||||
Subs an offset to the current memory address and returns a new pointer object.
|
||||
|
||||
- **Parameters:**
|
||||
- `offset` (integer): offset
|
||||
|
||||
- **Returns:**
|
||||
- `pointer`: new pointer object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer = pointer:sub(offset)
|
||||
```
|
||||
|
||||
### `rip(offset)`
|
||||
|
||||
Rips the current memory address and returns a new pointer object.
|
||||
|
||||
- **Parameters:**
|
||||
- `offset` (integer): offset
|
||||
|
||||
- **Returns:**
|
||||
- `pointer`: new pointer object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer = pointer:rip(offset)
|
||||
```
|
||||
|
||||
### `get_byte()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `number`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
number = pointer:get_byte()
|
||||
```
|
||||
|
||||
### `get_word()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `number`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
number = pointer:get_word()
|
||||
```
|
||||
|
||||
### `get_dword()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `number`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
number = pointer:get_dword()
|
||||
```
|
||||
|
||||
### `get_float()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `float`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
float = pointer:get_float()
|
||||
```
|
||||
|
||||
### `get_qword()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `number`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
number = pointer:get_qword()
|
||||
```
|
||||
|
||||
### `set_byte(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_byte(value)
|
||||
```
|
||||
|
||||
### `set_word(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_word(value)
|
||||
```
|
||||
|
||||
### `set_dword(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_dword(value)
|
||||
```
|
||||
|
||||
### `set_float(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (float): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_float(value)
|
||||
```
|
||||
|
||||
### `set_qword(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_qword(value)
|
||||
```
|
||||
|
||||
### `get_string()`
|
||||
|
||||
Retrieves the value stored at the memory address as the specified type.
|
||||
|
||||
- **Returns:**
|
||||
- `string`: the value stored at the memory address as the specified type.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
string = pointer:get_string()
|
||||
```
|
||||
|
||||
### `set_string(value)`
|
||||
|
||||
Sets the value at the memory address to the specified value of the given type.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (string): new value.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer:set_string(value)
|
||||
```
|
||||
|
||||
### `patch_byte(value)`
|
||||
|
||||
Creates a memory patch for modifying the value at the memory address with the specified value.
|
||||
The modified value is applied when you call the apply function on the lua_patch object.
|
||||
The original value is restored when you call the restore function on the lua_patch object.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
- **Returns:**
|
||||
- `lua_patch`: memory patch instance for modifying the value at the memory address with the specified value. Can call apply / restore on the object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch = pointer:patch_byte(value)
|
||||
```
|
||||
|
||||
### `patch_word(value)`
|
||||
|
||||
Creates a memory patch for modifying the value at the memory address with the specified value.
|
||||
The modified value is applied when you call the apply function on the lua_patch object.
|
||||
The original value is restored when you call the restore function on the lua_patch object.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
- **Returns:**
|
||||
- `lua_patch`: memory patch instance for modifying the value at the memory address with the specified value. Can call apply / restore on the object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch = pointer:patch_word(value)
|
||||
```
|
||||
|
||||
### `patch_dword(value)`
|
||||
|
||||
Creates a memory patch for modifying the value at the memory address with the specified value.
|
||||
The modified value is applied when you call the apply function on the lua_patch object.
|
||||
The original value is restored when you call the restore function on the lua_patch object.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
- **Returns:**
|
||||
- `lua_patch`: memory patch instance for modifying the value at the memory address with the specified value. Can call apply / restore on the object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch = pointer:patch_dword(value)
|
||||
```
|
||||
|
||||
### `patch_qword(value)`
|
||||
|
||||
Creates a memory patch for modifying the value at the memory address with the specified value.
|
||||
The modified value is applied when you call the apply function on the lua_patch object.
|
||||
The original value is restored when you call the restore function on the lua_patch object.
|
||||
|
||||
- **Parameters:**
|
||||
- `value` (number): new value.
|
||||
|
||||
- **Returns:**
|
||||
- `lua_patch`: memory patch instance for modifying the value at the memory address with the specified value. Can call apply / restore on the object.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
lua_patch = pointer:patch_qword(value)
|
||||
```
|
||||
|
||||
### `is_null()`
|
||||
|
||||
- **Returns:**
|
||||
- `boolean`: Returns true if the address is null.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
boolean = pointer:is_null()
|
||||
```
|
||||
|
||||
### `is_valid()`
|
||||
|
||||
- **Returns:**
|
||||
- `boolean`: Returns true if the address is not null.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
boolean = pointer:is_valid()
|
||||
```
|
||||
|
||||
### `deref()`
|
||||
|
||||
Dereferences the memory address and returns a new pointer object pointing to the value at that address.
|
||||
|
||||
- **Returns:**
|
||||
- `pointer`: A new pointer object pointing to the value at that address.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
pointer = pointer:deref()
|
||||
```
|
||||
|
||||
### `get_address()`
|
||||
|
||||
Retrieves the memory address stored in the pointer object.
|
||||
|
||||
- **Returns:**
|
||||
- `number`: The memory address stored in the pointer object as a number.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
number = pointer:get_address()
|
||||
```
|
||||
|
||||
|
4
docs/lua/classes/sameline.md
Normal file
4
docs/lua/classes/sameline.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Class: sameline
|
||||
|
||||
Class for ImGui::SameLine() - Puts a sameline between widgets or groups to layout them horizontally.
|
||||
|
4
docs/lua/classes/separator.md
Normal file
4
docs/lua/classes/separator.md
Normal file
@ -0,0 +1,4 @@
|
||||
# Class: separator
|
||||
|
||||
Class for ImGui::Separator() - separator, generally horizontal. Inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
|
||||
|
119
docs/lua/classes/tab.md
Normal file
119
docs/lua/classes/tab.md
Normal file
@ -0,0 +1,119 @@
|
||||
# Class: tab
|
||||
|
||||
Class for representing a tab within the GUI.
|
||||
|
||||
## Functions (8)
|
||||
|
||||
### `add_button(name, callback)`
|
||||
|
||||
Add a button to the gui tab.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text written inside the button.
|
||||
- `callback` (function): function that will be called when the button is clicked.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
tab:add_button(name, callback)
|
||||
```
|
||||
|
||||
### `add_text(name)`
|
||||
|
||||
Add text to the gui tab.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text that will be written.
|
||||
|
||||
- **Returns:**
|
||||
- `text`: The text object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
text = tab:add_text(name)
|
||||
```
|
||||
|
||||
### `add_checkbox(name)`
|
||||
|
||||
Add a checkbox widget to the gui tab.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text that will be written next to the checkbox.
|
||||
|
||||
- **Returns:**
|
||||
- `checkbox`: The checkbox object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
checkbox = tab:add_checkbox(name)
|
||||
```
|
||||
|
||||
### `add_sameline()`
|
||||
|
||||
Add a ImGui::SameLine.
|
||||
|
||||
- **Returns:**
|
||||
- `sameline`: The sameline object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
sameline = tab:add_sameline()
|
||||
```
|
||||
|
||||
### `add_separator()`
|
||||
|
||||
Add a ImGui::Separator.
|
||||
|
||||
- **Returns:**
|
||||
- `separator`: The separator object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
separator = tab:add_separator()
|
||||
```
|
||||
|
||||
### `add_input_int(name)`
|
||||
|
||||
Add a ImGui::InputInt.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text that will be written next to the input field.
|
||||
|
||||
- **Returns:**
|
||||
- `input_int`: The input_int object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_int = tab:add_input_int(name)
|
||||
```
|
||||
|
||||
### `add_input_float(name)`
|
||||
|
||||
Add a ImGui::InputFloat.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text that will be written next to the input field.
|
||||
|
||||
- **Returns:**
|
||||
- `input_float`: The input_float object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_float = tab:add_input_float(name)
|
||||
```
|
||||
|
||||
### `add_input_string(name)`
|
||||
|
||||
Add a ImGui::InputText.
|
||||
|
||||
- **Parameters:**
|
||||
- `name` (string): Text that will be written next to the input field.
|
||||
|
||||
- **Returns:**
|
||||
- `input_string`: The input_string object instance.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
input_string = tab:add_input_string(name)
|
||||
```
|
||||
|
||||
|
19
docs/lua/classes/text.md
Normal file
19
docs/lua/classes/text.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Class: text
|
||||
|
||||
## Inherit from 1 class: base_text_element
|
||||
|
||||
Class representing an imgui text element.
|
||||
|
||||
## Functions (1)
|
||||
|
||||
### `set_font(font)`
|
||||
|
||||
- **Parameters:**
|
||||
- `font` (string): The new font name for that imgui text element.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
text:set_font(font)
|
||||
```
|
||||
|
||||
|
40
docs/lua/classes/vec3.md
Normal file
40
docs/lua/classes/vec3.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Class: vec3
|
||||
|
||||
Class representing a 3D vector.
|
||||
|
||||
## Fields (3)
|
||||
|
||||
### `x`
|
||||
|
||||
x component of the vector.
|
||||
|
||||
- Type: `float`
|
||||
|
||||
### `y`
|
||||
|
||||
y component of the vector.
|
||||
|
||||
- Type: `float`
|
||||
|
||||
### `z`
|
||||
|
||||
z component of the vector.
|
||||
|
||||
- Type: `float`
|
||||
|
||||
## Constructors (1)
|
||||
|
||||
### `new(x, y, z)`
|
||||
|
||||
Returns a vector that contains the x, y, and z values.
|
||||
|
||||
- **Parameters:**
|
||||
- `x` (float): x component of the vector.
|
||||
- `y` (float): y component of the vector.
|
||||
- `z` (float): z component of the vector.
|
||||
|
||||
**Exemple Usage:**
|
||||
```lua
|
||||
myInstance = vec3:new(x, y, z)
|
||||
```
|
||||
|
Reference in New Issue
Block a user