3.09 Element functions
Lokasenna edited this page Jun 24, 2018
·
1 revision
Gets or sets an element's value. It's preferred to access element values this way rather than
GUI.elms.my_element.retval = 5
, as many of classes will need to format their output or
sanitize their input.
elm_name Element name
newval New value. Type is determined by each element class. If not specified, the function
will simply return the current value.
Returned values are of varying types, depending on the element class. See each class's documentation.
Determines if a given position is within the element specified.
elm A GUI element, or a table containing:
{x = _, y = _, w = _, h = _}
x,y A coordinate pair. If not specified, the mouse position will be used.
Returns a boolean.
Gives x,y coordinates that would center elm1 within elm2.
elm1 A GUI element, or a table as above.
elm2 A GUI element, or a table as above.
If not specified, elm1 will be centered in the script window.
Returns x,y.
Introduction
- 1. Getting started
- 2. Parts of a basic script
- 3. How it works
- 4. Fonts and colors
- 5. Element methods
Elements
- 1. Button
- 2. Frame
- 3. Knob
- 4. Label
- 5. Listbox
- 6. Menubar
- 7. Menubox
- 8. Options
- 9. Slider
- 10. Tabs
- 11. Textbox
- 12. TextEditor
- 13. Window
Core functions
- 1. Element creation
- 2. GUI variables
- 3. Script hooks
- 4. Table functions
- 5. Text functions
- 6. Color functions
- 7. Math and Logic functions
- 8. Graphics functions
- 9. Element functions
Additional documentation