menu
Functions to add elements¶
Info
You can add elements in every location you want
For example: Ragebot/Globals
or Visuals/Other
add_check_box¶
menu.add_check_box(label: string, location: string, default_value?: boolean, context_location?: string):
check_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the check box |
location | string |
Location of the check box |
default_value | boolean |
Optional. Default value of the check box |
context_location | string |
Optional. Location of the context menu |
Example
What is "context"?
With context you can add a context menu to your element, which will be shown if you right click on it.
add_slider_int¶
menu.add_slider_int(label: string, location: string, min: number, max: number, default_value?: number):
slider_int_t
Name | Type | Description |
---|---|---|
label | string |
Label of the slider |
location | string |
Location of the slider |
min | number |
Minimum value of the slider |
max | number |
Maximum value of the slider |
default_value | number |
Optional. Default value of the slider |
Example
add_slider_float¶
menu.add_slider_float(label: string, location: string, min: number, max: number, default_value?: number):
slider_float_t
Name | Type | Description |
---|---|---|
label | string |
Label of the slider |
location | string |
Location of the slider |
min | number |
Minimum value of the slider |
max | number |
Maximum value of the slider |
default_value | number |
Optional. Default value of the slider |
Example
add_combo_box¶
menu.add_combo_box(label: string, location: string, items: string[], default_value?: number):
combo_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the combo box |
location | string |
Location of the combo box |
items | string[] |
Array of items for the combo box |
default_value | number |
Optional. Default value of the combo box |
Example
add_multi_combo_box¶
menu.add_multi_combo_box(label: string, location: string, items: string[], default_value?: number[]):
multi_combo_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the multi combo box |
location | string |
Location of the multi combo box |
items | string[] |
Array of items for the multi combo box |
default_value | number[] |
Optional. List of active by default indeces |
Example
add_key_bind¶
menu.add_key_bind(label: string, location: string, show_label?: boolean, key?: number, type?: number, display_in_list?: boolean):
key_bind_t
Name | Type | Description |
---|---|---|
label | string |
Label of the key bind |
location | string |
Location of the key bind |
show_label | boolean |
Optional. Whether to show the label |
key | number |
Optional. The key for the key bind |
type | number |
Optional. The type for the key bind |
display_in_list | boolean |
Optional. Whether to display the key bind in the key bind list |
Example
This code will create a key bind attached to check box
add_color_picker¶
menu.add_color_picker(label: string, location: string, show_label?: boolean, show_alpha?: boolean, default_value?: color_t):
color_picker_t
Name | Type | Description |
---|---|---|
label | string |
Label of the color picker |
location | string |
Location of the color picker |
show_label | boolean |
Optional. Whether to show the label |
show_alpha | boolean |
Optional. Whether to show the alpha channel |
default_value | color_t |
Optional. Default color for the color picker |
Example
This code will create a color picker attached to check box
add_button¶
menu.add_button(label: string, location: string, callback: function):
button_t
Name | Type | Description |
---|---|---|
label | string |
Label of the button |
location | string |
Location of the button |
callback | function |
Callback which will be executed when the button is pressed |
Example
Functions to find elements¶
find_check_box¶
menu.find_check_box(label: string, location: string):
check_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the check box |
location | string |
Location of the check box |
Example
find_slider_int¶
menu.find_slider_int(label: string, location: string):
slider_int_t
Name | Type | Description |
---|---|---|
label | string |
Label of the slider |
location | string |
Location of the slider |
Example
find_slider_float¶
menu.find_slider_float(label: string, location: string):
slider_float_t
Name | Type | Description |
---|---|---|
label | string |
Label of the slider |
location | string |
Location of the slider |
Example
find_combo_box¶
menu.find_combo_box(label: string, location: string):
combo_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the combo box |
location | string |
Location of the combo box |
find_multi_combo_box¶
menu.find_multi_combo_box(label: string, location: string):
multi_combo_box_t
Name | Type | Description |
---|---|---|
label | string |
Label of the multi combo box |
location | string |
Location of the multi combo box |
find_key_bind¶
menu.find_key_bind(label: string, location: string):
key_bind_t
Name | Type | Description |
---|---|---|
label | string |
Label of the key bind |
location | string |
Location of the key bind |
find_color_picker¶
menu.find_color_picker(label: string, location: string):
color_picker_t
Name | Type | Description |
---|---|---|
label | string |
Label of the color picker |
location | string |
Location of the color picker |
Other functions¶
get_menu_rect¶
menu.get_menu_rect():
vec4_t
Example
is_visible¶
menu.is_visible():
boolean
dump¶
menu.dump()
Prints all elements to console