Navigation
Addons
Plugins
Navigation
Addons
Plugins
The new ImGui system that has been added to Ashita is implemented to Addons using the 'imgui' object. This object holds all the function calls and property objects to interact with what is exposed to addons. Below you can find a list of what is implemented to Lua and how to use it. Most calls are straightforward, however, some will be marked if changes are made.
Please note, the following changes apply to ALL functions listed below:
InputText / InputTextMultiline - The callback, if present, should be a string that points to a callback function like this: - The callbacks data is a imgui.ImGuiTextEditCallbackData structure instance.
if (imgui.InputText('test', test_text_input_buffer, 1024, imgui.bor(ImGuiInputTextFlags_EnterReturnsTrue,ImGuiInputTextFlags_CallbackCompletion,ImGuiInputTextFlags_CallbackHistory), 'test_callback')) then print('Enter was pressed!'); end function test_callback(data) print('Callback was fired!'); return 0; end
SetNextWindowSizeConstraints - The callback, if present, should be a string that points to a callback function like this: - The callbacks data is a imgui.ImGuiSizeConstraintCallbackData structure instance.
function SquareResizeConstraint(data) data.DesiredSize = ImVec2(math.max(data.DesiredSize.x, data.DesiredSize.y), math.max(data.DesiredSize.x, data.DesiredSize.y)); end imgui.SetNextWindowSizeConstraints(0, 0, float_max, float_max, 'SquareResizeConstraint');