Difference between revisions of "ImGui.Core"

From GiderosMobile
 
(56 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
  
'''PLEASE NOTE THE DOCUMENTATION IS WORK IN PROGRESS'''
+
'''PLEASE NOTE THE DOCUMENTATION IS ''WORK IN PROGRESS'''''
  
 +
 +
'''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.
  
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 +
 
=== Methods ===
 
=== Methods ===
[[ImGui.new]] ''initializes ImGui''<br/><!--GIDEROSMTD:ImGui.new() initializes ImGui-->
+
[[ImGui.Core.new|ImGui.new]] ''initializes ImGui''<br/><!--GIDEROSMTD:ImGui.new() initializes ImGui-->
  
 
[[ImGui.Core:arrowButton|ImGui:arrowButton]] ''displays an ImGui arrow button''<br/><!--GIDEROSMTD:ImGui:arrowButton(stringID, direction) displays an ImGui arrow button-->
 
[[ImGui.Core:arrowButton|ImGui:arrowButton]] ''displays an ImGui arrow button''<br/><!--GIDEROSMTD:ImGui:arrowButton(stringID, direction) displays an ImGui arrow button-->
[[ImGui:beginWindow]] ''pushes window to the stack and starts appending to it''<br/><!--GIDEROSMTD:ImGui:beginWindow(name, p_open, flags) pushes window to the stack and starts appending to it-->
+
[[ImGui.Core:beginWindow|ImGui:beginWindow]] ''pushes Window to the stack and starts appending to it''<br/><!--GIDEROSMTD:ImGui:beginWindow(name, p_open, flags) pushes a Window to the stack and starts appending to it-->
 +
[[ImGui.Core:beginTable|ImGui:beginTable]] ''pushes a Table to the stack and starts appending to it''<br/><!--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-->
 +
[[ImGui.Core:bullet|ImGui:bullet]] ''displays an ImGui bullet''<br/><!--GIDEROSMTD:ImGui:bullet() displays an ImGui bullet-->
 
[[ImGui.Core:bulletText|ImGui:bulletText]] ''displays an ImGui bulleted text''<br/><!--GIDEROSMTD:ImGui:bulletText(string) displays an ImGui bulleted text-->
 
[[ImGui.Core:bulletText|ImGui:bulletText]] ''displays an ImGui bulleted text''<br/><!--GIDEROSMTD:ImGui:bulletText(string) displays an ImGui bulleted text-->
 
[[ImGui.Core:button|ImGui:button]] ''displays an ImGui button''<br/><!--GIDEROSMTD:ImGui:button(string, w, h) displays an ImGui button-->
 
[[ImGui.Core:button|ImGui:button]] ''displays an ImGui button''<br/><!--GIDEROSMTD:ImGui:button(string, w, h) displays an ImGui button-->
[[ImGui:endFrame]] ''ends the ImGui frame''<br/><!--GIDEROSMTD:ImGui:endFrame() ends the ImGui frame-->
+
[[ImGui.Core:checkbox|ImGui:checkbox]] ''displays an ImGui checkbox''<br/><!--GIDEROSMTD:ImGui:checkbox(text, flag) displays an ImGui checkbox-->
[[ImGui:endWindow]] ''pops window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops window from the stack-->
+
[[ImGui.Core:colorButton|ImGui:colorButton]] ''displays an ImGui color button''<br/><!--GIDEROSMTD:ImGui:colorButton(stringID, color, alpha, [w=0, h=0, ImGuiColorEditFlags=0]) displays an ImGui color button-->
[[ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
+
[[ImGui.Core:colorEdit3|ImGui:colorEdit3]] ''displays an ImGui RGB color edit widget''<br/><!--GIDEROSMTD:ImGui:colorEdit3(label, color, [ImGuiColorEditFlags=0]) displays an ImGui RGB color edit widget-->
[[ImGui:getStyle]] ''accesses the Style structure (colors, sizes)''<br/><!--GIDEROSMTD:ImGui:getStyle() accesses the Style structure (colors, sizes)-->
+
[[ImGui.Core:colorEdit4|ImGui:colorEdit4]] ''displays an ImGui RGBA color edit widget''<br/><!--GIDEROSMTD:ImGui:colorEdit4(label, color, alpha, [ImGuiColorEditFlags=0]) displays an ImGui RGBA color edit widget-->
[[ImGui.Core:image|ImGui:image]] ''an ImGui image''<br/><!--GIDEROSMTD:ImGui:image(texture, w, h, color, alpha, border) an ImGui image-->
+
[[ImGui.Core:colorPicker3|ImGui:colorPicker3]] ''displays an ImGui RGB color picker widget''<br/><!--GIDEROSMTD:ImGui:colorPicker3(label, color, [ImGuiColorEditFlags=0]) displays an ImGui RGB color picker widget-->
 +
[[ImGui.Core:colorPicker4|ImGui:colorPicker4]] ''displays an ImGui RGBA color picker widget''<br/><!--GIDEROSMTD:ImGui:colorPicker4(label, color, alpha, [ImGuiColorEditFlags=0, originalColor=0xffffff, originalAlpha=1]) displays an ImGui RGBA color picker widget-->
 +
[[ImGui.Core:combo|ImGui:combo]] ''displays a ImGui combo box''<br/><!--GIDEROSMTD:ImGui:combo(label, currentItem, items) displays an ImGui combo box-->
 +
[[ImGui.Core:dragFloat|ImGui:dragFloat]] ''displays an ImGui drag float slider''<br/><!--GIDEROSMTD:ImGui:dragFloat(label, value, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui drag float slider-->
 +
[[ImGui.Core:dragFloat2|ImGui:dragFloat2]] ''displays 2 ImGui drag float sliders''<br/><!--GIDEROSMTD:ImGui:dragFloat2(label, value1, value2, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 2 ImGui drag float sliders-->
 +
[[ImGui.Core:dragFloat3|ImGui:dragFloat3]] ''displays 3 ImGui drag float sliders''<br/><!--GIDEROSMTD:ImGui:dragFloat3(label, value1, value2, value3, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 3 ImGui drag float sliders-->
 +
[[ImGui.Core:dragFloat4|ImGui:dragFloat4]] ''displays 4 ImGui drag float sliders''<br/><!--GIDEROSMTD:ImGui:dragFloat4(label, value1, value2, value3, value4, [incStep=1, min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 4 ImGui drag float sliders-->
 +
[[ImGui.Core:dragFloatRange2|ImGui:dragFloatRange2]] ''displays 2 ImGui drag float range sliders''<br/><!--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-->
 +
[[ImGui.Core:dragInt|ImGui:dragInt]] ''displays an ImGui drag int slider''<br/><!--GIDEROSMTD:ImGui:dragInt(label, value, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays an ImGui drag int slider-->
 +
[[ImGui.Core:dragInt2|ImGui:dragInt2]] ''displays 2 ImGui drag int sliders''<br/><!--GIDEROSMTD:ImGui:dragInt2(label, value1, value2, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 2 ImGui drag int sliders-->
 +
[[ImGui.Core:dragInt3|ImGui:dragInt3]] ''displays 3 ImGui drag int sliders''<br/><!--GIDEROSMTD:ImGui:dragInt3(label, value1, value2, value3, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 3 ImGui drag int sliders-->
 +
[[ImGui.Core:dragInt4|ImGui:dragInt4]] ''displays 4 ImGui drag int sliders''<br/><!--GIDEROSMTD:ImGui:dragInt4(label, value1, value2, value3, value4, [incStep=1, min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 4 ImGui drag int sliders-->
 +
[[ImGui.Core:dragIntRange2|ImGui:dragIntRange2]] ''displays 2 ImGui drag int range sliders''<br/><!--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-->
 +
[[ImGui.Core:dragScalar|ImGui:dragScalar]] ''displays an ImGui drag scalar slider''<br/><!--GIDEROSMTD:ImGui:dragScalar(label, ImGuiDataType, value, v_speed, [v_min=nil, v_max=nil, format=nil, ImGuiSliderFlags=0]) displays an ImGui drag scalar slider-->
 +
[[ImGui.Core:endFrame|ImGui:endFrame]] ''ends an ImGui Frame''<br/><!--GIDEROSMTD:ImGui:endFrame() ends an ImGui Frame-->
 +
[[ImGui.Core:endTable|ImGui:endTable]] ''pops a Table from the stack''<br/><!--GIDEROSMTD:ImGui:endTable() pops a Table from the stack-->
 +
[[ImGui.Core:endWindow|ImGui:endWindow]] ''pops a Window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops a Window from the stack-->
 +
[[ImGui.Core:filledSliderAngle|ImGui:filledSliderAngle]] ''displays an ImGui regular filled angle slider''<br/><!--GIDEROSMTD:ImGui:filledSliderAngle(label, mirrorFlag, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular filled angle slider-->
 +
[[ImGui.Core:filledSliderFloat|ImGui:filledSliderFloat]] ''displays an ImGui regular filled float slider''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat(label, mirrorFlag, value, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular filled float slider-->
 +
[[ImGui.Core:filledSliderFloat2|ImGui:filledSliderFloat2]] ''displays two ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays two ImGui regular filled float sliders-->
 +
[[ImGui.Core:filledSliderFloat3|ImGui:filledSliderFloat3]] ''displays three ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays three ImGui regular filled float sliders-->
 +
[[ImGui.Core:filledSliderFloat4|ImGui:filledSliderFloat4]] ''displays four ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays four ImGui regular filled float sliders-->
 +
[[ImGui.Core:filledSliderInt|ImGui:filledSliderInt]] ''displays an ImGui regular filled int slider''<br/><!--GIDEROSMTD:ImGui:filledSliderInt(label, mirrorFlag, value, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular filled int slider-->
 +
[[ImGui.Core:filledSliderInt2|ImGui:filledSliderInt2]] ''displays two ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays two ImGui regular filled int sliders-->
 +
[[ImGui.Core:filledSliderInt3|ImGui:filledSliderInt3]] ''displays three ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays three ImGui regular filled int sliders-->
 +
[[ImGui.Core:filledSliderInt4|ImGui:filledSliderInt4]] ''displays four ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays four ImGui regular filled int sliders-->
 +
[[ImGui.Core:getIO|ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
 +
[[ImGui.Core:getStyle|ImGui:getStyle]] ''accesses the Style structure (colors, sizes)''<br/><!--GIDEROSMTD:ImGui:getStyle() accesses the Style structure (colors, sizes)-->
 +
[[ImGui.Core:image|ImGui:image]] ''an ImGui image''<br/><!--GIDEROSMTD:ImGui:image(texture, w, h, color, alpha, bordercolor, borderalpha) an ImGui image-->
 +
[[ImGui.Core:imageButton|ImGui:imageButton]] ''displays an ImGui image button''<br/><!--GIDEROSMTD:ImGui:imageButton(texture, w, h, padding, tintColor, alpha, borderColor, borderalpha) displays an ImGui image button-->
 +
[[ImGui.Core:imageButtonWithText|ImGui:imageButtonWithText]] ''displays an ImGui image button with some text''<br/><!--GIDEROSMTD:ImGui:imageButtonWithText(texture, text, w, h, padding, bg_color, bg_alpha, tintColor, alpha)) displays an ImGui image button with some text-->
 +
[[ImGui.Core:imageFilled|ImGui:imageFilled]] ''an ImGui filled image''<br/><!--GIDEROSMTD:ImGui:imageFilled(texture, w, h, color, alpha, bg_color, bg_alpha, bordercolor, borderalpha) an ImGui filled image-->
 +
[[ImGui.Core:inputDouble|ImGui:inputDouble]] ''an ImGui input double field''<br/><!--GIDEROSMTD:ImGui:inputDouble(label, value, [step=0, step_fast=0, format="%.6f", ImGuiInputTextFlags=0]) an ImGui input double field-->
 +
[[ImGui.Core:inputFloat|ImGui:inputFloat]] ''an ImGui input float field''<br/><!--GIDEROSMTD:ImGui:inputFloat(label, value, [step=0, step_fast=0, format="%.3f", ImGuiInputTextFlags=0]) an ImGui input float field-->
 +
[[ImGui.Core:inputFloat2|ImGui:inputFloat2]] ''two ImGui input float fields''<br/><!--GIDEROSMTD:ImGui:inputFloat2(label, value1, value2, [format="%.3f", ImGuiInputTextFlags=0]) two ImGui input float fields-->
 +
[[ImGui.Core:inputFloat3|ImGui:inputFloat3]] ''three ImGui input float fields''<br/><!--GIDEROSMTD:ImGui:inputFloat3(label, value1, value2, value3, [format="%.3f", ImGuiInputTextFlags=0]) three ImGui input float fields-->
 +
[[ImGui.Core:inputFloat4|ImGui:inputFloat4]] ''four ImGui input float fields''<br/><!--GIDEROSMTD:ImGui:inputFloat4(label, value1, value2, value3, value4, [format="%.3f", ImGuiInputTextFlags=0]) four ImGui input float fields-->
 +
[[ImGui.Core:inputInt|ImGui:inputInt]] ''an ImGui input int field''<br/><!--GIDEROSMTD:ImGui:inputInt(label, value, [step=0, step_fast=0, ImGuiInputTextFlags=0]) an ImGui input int field-->
 +
[[ImGui.Core:inputInt2|ImGui:inputInt2]] ''two ImGui input int fields''<br/><!--GIDEROSMTD:ImGui:inputInt2(label, value1, value2, [ImGuiInputTextFlags=0]) two ImGui input int fields-->
 +
[[ImGui.Core:inputInt3|ImGui:inputInt3]] ''three ImGui input int fields''<br/><!--GIDEROSMTD:ImGui:inputInt3(label, value1, value2, value3, [ImGuiInputTextFlags=0]) three ImGui input int fields-->
 +
[[ImGui.Core:inputInt4|ImGui:inputInt4]] ''four ImGui input int fields''<br/><!--GIDEROSMTD:ImGui:inputInt4(label, value1, value2, value3, value4, [ImGuiInputTextFlags=0]) four ImGui input int fields-->
 +
[[ImGui.Core:inputScalar|ImGui:inputScalar]] ''an ImGui input scalar field''<br/><!--GIDEROSMTD:ImGui:inputScalar(label, ImGuiDataType, value, v_min, v_max, format, [ImGuiInputTextFlags=0]) an ImGui input scalar field-->
 +
[[ImGui.Core:inputText|ImGui:inputText]] ''an ImGui input text field''<br/><!--GIDEROSMTD:ImGui:inputText(label, text, bufferSize, [ImGuiInputTextFlags = 0]) an ImGui input text field-->
 +
[[ImGui.Core:inputTextMultiline|ImGui:inputTextMultiline]] ''an ImGui multiline input text''<br/><!--GIDEROSMTD:ImGui:inputTextMultiline(ImGui:inputTextMultiline(label, text, bufferSize, [w=0, h=0, ImGuiInputTextFlags=0]) an ImGui multiline input text-->
 +
[[ImGui.Core:inputTextWithHint|ImGui:inputTextWithHint]] ''an ImGui input text field with hint''<br/><!--GIDEROSMTD:ImGui:inputTextWithHint(label, text, hint, bufferSize, [ImGuiInputTextFlags=0]) an ImGui input text field with hint-->
 
[[ImGui.Core:invisibleButton|ImGui:invisibleButton]] ''an ImGui invisible button''<br/><!--GIDEROSMTD:ImGui:invisibleButton(string, w, h) an ImGui invisible button-->
 
[[ImGui.Core:invisibleButton|ImGui:invisibleButton]] ''an ImGui invisible button''<br/><!--GIDEROSMTD:ImGui:invisibleButton(string, w, h) an ImGui invisible button-->
 
[[ImGui.Core:labelText|ImGui:labelText]] ''displays an ImGui labelled text''<br/><!--GIDEROSMTD:ImGui:labelText(string, string) displays an ImGui labelled text-->
 
[[ImGui.Core:labelText|ImGui:labelText]] ''displays an ImGui labelled text''<br/><!--GIDEROSMTD:ImGui:labelText(string, string) displays an ImGui labelled text-->
[[ImGui:newFrame]] ''starts a new ImGui frame''<br/><!--GIDEROSMTD:ImGui:newFrame(dt) starts a new ImGui frame-->
+
[[ImGui.Core:newFrame|ImGui:newFrame]] ''starts a new ImGui frame''<br/><!--GIDEROSMTD:ImGui:newFrame(dt) starts a new ImGui frame-->
[[ImGui:render]] ''ends the ImGui frame, finalizes the draw data''<br/><!--GIDEROSMTD:ImGui:render() ends the ImGui frame, finalizes the draw data-->
+
[[ImGui.Core:progressBar|ImGui:progressBar]] ''an ImGui progress bar''<br/><!--GIDEROSMTD:ImGui:progressBar(fraction, anchorX, anchorY, overlayString) an ImGui progress bar-->
[[ImGui:setClassicStyle]] ''sets a classic color style''<br/><!--GIDEROSMTD:ImGui:setClassicStyle() sets a classic color style-->
+
[[ImGui.Core:radioButton|ImGui:radioButton]] ''ImGui radio button''<br/><!--GIDEROSMTD:ImGui:radioButton(text, number, number) ImGui radio button-->
[[ImGui:setDarkStyle]] ''sets a dark color style''<br/><!--GIDEROSMTD:ImGui:setDarkStyle() sets a dark color style-->
+
[[ImGui.Core:render|ImGui:render]] ''ends the ImGui frame, finalizes the draw data''<br/><!--GIDEROSMTD:ImGui:render() ends the ImGui frame, finalizes the draw data-->
[[ImGui:setLightStyle]] ''sets a light color style''<br/><!--GIDEROSMTD:ImGui:setLightStyle() sets a light color style-->
+
[[ImGui.Core:scaledImage|ImGui:scaledImage]] ''an ImGui scaled image''<br/><!--GIDEROSMTD:ImGui:scaledImage(texture, w, h, tintColor, alpha, borderColor, borderAlpha, anchorX, anchorY) an ImGui scaled image-->
[[ImGui:showAboutWindow]] ''adds an ImGui About window''<br/><!--GIDEROSMTD:ImGui:showAboutWindow() adds an ImGui About window, displaying ImGui version, credits and build/system information-->
+
[[ImGui.Core:scaledImageFilled|ImGui:scaledImageFilled]] ''an ImGui scaled image and filled''<br/><!--GIDEROSMTD:ImGui:scaledImageFilled(texture, w, h, tintColor, alpha, bgColor, bgAlpha, borderColor, borderAlpha, anchorX, anchorY) an ImGui scaled image and filled-->
[[ImGui:showDemoWindow]] ''adds an ImGui demo window''<br/><!--GIDEROSMTD:ImGui:showDemoWindow() adds an ImGui demo window-->
+
[[ImGui.Core:scaledImageButton|ImGui:scaledImageButton]] ''an ImGui scaled image button''<br/><!--GIDEROSMTD:ImGui:scaledImageButton(texture, w, h, padding, color, alpha, bgcColor, bgAlpha, anchorX, anchorY) an ImGui scaled image button-->
[[ImGui:showFontSelector]] ''adds a font selector block (not a window)''<br/><!--GIDEROSMTD:ImGui:showFontSelector(font) adds a font selector block (not a window)-->
+
[[ImGui.Core:scaledImageButtonWithText|ImGui:scaledImageButtonWithText]] ''an ImGui scaled image button and some text''<br/><!--GIDEROSMTD:ImGui:scaledImageButtonWithText(texture, text, w, h, padding, bgColor, bgAlpha, Color, alpha, anchorX, anchorY) an ImGui scaled image button and some text-->
[[ImGui:showMetricsWindow]] ''adds an ImGui metrics window''<br/><!--GIDEROSMTD:ImGui:showMetricsWindow() adds an ImGui metrics window-->
+
[[ImGui.Core:setClassicStyle|ImGui:setClassicStyle]] ''sets a classic color style''<br/><!--GIDEROSMTD:ImGui:setClassicStyle() sets a classic color style-->
[[ImGui:showStyleEditor]] ''adds the style editor block (not a window)''<br/><!--GIDEROSMTD:ImGui:showStyleEditor() adds the style editor block (not a window)-->
+
 
[[ImGui:showStyleSelector]] ''adds a style selector block (not a window)''<br/><!--GIDEROSMTD:ImGui:showStyleSelector(style) adds a style selector block (not a window)-->
+
[[ImGui.Core:setColorEditOptions|ImGui:setColorEditOptions]] ''sets the color edit options flag''<br/><!--GIDEROSMTD:ImGui:setColorEditOptions(ImGuiColorEditFlags) sets the color edit options flag-->
[[ImGui:showUserGuide]] ''adds basic help/info block (not a window)''<br/><!--GIDEROSMTD:ImGui:showUserGuide() adds basic help/info block (not a window)-->
+
 
 +
[[ImGui.Core:setDarkStyle|ImGui:setDarkStyle]] ''sets a dark color style''<br/><!--GIDEROSMTD:ImGui:setDarkStyle() sets a dark color style-->
 +
[[ImGui.Core:setLightStyle|ImGui:setLightStyle]] ''sets a light color style''<br/><!--GIDEROSMTD:ImGui:setLightStyle() sets a light color style-->
 +
[[ImGui.Core:showAboutWindow|ImGui:showAboutWindow]] ''adds an ImGui About window''<br/><!--GIDEROSMTD:ImGui:showAboutWindow() adds an ImGui About window, displaying ImGui version, credits and build/system information-->
 +
[[ImGui.Core:showDemoWindow|ImGui:showDemoWindow]] ''adds an ImGui demo window''<br/><!--GIDEROSMTD:ImGui:showDemoWindow() adds an ImGui demo window-->
 +
[[ImGui.Core:showFontSelector|ImGui:showFontSelector]] ''adds a font selector block (not a window)''<br/><!--GIDEROSMTD:ImGui:showFontSelector(font) adds a font selector block (not a window)-->
 +
[[ImGui.Core:showMetricsWindow|ImGui:showMetricsWindow]] ''adds an ImGui metrics window''<br/><!--GIDEROSMTD:ImGui:showMetricsWindow() adds an ImGui metrics window-->
 +
[[ImGui.Core:showStyleEditor|ImGui:showStyleEditor]] ''adds the style editor block (not a window)''<br/><!--GIDEROSMTD:ImGui:showStyleEditor() adds the style editor block (not a window)-->
 +
[[ImGui.Core:showStyleSelector|ImGui:showStyleSelector]] ''adds a style selector block (not a window)''<br/><!--GIDEROSMTD:ImGui:showStyleSelector(style) adds a style selector block (not a window)-->
 +
[[ImGui.Core:showUserGuide|ImGui:showUserGuide]] ''adds basic help/info block (not a window)''<br/><!--GIDEROSMTD:ImGui:showUserGuide() adds basic help/info block (not a window)-->
 +
[[ImGui.Core:sliderAngle|ImGui:sliderAngle]] ''displays an ImGui regular angle slider''<br/><!--GIDEROSMTD:ImGui:sliderAngle(label, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular angle slider-->
 +
[[ImGui.Core:sliderFloat|ImGui:sliderFloat]] ''displays an ImGui regular float slider''<br/><!--GIDEROSMTD:ImGui:sliderFloat(label, value, [min = 0, max = 0, formatString = "%.3f", ImGuiSliderFlags = 0]) displays an ImGui regular float slider-->
 +
[[ImGui.Core:sliderFloat2|ImGui:sliderFloat2]] ''displays 2 ImGui regular float sliders''<br/><!--GIDEROSMTD:ImGui:sliderFloat2(label, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 2 ImGui regular float sliders-->
 +
[[ImGui.Core:sliderFloat3|ImGui:sliderFloat3]] ''displays 3 ImGui regular float sliders''<br/><!--GIDEROSMTD:ImGui:sliderFloat3(label, value1, value2, value3, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 3 ImGui regular float sliders-->
 +
[[ImGui.Core:sliderFloat4|ImGui:sliderFloat4]] ''displays 4 ImGui regular float sliders''<br/><!--GIDEROSMTD:ImGui:sliderFloat4(label, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays 4 ImGui regular float sliders-->
 +
[[ImGui.Core:sliderInt|ImGui:sliderInt]] ''displays an ImGui regular int slider''<br/><!--GIDEROSMTD:ImGui:sliderInt(label, value, [min = 0, max = 0, formatString = "%d", ImGuiSliderFlags = 0]) displays an ImGui regular int slider-->
 +
[[ImGui.Core:sliderInt2|ImGui:sliderInt2]] ''displays 2 ImGui regular int sliders''<br/><!--GIDEROSMTD:ImGui:sliderInt2(label, value1, value2, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 2 ImGui regular int sliders-->
 +
[[ImGui.Core:sliderInt3|ImGui:sliderInt3]] ''displays 3 ImGui regular int sliders''<br/><!--GIDEROSMTD:ImGui:sliderInt3(label, value1, value2, value3, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 3 ImGui regular int sliders-->
 +
[[ImGui.Core:sliderInt4|ImGui:sliderInt4]] ''displays 4 ImGui regular int sliders''<br/><!--GIDEROSMTD:ImGui:sliderInt4(label, value1, value2, value3, value4, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays 4 ImGui regular int sliders-->
 
[[ImGui.Core:smallButton|ImGui:smallButton]] ''displays an ImGui small button''<br/><!--GIDEROSMTD:ImGui:smallButton(string) displays an ImGui small button-->
 
[[ImGui.Core:smallButton|ImGui:smallButton]] ''displays an ImGui small button''<br/><!--GIDEROSMTD:ImGui:smallButton(string) displays an ImGui small button-->
[[ImGui:text]] ''displays an ImGui text''<br/><!--GIDEROSMTD:ImGui:text(string) displays an ImGui text-->
+
[[ImGui.Core:text|ImGui:text]] ''displays an ImGui text''<br/><!--GIDEROSMTD:ImGui:text(string) displays an ImGui text-->
[[ImGui:textColored]] ''displays an ImGui colored text''<br/><!--GIDEROSMTD:ImGui:textColored(string, hex, alpha) displays an ImGui colored text-->
+
[[ImGui.Core:textColored|ImGui:textColored]] ''displays an ImGui colored text''<br/><!--GIDEROSMTD:ImGui:textColored(string, hex, alpha) displays an ImGui colored text-->
[[ImGui:textDisabled]] ''displays an ImGui disabled text''<br/><!--GIDEROSMTD:ImGui:textDisabled(string) displays an ImGui disabled text-->
+
[[ImGui.Core:textDisabled|ImGui:textDisabled]] ''displays an ImGui disabled text''<br/><!--GIDEROSMTD:ImGui:textDisabled(string) displays an ImGui disabled text-->
[[ImGui:textWrapped]] ''displays an ImGui wrapped text''<br/><!--GIDEROSMTD:ImGui:textWrapped(string) displays an ImGui wrapped text-->
+
[[ImGui.Core:textWrapped|ImGui:textWrapped]] ''displays an ImGui wrapped text''<br/><!--GIDEROSMTD:ImGui:textWrapped(string) displays an ImGui wrapped text-->
 +
[[ImGui.Core:vFilledSliderFloat|ImGui:vFilledSliderFloat]] ''displays an ImGui regular vertical filled float slider''<br/><!--GIDEROSMTD:ImGui:vFilledSliderFloat(label, mirrorFlag, w, h, value, min, max, [formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular vertical filled float slider-->
 +
[[ImGui.Core:vFilledSliderInt|ImGui:vFilledSliderInt]] ''displays an ImGui regular vertical filled int slider''<br/><!--GIDEROSMTD:ImGui:vFilledSliderInt(label, mirrorFlag, w, h, value, min, max, [formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular vertical filled int slider-->
 +
[[ImGui.Core:vSliderFloat|ImGui:vSliderFloat]] ''displays an ImGui regular vertical float slider''<br/><!--GIDEROSMTD:ImGui:vSliderFloat(label, w, h, value, min, max, [formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular vertical float slider-->
 +
[[ImGui.Core:vSliderInt|ImGui:vSliderInt]] ''displays an ImGui regular vertical int slider''<br/><!--GIDEROSMTD:ImGui:vSliderInt(label, w, h, value, min, max, [formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular vertical int slider-->
  
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
Line 62: Line 158:
 
ImGui._VERSION<br/><!--GIDEROSCST:ImGui._VERSION-->
 
ImGui._VERSION<br/><!--GIDEROSCST:ImGui._VERSION-->
  
'''Window Flags'''<br/>
+
'''Backend Flags''' [[ImGui.CONST.BackendFlags]]<br/>
ImGui.WindowFlags_AlwaysAutoResize<br/><!--GIDEROSCST:ImGui.WindowFlags_AlwaysAutoResize-->
+
'''Col Flags''' [[ImGui.CONST.Col]]<br/>
ImGui.WindowFlags_AlwaysHorizontalScrollbar<br/><!--GIDEROSCST:ImGui.WindowFlags_AlwaysHorizontalScrollbar-->
+
'''ColorEdit Flags''' [[ImGui.CONST.ColorEditFlags]]<br/>
ImGui.WindowFlags_AlwaysUseWindowPadding<br/><!--GIDEROSCST:ImGui.WindowFlags_AlwaysUseWindowPadding-->
+
'''Combo Flags''' [[ImGui.CONST.ComboFlags]]<br/>
ImGui.WindowFlags_AlwaysVerticalScrollbar<br/><!--GIDEROSCST:ImGui.WindowFlags_AlwaysVerticalScrollbar-->
+
'''Cond''' [[ImGui.CONST.Cond]]<br/>
ImGui.WindowFlags_HorizontalScrollbar<br/><!--GIDEROSCST:ImGui.WindowFlags_HorizontalScrollbar-->
+
'''Config Flags''' [[ImGui.CONST.ConfigFlags]]<br/>
ImGui.WindowFlags_MenuBar<br/><!--GIDEROSCST:ImGui.WindowFlags_MenuBar-->
+
'''Corner Flags''' [[ImGui.CONST.CornerFlags]]<br/>
ImGui.WindowFlags_NoBackground<br/><!--GIDEROSCST:ImGui.WindowFlags_NoBackground-->
+
'''Data Type''' [[ImGui.CONST.DataType]]<br/>
ImGui.WindowFlags_NoBringToFrontOnFocus<br/><!--GIDEROSCST:ImGui.WindowFlags_NoBringToFrontOnFocus-->
+
'''Dir''' [[ImGui.CONST.Dir]]<br/>
ImGui.WindowFlags_NoCollapse<br/><!--GIDEROSCST:ImGui.WindowFlags_NoCollapse-->
+
'''DragDrop Flags''' [[ImGui.CONST.DragDropFlags]]<br/>
ImGui.WindowFlags_NoDecoration<br/><!--GIDEROSCST:ImGui.WindowFlags_NoDecoration-->
+
'''Focused Flags''' [[ImGui.CONST.FocusedFlags]]<br/>
ImGui.WindowFlags_NoFocusOnAppearing<br/><!--GIDEROSCST:ImGui.WindowFlags_NoFocusOnAppearing-->
+
'''Glyph Ranges''' [[ImGui.CONST.GlyphRanges]]<br/>
ImGui.WindowFlags_NoInputs<br/><!--GIDEROSCST:ImGui.WindowFlags_NoInputs-->
+
'''Hovered Flags''' [[ImGui.CONST.HoveredFlags]]<br/>
ImGui.WindowFlags_NoMouseInputs<br/><!--GIDEROSCST:ImGui.WindowFlags_NoMouseInputs-->
+
'''InputText Flags''' [[ImGui.CONST.InputTextFlags]]<br/>
ImGui.WindowFlags_NoMove<br/><!--GIDEROSCST:ImGui.WindowFlags_NoMove-->
+
'''Item Flags''' [[ImGui.CONST.ItemFlags]]<br/>
ImGui.WindowFlags_NoNav<br/><!--GIDEROSCST:ImGui.WindowFlags_NoNav-->
+
'''Mouse Button''' [[ImGui.CONST.MouseButton]]<br/>
ImGui.WindowFlags_NoNavFocus<br/><!--GIDEROSCST:ImGui.WindowFlags_NoNavFocus-->
+
'''Mouse Cursor''' [[ImGui.CONST.MouseCursor]]<br/>
ImGui.WindowFlags_NoNavInputs<br/><!--GIDEROSCST:ImGui.WindowFlags_NoNavInputs-->
+
'''Nav Input''' [[ImGui.CONST.NavInput]]<br/>
ImGui.WindowFlags_None<br/><!--GIDEROSCST:ImGui.WindowFlags_None-->
+
'''Popup Flags''' [[ImGui.CONST.PopupFlags]]<br/>
ImGui.WindowFlags_NoResize<br/><!--GIDEROSCST:ImGui.WindowFlags_NoResize-->
+
'''Selectable Flags''' [[ImGui.CONST.SelectableFlags]]<br/>
ImGui.WindowFlags_NoSavedSettings<br/><!--GIDEROSCST:ImGui.WindowFlags_NoSavedSettings-->
+
'''Slider Flags''' [[ImGui.CONST.SliderFlags]]<br/>
ImGui.WindowFlags_NoScrollbar<br/><!--GIDEROSCST:ImGui.WindowFlags_NoScrollbar-->
+
'''Sort Direction''' [[ImGui.CONST.SortDirection]]<br/>
ImGui.WindowFlags_NoScrollWithMouse<br/><!--GIDEROSCST:ImGui.WindowFlags_NoScrollWithMouse-->
+
'''Style Var''' [[ImGui.CONST.StyleVar]]<br/>
ImGui.WindowFlags_NoTitleBar<br/><!--GIDEROSCST:ImGui.WindowFlags_NoTitleBar-->
+
'''TabBar Flags''' [[ImGui.CONST.TabBarFlags]]<br/>
ImGui.WindowFlags_UnsavedDocument<br/><!--GIDEROSCST:ImGui.WindowFlags_UnsavedDocument-->
+
'''TabItem Flags''' [[ImGui.CONST.TabItemFlags]]<br/>
 
+
'''Table Flags''' [[ImGui.CONST.TableFlags]]<br/>
'''Col Flags'''<br/>
+
'''TableBg Target''' [[ImGui.CONST.TableBgTarget]]<br/>
ImGui.Col_Border<br/><!--GIDEROSCST:ImGui.Col_Border-->
+
'''TableColumn Flags''' [[ImGui.CONST.TableColumnFlags]]<br/>
ImGui.Col_BorderShadow<br/><!--GIDEROSCST:ImGui.Col_BorderShadow-->
+
'''TableRow Flags''' [[ImGui.CONST.TableRowFlags]]<br/>
ImGui.Col_Button<br/><!--GIDEROSCST:ImGui.Col_Button-->
+
'''TE''' [[ImGui.CONST.TE]]<br/>
ImGui.Col_ButtonActive<br/><!--GIDEROSCST:ImGui.Col_ButtonActive-->
+
'''TreeNode Flags''' [[ImGui.CONST.TreeNodeFlags]]<br/>
ImGui.Col_ButtonHovered<br/><!--GIDEROSCST:ImGui.Col_ButtonHovered-->
+
'''Window Flags''' [[ImGui.CONST.WindowFlags]]<br/>
ImGui.Col_CheckMark<br/><!--GIDEROSCST:ImGui.Col_CheckMark-->
 
ImGui.Col_ChildBg<br/><!--GIDEROSCST:ImGui.Col_ChildBg-->
 
ImGui.Col_DragDropTarget<br/><!--GIDEROSCST:ImGui.Col_DragDropTarget-->
 
ImGui.Col_FrameBg<br/><!--GIDEROSCST:ImGui.Col_FrameBg-->
 
ImGui.Col_FrameBgActive<br/><!--GIDEROSCST:ImGui.Col_FrameBgActive-->
 
ImGui.Col_FrameBgHovered<br/><!--GIDEROSCST:ImGui.Col_FrameBgHovered-->
 
ImGui.Col_Header<br/><!--GIDEROSCST:ImGui.Col_Header-->
 
ImGui.Col_HeaderActive<br/><!--GIDEROSCST:ImGui.Col_HeaderActive-->
 
ImGui.Col_HeaderHovered<br/><!--GIDEROSCST:ImGui.Col_HeaderHovered-->
 
ImGui.Col_MenuBarBg<br/><!--GIDEROSCST:ImGui.Col_MenuBarBg-->
 
ImGui.Col_ModalWindowDimBg<br/><!--GIDEROSCST:ImGui.Col_ModalWindowDimBg-->
 
ImGui.Col_NavHighlight<br/><!--GIDEROSCST:ImGui.Col_NavHighlight-->
 
ImGui.Col_NavWindowingDimBg<br/><!--GIDEROSCST:ImGui.Col_NavWindowingDimBg-->
 
ImGui.Col_NavWindowingHighlight<br/><!--GIDEROSCST:ImGui.Col_NavWindowingHighlight-->
 
ImGui.Col_PlotHistogram<br/><!--GIDEROSCST:ImGui.Col_PlotHistogram-->
 
ImGui.Col_PlotHistogramHovered<br/><!--GIDEROSCST:ImGui.Col_PlotHistogramHovered-->
 
ImGui.Col_PlotLines<br/><!--GIDEROSCST:ImGui.Col_PlotLines-->
 
ImGui.Col_PlotLinesHovered<br/><!--GIDEROSCST:ImGui.Col_PlotLinesHovered-->
 
ImGui.Col_PopupBg<br/><!--GIDEROSCST:ImGui.Col_PopupBg-->
 
ImGui.Col_ResizeGrip<br/><!--GIDEROSCST:ImGui.Col_ResizeGrip-->
 
ImGui.Col_ResizeGripActive<br/><!--GIDEROSCST:ImGui.Col_ResizeGripActive-->
 
ImGui.Col_ResizeGripHovered<br/><!--GIDEROSCST:ImGui.Col_ResizeGripHovered-->
 
ImGui.Col_ScrollbarBg<br/><!--GIDEROSCST:ImGui.Col_ScrollbarBg-->
 
ImGui.Col_ScrollbarGrab<br/><!--GIDEROSCST:ImGui.Col_ScrollbarGrab-->
 
ImGui.Col_ScrollbarGrabActive<br/><!--GIDEROSCST:ImGui.Col_ScrollbarGrabActive-->
 
ImGui.Col_ScrollbarGrabHovered<br/><!--GIDEROSCST:ImGui.Col_ScrollbarGrabHovered-->
 
ImGui.Col_Separator<br/><!--GIDEROSCST:ImGui.Col_Separator-->
 
ImGui.Col_SeparatorActive<br/><!--GIDEROSCST:ImGui.Col_SeparatorActive-->
 
ImGui.Col_SeparatorHovered<br/><!--GIDEROSCST:ImGui.Col_SeparatorHovered-->
 
ImGui.Col_SliderGrab<br/><!--GIDEROSCST:ImGui.Col_SliderGrab-->
 
ImGui.Col_SliderGrabActive<br/><!--GIDEROSCST:ImGui.Col_SliderGrabActive-->
 
ImGui.Col_Tab<br/><!--GIDEROSCST:ImGui.Col_Tab-->
 
ImGui.Col_TabActive<br/><!--GIDEROSCST:ImGui.Col_TabActive-->
 
ImGui.Col_TabHovered<br/><!--GIDEROSCST:ImGui.Col_TabHovered-->
 
ImGui.Col_TableBorderLight<br/><!--GIDEROSCST:ImGui.Col_TableBorderLight-->
 
ImGui.Col_TableBorderStrong<br/><!--GIDEROSCST:ImGui.Col_TableBorderStrong-->
 
ImGui.Col_TableHeaderBg<br/><!--GIDEROSCST:ImGui.Col_TableHeaderBg-->
 
ImGui.Col_TableRowBg<br/><!--GIDEROSCST:ImGui.Col_TableRowBg-->
 
ImGui.Col_TableRowBgAlt<br/><!--GIDEROSCST:ImGui.Col_TableRowBgAlt-->
 
ImGui.Col_TabUnfocused<br/><!--GIDEROSCST:ImGui.Col_TabUnfocused-->
 
ImGui.Col_TabUnfocusedActive<br/><!--GIDEROSCST:ImGui.Col_TabUnfocusedActive-->
 
ImGui.Col_Text<br/><!--GIDEROSCST:ImGui.Col_Text-->
 
ImGui.Col_TextDisabled<br/><!--GIDEROSCST:ImGui.Col_TextDisabled-->
 
ImGui.Col_TextSelectedBg<br/><!--GIDEROSCST:ImGui.Col_TextSelectedBg-->
 
ImGui.Col_TitleBg<br/><!--GIDEROSCST:ImGui.Col_TitleBg-->
 
ImGui.Col_TitleBgActive<br/><!--GIDEROSCST:ImGui.Col_TitleBgActive-->
 
ImGui.Col_TitleBgCollapsed<br/><!--GIDEROSCST:ImGui.Col_TitleBgCollapsed-->
 
ImGui.Col_WindowBg<br/><!--GIDEROSCST:ImGui.Col_WindowBg-->
 
 
|}
 
|}
  
 
----
 
----
 
'''[[Dear ImGui]]'''
 
'''[[Dear ImGui]]'''

Latest revision as of 05:00, 12 October 2023

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 the ImGui main class.


PLEASE NOTE THE DOCUMENTATION IS WORK IN PROGRESS


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.

Methods

ImGui.new initializes ImGui

ImGui:arrowButton displays an ImGui arrow button
ImGui:beginWindow pushes Window to the stack and starts appending to it
ImGui:beginTable pushes a Table to the stack and starts appending to it
ImGui:bullet displays an ImGui bullet
ImGui:bulletText displays an ImGui bulleted text
ImGui:button displays an ImGui button
ImGui:checkbox displays an ImGui checkbox
ImGui:colorButton displays an ImGui color button
ImGui:colorEdit3 displays an ImGui RGB color edit widget
ImGui:colorEdit4 displays an ImGui RGBA color edit widget
ImGui:colorPicker3 displays an ImGui RGB color picker widget
ImGui:colorPicker4 displays an ImGui RGBA color picker widget
ImGui:combo displays a ImGui combo box
ImGui:dragFloat displays an ImGui drag float slider
ImGui:dragFloat2 displays 2 ImGui drag float sliders
ImGui:dragFloat3 displays 3 ImGui drag float sliders
ImGui:dragFloat4 displays 4 ImGui drag float sliders
ImGui:dragFloatRange2 displays 2 ImGui drag float range sliders
ImGui:dragInt displays an ImGui drag int slider
ImGui:dragInt2 displays 2 ImGui drag int sliders
ImGui:dragInt3 displays 3 ImGui drag int sliders
ImGui:dragInt4 displays 4 ImGui drag int sliders
ImGui:dragIntRange2 displays 2 ImGui drag int range sliders
ImGui:dragScalar displays an ImGui drag scalar slider
ImGui:endFrame ends an ImGui Frame
ImGui:endTable pops a Table from the stack
ImGui:endWindow pops a Window from the stack
ImGui:filledSliderAngle displays an ImGui regular filled angle slider
ImGui:filledSliderFloat displays an ImGui regular filled float slider
ImGui:filledSliderFloat2 displays two ImGui regular filled float sliders
ImGui:filledSliderFloat3 displays three ImGui regular filled float sliders
ImGui:filledSliderFloat4 displays four ImGui regular filled float sliders
ImGui:filledSliderInt displays an ImGui regular filled int slider
ImGui:filledSliderInt2 displays two ImGui regular filled int sliders
ImGui:filledSliderInt3 displays three ImGui regular filled int sliders
ImGui:filledSliderInt4 displays four ImGui regular filled int sliders
ImGui:getIO accesses the IO structure (mouse/keyboard/gamepad inputs...)
ImGui:getStyle accesses the Style structure (colors, sizes)
ImGui:image an ImGui image
ImGui:imageButton displays an ImGui image button
ImGui:imageButtonWithText displays an ImGui image button with some text
ImGui:imageFilled an ImGui filled image
ImGui:inputDouble an ImGui input double field
ImGui:inputFloat an ImGui input float field
ImGui:inputFloat2 two ImGui input float fields
ImGui:inputFloat3 three ImGui input float fields
ImGui:inputFloat4 four ImGui input float fields
ImGui:inputInt an ImGui input int field
ImGui:inputInt2 two ImGui input int fields
ImGui:inputInt3 three ImGui input int fields
ImGui:inputInt4 four ImGui input int fields
ImGui:inputScalar an ImGui input scalar field
ImGui:inputText an ImGui input text field
ImGui:inputTextMultiline an ImGui multiline input text
ImGui:inputTextWithHint an ImGui input text field with hint
ImGui:invisibleButton an ImGui invisible button
ImGui:labelText displays an ImGui labelled text
ImGui:newFrame starts a new ImGui frame
ImGui:progressBar an ImGui progress bar
ImGui:radioButton ImGui radio button
ImGui:render ends the ImGui frame, finalizes the draw data
ImGui:scaledImage an ImGui scaled image
ImGui:scaledImageFilled an ImGui scaled image and filled
ImGui:scaledImageButton an ImGui scaled image button
ImGui:scaledImageButtonWithText an ImGui scaled image button and some text
ImGui:setClassicStyle sets a classic color style

ImGui:setColorEditOptions sets the color edit options flag

ImGui:setDarkStyle sets a dark color style
ImGui:setLightStyle sets a light color style
ImGui:showAboutWindow adds an ImGui About window
ImGui:showDemoWindow adds an ImGui demo window
ImGui:showFontSelector adds a font selector block (not a window)
ImGui:showMetricsWindow adds an ImGui metrics window
ImGui:showStyleEditor adds the style editor block (not a window)
ImGui:showStyleSelector adds a style selector block (not a window)
ImGui:showUserGuide adds basic help/info block (not a window)
ImGui:sliderAngle displays an ImGui regular angle slider
ImGui:sliderFloat displays an ImGui regular float slider
ImGui:sliderFloat2 displays 2 ImGui regular float sliders
ImGui:sliderFloat3 displays 3 ImGui regular float sliders
ImGui:sliderFloat4 displays 4 ImGui regular float sliders
ImGui:sliderInt displays an ImGui regular int slider
ImGui:sliderInt2 displays 2 ImGui regular int sliders
ImGui:sliderInt3 displays 3 ImGui regular int sliders
ImGui:sliderInt4 displays 4 ImGui regular int sliders
ImGui:smallButton displays an ImGui small button
ImGui:text displays an ImGui text
ImGui:textColored displays an ImGui colored text
ImGui:textDisabled displays an ImGui disabled text
ImGui:textWrapped displays an ImGui wrapped text
ImGui:vFilledSliderFloat displays an ImGui regular vertical filled float slider
ImGui:vFilledSliderInt displays an ImGui regular vertical filled int slider
ImGui:vSliderFloat displays an ImGui regular vertical float slider
ImGui:vSliderInt displays an ImGui regular vertical int slider

Events

ImGui.KeyChar
ImGui.KeyDown
ImGui.KeyUp
ImGui.MouseDown
ImGui.MouseHover
ImGui.MouseMove
ImGui.MouseUp
ImGui.MouseWheel
ImGui.TouchBegin
ImGui.TouchEnd
ImGui.TouchCancel
ImGui.TouchMove

Constants

ImGui._VERSION

Backend Flags ImGui.CONST.BackendFlags
Col Flags ImGui.CONST.Col
ColorEdit Flags ImGui.CONST.ColorEditFlags
Combo Flags ImGui.CONST.ComboFlags
Cond ImGui.CONST.Cond
Config Flags ImGui.CONST.ConfigFlags
Corner Flags ImGui.CONST.CornerFlags
Data Type ImGui.CONST.DataType
Dir ImGui.CONST.Dir
DragDrop Flags ImGui.CONST.DragDropFlags
Focused Flags ImGui.CONST.FocusedFlags
Glyph Ranges ImGui.CONST.GlyphRanges
Hovered Flags ImGui.CONST.HoveredFlags
InputText Flags ImGui.CONST.InputTextFlags
Item Flags ImGui.CONST.ItemFlags
Mouse Button ImGui.CONST.MouseButton
Mouse Cursor ImGui.CONST.MouseCursor
Nav Input ImGui.CONST.NavInput
Popup Flags ImGui.CONST.PopupFlags
Selectable Flags ImGui.CONST.SelectableFlags
Slider Flags ImGui.CONST.SliderFlags
Sort Direction ImGui.CONST.SortDirection
Style Var ImGui.CONST.StyleVar
TabBar Flags ImGui.CONST.TabBarFlags
TabItem Flags ImGui.CONST.TabItemFlags
Table Flags ImGui.CONST.TableFlags
TableBg Target ImGui.CONST.TableBgTarget
TableColumn Flags ImGui.CONST.TableColumnFlags
TableRow Flags ImGui.CONST.TableRowFlags
TE ImGui.CONST.TE
TreeNode Flags ImGui.CONST.TreeNodeFlags
Window Flags ImGui.CONST.WindowFlags


Dear ImGui