-
Notifications
You must be signed in to change notification settings - Fork 5
2.4 Get default UI controls data
Koala Library features two types of functions to get a UI Control data:
-
The developer can retrieve the data as declared in on init callback.
-
The developer can retrieve the current data of the selected UI Control.
This section will cover the first of the two methods.
NOTE: the functions to retrieve both Current and Default data ARE inline functions, therefore can be used in if statements, while loops etc.
These functions return the default position of the specified UI Control on each axis, as declared in on init
callback.
These ARE inline functions, therefore they can be used directly as arguments in KSP constructs such as if, while
etc.
Usage:
if (get_def_pos_x(<ui_id>) = ...)
{...}
end if
These functions return the default size values of the specified UI Control, as declared in on init
callback.
These ARE inline functions, therefore they can be used directly as arguments in KSP constructs such as if, while
etc.
Usage:
if (get_def_width(<ui_id>) = ...)
{...}
end if
This function returns the default value of the specified UI Control, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs such as if, while
etc.
Usage:
if (get_def_value(<ui_id>) = ...)
{...}
end if
This function returns the UI Control's picture name. This function returns a string, so be sure to load its value inside a string value or array.
This IS an inline function, therefore it can be used directly as argument in KSP constructs such as if, while
etc.
Usage:
@picture := get_def_picture(<ui_id>)
This function returns the UI Control's default visibility status, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions.
Usage:
if (get_def_visibility(<ui_id>) = ...)
{...}
end if
This function returns the UI Control's default text string, if any, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions enabled to receive a string as input argument.
Usage:
@text := get_def_text(<ui_id>)
This function returns the UI Control's minimum value, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions.
Usage:
if (get_ctrl_min(<ui_id>) = ...)
{...}
end if
This function returns the UI Control's maximum value, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions.
Usage:
if (get_ctrl_max(<ui_id>) = ...)
{...}
end if
This function returns the UI Control's maximum value, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions.
Usage:
if (get_ctrl_max(<ui_id>) = ...)
{...}
end if
This function returns the UI Control's Family, as declared in on init
callback.
This IS an inline function, therefore it can be used directly as argument in KSP constructs and functions.
Usage:
if (get_ctrl_family(<ui_id>) = ...)
{...}
end if