====== Gui Functions ====== The following functions are exposed to addons in order to allow them to interact with the built-in Ashita UI system that uses AnTweakBar. Because of the nature of how some of these things work, there are some 'hack-arounds' in order to fully make use of the UI features. ---- //number// **Gui_GetBarCount**(); * **Parameters** * //Function has no parameters.// * **Returns** * The number of bars currently created. //boolean// **Gui_CreateBar**(name, x, y, w, h); * **Parameters** * name - The name of the bar to create. * x - The x position of the bar. * y - The y position of the bar. * w - The width of the bar. * h - The height of the bar. * **Returns** * True on success, false otherwise. //boolean// **Gui_DeleteBar**(name); * **Parameters** * name - The name of the bar to delete. * **Returns** * True on success, false otherwise. //boolean// **Gui_DeleteAllBars**(); * **Parameters** * //Function has no parameters.// * **Returns** * True on success, false otherwise. //string// **Gui_GetBarByIndex**(index); * **Parameters** * index - The index of the bar to obtain. * **Returns** * The name of the bar object at the given index. //boolean// **Gui_Define**(def); * **Parameters** * def - The definition string to define. * **Returns** * True on success, false otherwise. //number// **Gui_DefineEnumFromString**(name, str); * **Parameters** * name - The name of the enum to define. * str - The enum string. * **Returns** * An index to use as the type for this enum. //boolean// **Gui_RefreshBar**(name); * **Parameters** * name - The name of the bar to refresh. * **Returns** * True on success, false otherwise. //string// **Gui_GetBottomBar**(); * **Parameters** * //Function has no parameters.// * **Returns** * The name of the bottom most bar. //boolean// **Gui_SetBottomBar**(name); * **Parameters** * name - The name of the bar to set as the bottom-most. * **Returns** * True on success, false otherwise. //string// **Gui_GetTopBar**(); * **Parameters** * //Function has no parameters.// * **Returns** * The name of the top most bar. //boolean// **Gui_SetTopBar**(name); * **Parameters** * name - The name of the bar to set as the top-most. * **Returns** * True on success, false otherwise. //object// **Gui_CreateVar**(type, size); * **Parameters** * type - The type of variable to create. * size - (Optional) The size of the data. * **Returns** * A variable object used for the other var functions. //void// **Gui_DeleteVar**(var); * **Parameters** * var - The variable object to delete. * **Returns** * //Function does not return a value.// //object// **Gui_GetVarValue**(var); * **Parameters** * var - The variable to get the value of. * **Returns** * The value(s) being returned from the variable. //void// **Gui_SetVarValue**(var, value); * **Parameters** * var - The variable to set the value of. * value - The value to set the var to. * **Returns** * //Function does not return a value.// //boolean// **Gui_NewButton**(barName, name, def); * **Parameters** * barName - The name of the bar to create the button within. * name - The name of the button. * def - The definition params of the button. * **Returns** * True on success, false otherwise. //boolean// **Gui_NewSeparator**(barName, name, def); * **Parameters** * barName - The name of the bar to create the separator within. * name - The name of the separator. * def - The definition params of the separator. * **Returns** * True on success, false otherwise. //boolean// **Gui_NewReadOnly**(barName, name, type, var, def); * **Parameters** * barName - The name of the bar to create the read-only property in. * name - The name of the read-only property. * type - The type of property. * var - The variable that this property is attached to. * def - The definition params of the property. * **Returns** * True on success, false otherwise. //boolean// **Gui_NewReadWrite**(barName, name, type, var, def); * **Parameters** * barName - The name of the bar to create the read-write property in. * name - The name of the read-write property. * type - The type of property. * var - The variable that this property is attached to. * def - The definition params of the property. * **Returns** * True on success, false otherwise. //object// **Gui_GetParam**(barName, vname, pname, type, count); * **Parameters** * barName - The name of the bar containing the parameter. * vname - The name of the variable for this parameter. * pname - The parameter name. * type - The type of variable. * count - The count of expected value returns. * **Returns** * The value(s) of the given param. //boolean// **Gui_SetParam**(barName, vname, pname, type, count, values); * **Parameters** * barName - The name of the bar containing the parameter. * vname - The name of the variable for this parameter. * pname - The parameter name. * type - The type of variable. * count - The number of values to be set. * values - The table containing the values to set the param to. * **Returns** * True on success, false otherwise. ---- The following function IS NOT something users should call. Instead, this is a function that addons should define if they are making use of buttons. This function is called from the Addons plugin whenever a button is clicked. //void// **Gui_ButtonClicked**(//string// name); * **Parameters** * name - The name of the button that was clicked. * **Returns** * //Function has no return value.//