Difference between revisions of "Dear ImGui"

From GiderosMobile
(WIP)
Line 299: Line 299:
 
<!--GIDEROSMTD:IO:addMouseWheelEvent(x, y)-->
 
<!--GIDEROSMTD:IO:addMouseWheelEvent(x, y)-->
 
<!--GIDEROSMTD:IO:setAppAcceptingEvents([accepting_events = true])-->
 
<!--GIDEROSMTD:IO:setAppAcceptingEvents([accepting_events = true])-->
 
 
 
 
<!--GIDEROSMTD:ImGui:getHoveredWindow() string OR nil = ImGui:getHoveredWindow()-->
 
<!--GIDEROSMTD:ImGui:getHoveredWindow() string OR nil = ImGui:getHoveredWindow()-->
 
<!--GIDEROSMTD:ImGui:getHoveredWindowRoot() string OR nil = ImGui:getHoveredWindowRoot()-->
 
<!--GIDEROSMTD:ImGui:getHoveredWindowRoot() string OR nil = ImGui:getHoveredWindowRoot()-->
Line 360: Line 357:
 
<!--GIDEROSMTD:callbackData:getDesiredWidth() desired_width = callbackData:getDesiredWidth()-->
 
<!--GIDEROSMTD:callbackData:getDesiredWidth() desired_width = callbackData:getDesiredWidth()-->
 
<!--GIDEROSMTD:callbackData:getDesiredHeight() desired_height = callbackData:getDesiredHeight()-->
 
<!--GIDEROSMTD:callbackData:getDesiredHeight() desired_height = callbackData:getDesiredHeight()-->
 +
<!--GIDEROSMTD:ImGui:getContentRegionMax() scaleX, scaleY = ImGui:getContentRegionMax()-->
 +
<!--GIDEROSMTD:ImGui:getContentRegionAvail() w, h = ImGui:getContentRegionAvail()-->
 +
<!--GIDEROSMTD:ImGui:getWindowContentRegionMin() x, y = ImGui:getWindowContentRegionMin()-->
 +
<!--GIDEROSMTD:ImGui:getWindowContentRegionMax() x, y = ImGui:getWindowContentRegionMax()-->
 +
<!--GIDEROSMTD:ImGui:getScrollX() x = ImGui:getScrollX()-->
 +
<!--GIDEROSMTD:ImGui:getScrollY() y = ImGui:getScrollY()-->
 +
<!--GIDEROSMTD:ImGui:getScrollMaxX() maxX = ImGui:getScrollMaxX()-->
 +
<!--GIDEROSMTD:ImGui:getScrollMaxY() maxY = ImGui:getScrollMaxY()-->
 +
<!--GIDEROSMTD:ImGui:setScrollX(value)-->
 +
<!--GIDEROSMTD:ImGui:setScrollY(value)-->
 +
<!--GIDEROSMTD:ImGui:setScrollHereX([ratio = 0.5])-->
 +
<!--GIDEROSMTD:ImGui:setScrollHereY([ratio = 0.5])-->
 +
<!--GIDEROSMTD:ImGui:setScrollFromPosX(x [, ratio = 0.5])-->
 +
<!--GIDEROSMTD:ImGui:setScrollFromPosY(y [, ratio = 0.5])-->
 +
<!--GIDEROSMTD:ImGui:pushStyleColor(ImGui.Col, color, alpha)-->
 +
<!--GIDEROSMTD:ImGui:popStyleColor([count = 1])-->
 +
<!--GIDEROSMTD:ImGui:pushStyleVar(ImGui.StyleVar, value) OR ImGui:pushStyleVar(ImGui.StyleVar, value1, value2)-->
 +
<!--GIDEROSMTD:ImGui:popStyleVar([count = 1])-->
 +
<!--GIDEROSMTD:ImGui:getStyleColor(ImGui.Col) color, alpha = ImGui:getStyleColor(ImGui.Col)-->
 +
<!--GIDEROSMTD:ImGui:getFontSize() fontSize = ImGui:getFontSize()-->
 +
<!--GIDEROSMTD:ImGui:pushItemWidth(w)-->
 +
<!--GIDEROSMTD:ImGui:popItemWidth()-->
 +
<!--GIDEROSMTD:ImGui:setNextItemWidth(w)-->
 +
<!--GIDEROSMTD:ImGui:calcItemWidth() w = ImGui:calcItemWidth()-->
 +
<!--GIDEROSMTD:ImGui:pushTextWrapPos([localX = 0])-->
 +
<!--GIDEROSMTD:ImGui:popTextWrapPos()-->
 +
<!--GIDEROSMTD:ImGui:pushTabStop(flag)-->
 +
<!--GIDEROSMTD:ImGui:popTabStop()-->
 +
<!--GIDEROSMTD:ImGui:pushButtonRepeat(flag)-->
 +
<!--GIDEROSMTD:ImGui:popButtonRepeat()-->
 +
<!--GIDEROSMTD:ImGui:separator()-->
 +
<!--GIDEROSMTD:ImGui:sameLine([offset_x = 0, spacing = -1])-->
 +
<!--GIDEROSMTD:ImGui:newLine()-->
 +
<!--GIDEROSMTD:ImGui:spacing()-->
 +
<!--GIDEROSMTD:ImGui:dummy(w, h)-->
 +
<!--GIDEROSMTD:ImGui:indent([indent = 0])-->
 +
<!--GIDEROSMTD:ImGui:unindent([indent = 0])-->
 +
<!--GIDEROSMTD:ImGui:beginGroup()-->
 +
<!--GIDEROSMTD:ImGui:endGroup()-->
 +
<!--GIDEROSMTD:ImGui:getCursorPos() x, y = ImGui:getCursorPos()-->
 +
<!--GIDEROSMTD:ImGui:getCursorPosX() x = ImGui:getCursorPosX()-->
 +
<!--GIDEROSMTD:ImGui:getCursorPosY() y = ImGui:getCursorPosY()-->
 +
<!--GIDEROSMTD:ImGui:setCursorPos(local_x, local_y)-->
 +
<!--GIDEROSMTD:ImGui:setCursorPosX(local_x)-->
 +
<!--GIDEROSMTD:ImGui:setCursorPosY(local_y)-->
 +
<!--GIDEROSMTD:ImGui:getCursorStartPos() x, y = ImGui:getCursorStartPos()-->
 +
<!--GIDEROSMTD:ImGui:getCursorScreenPos() x, y = ImGui:getCursorScreenPos()-->
 +
<!--GIDEROSMTD:ImGui:setCursorScreenPos(x, y)-->
 +
<!--GIDEROSMTD:ImGui:alignTextToFramePadding()-->
 +
<!--GIDEROSMTD:ImGui:getTextLineHeight() lineH = ImGui:getTextLineHeight()-->
 +
<!--GIDEROSMTD:ImGui:getTextLineHeightWithSpacing() lineH = ImGui:getTextLineHeightWithSpacing()-->
 +
<!--GIDEROSMTD:ImGui:getFrameHeight() frameH = ImGui:getFrameHeight()-->
 +
<!--GIDEROSMTD:ImGui:getFrameHeightWithSpacing() frameH = ImGui:getFrameHeightWithSpacing()-->
 +
<!--GIDEROSMTD:ImGui:pushID(anyValue) -->
 +
<!--GIDEROSMTD:ImGui:pushID(str)-->
 +
<!--GIDEROSMTD:ImGui:popID()-->
 +
<!--GIDEROSMTD:ImGui:getID(any_value) number = ImGui:getID(any_value)-->
 +
<!--GIDEROSMTD:ImGui:getID(string) number = ImGui:getID(string)-->
 +
<!--GIDEROSMTD:ImGui:getItemID() number = ImGui:getItemID()-->
 +
<!--GIDEROSMTD:ImGui:textUnformatted(text [, textEnd])-->
 +
<!--GIDEROSMTD:ImGui:text(text)-->
 +
<!--GIDEROSMTD:ImGui:textColored(text, color, alpha)-->
 +
<!--GIDEROSMTD:ImGui:textDisabled(text)-->
 +
<!--GIDEROSMTD:ImGui:textWrapped(text)-->
 +
<!--GIDEROSMTD:ImGui:labelText(text, label)-->
 +
<!--GIDEROSMTD:ImGui:bulletText(text)-->
 +
<!--GIDEROSMTD:ImGui:separatorText(label)-->
 +
<!--GIDEROSMTD:ImGui:button(text [, w = 0, h = 0]) flag = ImGui:button(text [, w = 0, h = 0])-->
 +
<!--GIDEROSMTD:ImGui:smallButton(text) flag = ImGui:smallButton(text)-->
 +
<!--GIDEROSMTD:ImGui:invisibleButton(string_ID [, w = 0, h = 0]) flag = ImGui:invisibleButton(...)-->
 +
<!--GIDEROSMTD:ImGui:arrowButton(string_ID [, ImGui.Dir = 0]) flag = ImGui:arrowButton(string_ID [, ImGui.Dir = 0])-->
 +
<!--GIDEROSMTD:ImGui:checkbox(text, flag) flag = ImGui:checkbox(text, flag)-->
 +
<!--GIDEROSMTD:ImGui:checkboxFlags(label [, flags = 0, flags_value = 0]) flags, is_changed = ImGui:checkboxFlags(...)-->
 +
<!--GIDEROSMTD:ImGui:radioButton(text, number, number) number, is_changed = ImGui:radioButton(text, number, number)-->
 +
<!--GIDEROSMTD:ImGui:radioButton(text, flag) is_changed = ImGui:radioButton(text, flag)-->
 +
<!--GIDEROSMTD:ImGui:progressBar(fraction [, anchor_x = -1, anchor_y = 0, overlay_string = nil])-->
 +
<!--GIDEROSMTD:ImGui:bullet()-->
 +
 +
 +
 +
 +
  
  
  
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:imgui:getIO() IO = imgui:getIO()-->
 
<!--GIDEROSMTD:ImGui:arrowButton(stringID, direction) displays an ImGui arrow button-->
 
<!--GIDEROSMTD:ImGui:beginDisabled(disabledFlag) starts a stack that can be disabled-->
 
<!--GIDEROSMTD:ImGui:beginWindow(name, p_open, flags) pushes a Window to the stack and starts appending to it-->
 
<!--GIDEROSMTD:ImGui:beginTabBar(str_id [, ImGui.TabBarFlags = 0]) pushes a TabBar to the stack and starts appending to it-->
 
<!--GIDEROSMTD:ImGui:beginTable(str_id, column [, ImGui.TableFlags = 0, outer_w = 0, outer_h = 0, inner_width = 0]) pushes Table to the stack and starts appending to it-->
 
<!--GIDEROSMTD:ImGui:bullet() displays an ImGui bullet-->
 
<!--GIDEROSMTD:ImGui:bulletText(string) displays an ImGui bulleted text-->
 
<!--GIDEROSMTD:ImGui:button(string, w, h) displays an ImGui button-->
 
<!--GIDEROSMTD:ImGui:checkbox(text, flag) displays an ImGui checkbox-->
 
<!--GIDEROSMTD:ImGui:colorButton(stringID, color, alpha, [w=0, h=0, ImGuiColorEditFlags=0]) displays an ImGui color button-->
 
<!--GIDEROSMTD:ImGui:colorEdit3(label, color, [ImGuiColorEditFlags=0]) displays an ImGui RGB color edit widget-->
 
<!--GIDEROSMTD:ImGui:colorEdit4(label, color, alpha, [ImGuiColorEditFlags=0]) displays an ImGui RGBA color edit widget-->
 
<!--GIDEROSMTD:ImGui:colorPicker3(label, color, [ImGuiColorEditFlags=0]) displays an ImGui RGB color picker widget-->
 
<!--GIDEROSMTD:ImGui:colorPicker4(label, color, alpha, [ImGuiColorEditFlags=0, originalColor=0xffffff, originalAlpha=1]) displays an ImGui RGBA color picker widget-->
 
<!--GIDEROSMTD:ImGui:combo(label, currentItem, items) displays an ImGui combo box-->
 
<!--GIDEROSMTD:ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui drag float slider-->
 
<!--GIDEROSMTD:ImGui:dragFloat2(label, value1, value2, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 2 ImGui drag float sliders-->
 
<!--GIDEROSMTD:ImGui:dragFloat3(label, value1, value2, value3, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 3 ImGui drag float sliders-->
 
<!--GIDEROSMTD:ImGui:dragFloat4(label, value1, value2, value3, value4, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 4 ImGui drag float sliders-->
 
<!--GIDEROSMTD:ImGui:dragFloatRange2(label, valueMin, valueMax, [incStep=1, min=0, max=0, formatMinString="%.3f", formatMaxString=formatMinString, ImGuiSliderFlags=0]) displays 2 ImGui drag float range sliders-->
 
<!--GIDEROSMTD:ImGui:dragInt(label, value, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays an ImGui drag int slider-->
 
<!--GIDEROSMTD:ImGui:dragInt2(label, value1, value2, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 2 ImGui drag int sliders-->
 
<!--GIDEROSMTD:ImGui:dragInt3(label, value1, value2, value3, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 3 ImGui drag int sliders-->
 
<!--GIDEROSMTD:ImGui:dragInt4(label, value1, value2, value3, value4, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 4 ImGui drag int sliders-->
 
<!--GIDEROSMTD:ImGui:dragIntRange2(label, valueMin, valueMax, [incStep=1, min=0, max=0, formatMinString="%d", formatMaxString=formatMinString, ImGuiSliderFlags=0]) displays 2 ImGui drag int range sliders-->
 
<!--GIDEROSMTD:ImGui:dragScalar(label, ImGuiDataType, value, v_speed, [v_min=nil, v_max=nil, format=nil, ImGuiSliderFlags=0]) displays an ImGui drag scalar slider-->
 
<!--GIDEROSMTD:ImGui:endDisabled() ends a stack that can be disabled-->
 
<!--GIDEROSMTD:ImGui:endFrame() ends an ImGui Frame-->
 
<!--GIDEROSMTD:ImGui:endTable() pops a Table from the stack-->
 
<!--GIDEROSMTD:ImGui:endWindow() pops a Window from the stack-->
 
<!--GIDEROSMTD:ImGui:filledSliderAngle(label, mirrorFlag, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular filled angle slider-->
 
<!--GIDEROSMTD:ImGui:filledSliderFloat(label, mirrorFlag, value, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular filled float slider-->
 
<!--GIDEROSMTD:ImGui:filledSliderFloat2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays two ImGui regular filled float sliders-->
 
<!--GIDEROSMTD:ImGui:filledSliderFloat3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays three ImGui regular filled float sliders-->
 
<!--GIDEROSMTD:ImGui:filledSliderFloat4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays four ImGui regular filled float sliders-->
 
<!--GIDEROSMTD:ImGui:filledSliderInt(label, mirrorFlag, value, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular filled int slider-->
 
<!--GIDEROSMTD:ImGui:filledSliderInt2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays two ImGui regular filled int sliders-->
 
<!--GIDEROSMTD:ImGui:filledSliderInt3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays three ImGui regular filled int sliders-->
 
<!--GIDEROSMTD:ImGui:filledSliderInt4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays four ImGui regular filled int sliders-->
 
<!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
 
<!--GIDEROSMTD:ImGui:getStyle() accesses the Style structure (colors, sizes)-->
 
<!--GIDEROSMTD:ImGui:image(texture, w, h, color, alpha, bordercolor, borderalpha) an ImGui image-->
 
<!--GIDEROSMTD:ImGui:imageButton(texture, w, h, padding, tintColor, alpha, borderColor, borderalpha) displays an ImGui image button-->
 
<!--GIDEROSMTD:ImGui:imageButtonWithText(texture, text, w, h, padding, bg_color, bg_alpha, tintColor, alpha)) displays an ImGui image button with some text-->
 
<!--GIDEROSMTD:ImGui:imageFilled(texture, w, h, color, alpha, bg_color, bg_alpha, bordercolor, borderalpha) an ImGui filled image-->
 
<!--GIDEROSMTD:ImGui:inputDouble(label, value, [step=0, step_fast=0, format="%.6f", ImGuiInputTextFlags=0]) an ImGui input double field-->
 
<!--GIDEROSMTD:ImGui:inputFloat(label, value, [step=0, step_fast=0, format="%.3f", ImGuiInputTextFlags=0]) an ImGui input float field-->
 
<!--GIDEROSMTD:ImGui:inputFloat2(label, value1, value2, [format="%.3f", ImGuiInputTextFlags=0]) two ImGui input float fields-->
 
<!--GIDEROSMTD:ImGui:inputFloat3(label, value1, value2, value3, [format="%.3f", ImGuiInputTextFlags=0]) three ImGui input float fields-->
 
<!--GIDEROSMTD:ImGui:inputFloat4(label, value1, value2, value3, value4, [format="%.3f", ImGuiInputTextFlags=0]) four ImGui input float fields-->
 
<!--GIDEROSMTD:ImGui:inputInt(label, value, [step=0, step_fast=0, ImGuiInputTextFlags=0]) an ImGui input int field-->
 
<!--GIDEROSMTD:ImGui:inputInt2(label, value1, value2, [ImGuiInputTextFlags=0]) two ImGui input int fields-->
 
<!--GIDEROSMTD:ImGui:inputInt3(label, value1, value2, value3, [ImGuiInputTextFlags=0]) three ImGui input int fields-->
 
<!--GIDEROSMTD:ImGui:inputInt4(label, value1, value2, value3, value4, [ImGuiInputTextFlags=0]) four ImGui input int fields-->
 
<!--GIDEROSMTD:ImGui:inputScalar(label, ImGuiDataType, value, v_min, v_max, format, [ImGuiInputTextFlags=0]) an ImGui input scalar field-->
 
<!--GIDEROSMTD:ImGui:inputText(label, text, bufferSize, [ImGuiInputTextFlags = 0]) an ImGui input text field-->
 
<!--GIDEROSMTD:ImGui:inputTextMultiline(ImGui:inputTextMultiline(label, text, bufferSize, [w=0, h=0, ImGuiInputTextFlags=0]) an ImGui multiline input text-->
 
<!--GIDEROSMTD:ImGui:inputTextWithHint(label, text, hint, bufferSize, [ImGuiInputTextFlags=0]) an ImGui input text field with hint-->
 
<!--GIDEROSMTD:ImGui:invisibleButton(string, w, h) an ImGui invisible button-->
 
<!--GIDEROSMTD:ImGui:labelText(string, string) displays an ImGui labelled text-->
 
<!--GIDEROSMTD:ImGui:newFrame(dt) starts a new ImGui frame-->
 
<!--GIDEROSMTD:ImGui:progressBar(fraction, anchorX, anchorY, overlayString) an ImGui progress bar-->
 
<!--GIDEROSMTD:ImGui:radioButton(text, number, number) ImGui radio button-->
 
<!--GIDEROSMTD:ImGui:render() ends the ImGui frame, finalizes the draw data-->
 
<!--GIDEROSMTD:ImGui:scaledImage(texture, w, h, tintColor, alpha, borderColor, borderAlpha, anchorX, anchorY) an ImGui scaled image-->
 
<!--GIDEROSMTD:ImGui:scaledImageFilled(texture, w, h, tintColor, alpha, bgColor, bgAlpha, borderColor, borderAlpha, anchorX, anchorY) an ImGui scaled image and filled-->
 
<!--GIDEROSMTD:ImGui:scaledImageButton(texture, w, h, padding, color, alpha, bgcColor, bgAlpha, anchorX, anchorY) an ImGui scaled image button-->
 
<!--GIDEROSMTD:ImGui:scaledImageButtonWithText(texture, text, w, h, padding, bgColor, bgAlpha, Color, alpha, anchorX, anchorY) an ImGui scaled image button and some text-->
 
<!--GIDEROSMTD:ImGui:setClassicStyle() sets a classic color style-->
 
<!--GIDEROSMTD:ImGui:setColorEditOptions(ImGuiColorEditFlags) sets the color edit options flag-->
 
<!--GIDEROSMTD:ImGui:setDarkStyle() sets a dark color style-->
 
<!--GIDEROSMTD:ImGui:setLightStyle() sets a light color style-->
 
<!--GIDEROSMTD:ImGui:setNextWindowPos(x,y) sets next windows position-->
 
<!--GIDEROSMTD:ImGui:setNextWindowSize(w,h) sets next windows size-->
 
<!--GIDEROSMTD:ImGui:setNextWindowSizeConstraints(min_w,min_h,max_w,max_h [,resize_callback,user_data]) sets next windows size constraints-->
 
<!--GIDEROSMTD:ImGui:showAboutWindow() adds an ImGui About window, displaying ImGui version, credits and build/system information-->
 
<!--GIDEROSMTD:ImGui:showDemoWindow() adds an ImGui demo window-->
 
<!--GIDEROSMTD:ImGui:showFontSelector(font) adds a font selector block (not a window)-->
 
<!--GIDEROSMTD:ImGui:showMetricsWindow() adds an ImGui metrics window-->
 
<!--GIDEROSMTD:ImGui:showStyleEditor() adds the style editor block (not a window)-->
 
<!--GIDEROSMTD:ImGui:showStyleSelector(style) adds a style selector block (not a window)-->
 
<!--GIDEROSMTD:ImGui:showUserGuide() adds basic help/info block (not a window)-->
 
<!--GIDEROSMTD:ImGui:sliderAngle(label, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular angle slider-->
 
<!--GIDEROSMTD:ImGui:sliderFloat(label, value, [min = 0, max = 0, formatString = "%.3f", ImGuiSliderFlags = 0]) displays an ImGui regular float slider-->
 
<!--GIDEROSMTD:ImGui:sliderFloat2(label, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 2 ImGui regular float sliders-->
 
<!--GIDEROSMTD:ImGui:sliderFloat3(label, value1, value2, value3, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 3 ImGui regular float sliders-->
 
<!--GIDEROSMTD:ImGui:sliderFloat4(label, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 4 ImGui regular float sliders-->
 
<!--GIDEROSMTD:ImGui:sliderInt(label, value, [min = 0, max = 0, formatString = "%d", ImGuiSliderFlags = 0]) displays an ImGui regular int slider-->
 
<!--GIDEROSMTD:ImGui:sliderInt2(label, value1, value2, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 2 ImGui regular int sliders-->
 
<!--GIDEROSMTD:ImGui:sliderInt3(label, value1, value2, value3, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 3 ImGui regular int sliders-->
 
<!--GIDEROSMTD:ImGui:sliderInt4(label, value1, value2, value3, value4, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 4 ImGui regular int sliders-->
 
<!--GIDEROSMTD:ImGui:smallButton(string) displays an ImGui small button-->
 
<!--GIDEROSMTD:ImGui:text(string) displays an ImGui text-->
 
<!--GIDEROSMTD:ImGui:textColored(string, hex, alpha) displays an ImGui colored text-->
 
<!--GIDEROSMTD:ImGui:textDisabled(string) displays an ImGui disabled text-->
 
<!--GIDEROSMTD:ImGui:textWrapped(string) displays an ImGui wrapped text-->
 
<!--GIDEROSMTD:ImGui:vFilledSliderFloat(label, mirrorFlag, w, h, value, min, max, [formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular vertical filled float slider-->
 
<!--GIDEROSMTD:ImGui:vFilledSliderInt(label, mirrorFlag, w, h, value, min, max, [formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular vertical filled int slider-->
 
<!--GIDEROSMTD:ImGui:vSliderFloat(label, w, h, value, min, max, [formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular vertical float slider-->
 
<!--GIDEROSMTD:ImGui:vSliderInt(label, w, h, value, min, max, [formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular vertical int slider-->
 
 
<!--=== Events ===-->
 
<!--=== Events ===-->
 
<!--GIDEROSEVT:ImGui.KeyChar-->
 
<!--GIDEROSEVT:ImGui.KeyChar-->
Line 487: Line 452:
 
<!--GIDEROSEVT:ImGui.MouseWheel-->
 
<!--GIDEROSEVT:ImGui.MouseWheel-->
 
<!--GIDEROSEVT:ImGui.TouchBegin-->
 
<!--GIDEROSEVT:ImGui.TouchBegin-->
 +
<!--GIDEROSEVT:ImGui.TouchCancel-->
 
<!--GIDEROSEVT:ImGui.TouchEnd-->
 
<!--GIDEROSEVT:ImGui.TouchEnd-->
<!--GIDEROSEVT:ImGui.TouchCancel-->
 
 
<!--GIDEROSEVT:ImGui.TouchMove-->
 
<!--GIDEROSEVT:ImGui.TouchMove-->
 
<!--=== Constants ===-->
 
<!--=== Constants ===-->
Line 623: Line 588:
 
<!--GIDEROSCST:ImGui.Dir_Left-->
 
<!--GIDEROSCST:ImGui.Dir_Left-->
 
<!--GIDEROSCST:ImGui.Dir_Right-->
 
<!--GIDEROSCST:ImGui.Dir_Right-->
<!--GIDEROSCST:ImGui.Dir_Up -->
+
<!--GIDEROSCST:ImGui.Dir_Up-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_None-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_None-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_AcceptBeforeDelivery-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_AcceptBeforeDelivery-->
Line 634: Line 599:
 
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoDisableHover-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoDisableHover-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoHoldToOpenOthers-->
 
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoHoldToOpenOthers-->
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoPreviewTooltip -->
+
<!--GIDEROSCST:ImGui.DragDropFlags_SourceNoPreviewTooltip-->
 
<!--GIDEROSCST:ImGui.FocusedFlags_None-->
 
<!--GIDEROSCST:ImGui.FocusedFlags_None-->
 
<!--GIDEROSCST:ImGui.FocusedFlags_AnyWindow-->
 
<!--GIDEROSCST:ImGui.FocusedFlags_AnyWindow-->
Line 880: Line 845:
 
<!--GIDEROSCST:ImGui.TE_Punctuation-->
 
<!--GIDEROSCST:ImGui.TE_Punctuation-->
 
<!--GIDEROSCST:ImGui.TE_Selection-->
 
<!--GIDEROSCST:ImGui.TE_Selection-->
<!--GIDEROSCST:ImGui.TE_String -->
+
<!--GIDEROSCST:ImGui.TE_String-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_None-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_None-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_AllowItemOverlap-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_AllowItemOverlap-->
Line 896: Line 861:
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_Selected-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_Selected-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_SpanAvailWidth-->
 
<!--GIDEROSCST:ImGui.TreeNodeFlags_SpanAvailWidth-->
<!--GIDEROSCST:ImGui.TreeNodeFlags_SpanFullWidth -->
+
<!--GIDEROSCST:ImGui.TreeNodeFlags_SpanFullWidth-->
 
<!--GIDEROSCST:ImGui.WindowFlags_None-->
 
<!--GIDEROSCST:ImGui.WindowFlags_None-->
 
<!--GIDEROSCST:ImGui.WindowFlags_AlwaysAutoResize-->
 
<!--GIDEROSCST:ImGui.WindowFlags_AlwaysAutoResize-->
Line 921: Line 886:
 
<!--GIDEROSCST:ImGui.WindowFlags_NoScrollWithMouse-->
 
<!--GIDEROSCST:ImGui.WindowFlags_NoScrollWithMouse-->
 
<!--GIDEROSCST:ImGui.WindowFlags_NoTitleBar-->
 
<!--GIDEROSCST:ImGui.WindowFlags_NoTitleBar-->
<!--GIDEROSCST:ImGui.WindowFlags_UnsavedDocument -->
+
<!--GIDEROSCST:ImGui.WindowFlags_UnsavedDocument-->
  
 
{{GIDEROS IMPORTANT LINKS}}
 
{{GIDEROS IMPORTANT LINKS}}

Revision as of 00:43, 10 October 2024

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2020.9

Description

This is an implementation of the Dear ImGui library: https://github.com/ocornut/imgui.

Dear ImGui is licensed under the MIT License, see https://github.com/ocornut/imgui/blob/master/LICENSE.txt for more information.

To use Dear ImGui in your project you need to add the ImGui plugin and call require like so:

require "ImGui"

Current Gideros Dear ImGui version: 1.89.6.

User Guide

  • Double-click on title bar to collapse window
  • Click and drag on lower corner to resize window (double-click to auto fit window to its contents)
  • CTRL+Click on a slider or drag box to input value as text
  • TAB/SHIFT+TAB to cycle through keyboard editable fields
  • CTRL+Tab to select a window
  • CTRL+Mouse Wheel to zoom window contents if io.FontAllowUserScaling is enabled
  • While inputing text:
    • CTRL+Left/Right to word jump
    • CTRL+A or double-click to select all
    • CTRL+X/C/V to use clipboard cut/copy/paste
    • CTRL+Z,CTRL+Y to undo/redo
    • ESCAPE to revert
  • With keyboard navigation enabled:
    • Arrow keys to navigate
    • Space to activate a widget
    • Return to input text into a widget
    • Escape to deactivate a widget, close popup, exit child window
    • Alt to jump to the menu layer of a window

Widgets

Widgets: Color Editor/Picker
* tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu
Widgets: Input with Keyboard
* If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
* Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
Widgets: Regular Sliders
* CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
* Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
* Format string may also be set to NULL or use the default format ("%f" or "%d").

If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
Widgets: Drag Sliders
* CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
* For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
* Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
* Format string may also be set to NULL or use the default format ("%f" or "%d").
* Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
* Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
* Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
* We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.

Gideros Dear ImGui Documentation

OLD DOC TO BE MERGED SOMEHOW