Difference between revisions of "ImGui.Core"
(35 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
This is the ImGui main class. | This is the ImGui main class. | ||
+ | '''note''': the extension ''.Core'' in the Wiki is for organisational purposes only. ''ImGui.Core'' is '''ImGui''' | ||
− | ''' | + | '''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''' | '''Widgets: Regular Sliders''' | ||
Line 16: | Line 24: | ||
If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 | If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361 | ||
− | |||
'''Widgets: Drag Sliders''' | '''Widgets: Drag Sliders''' | ||
Line 35: | Line 42: | ||
[[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.Core:beginWindow|ImGui:beginWindow]] ''pushes | + | [[ImGui.Core:beginDisabled|ImGui:beginDisabled]] ''starts a stack that can be disabled''<br/><!--GIDEROSMTD:ImGui:beginDisabled(disabledFlag) starts a stack that can be disabled--> |
+ | [[ImGui.Core:beginWindow|ImGui:beginWindow]] ''pushes a 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:beginTabBar|ImGui:beginTabBar]] ''pushes a TabBar to the stack and starts appending to it''<br/><!--GIDEROSMTD:ImGui:beginTabBar(str_id [, ImGui.TabBarFlags = 0]) pushes a TabBar 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: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.Core:checkbox|ImGui:checkbox]] ''displays an ImGui checkbox''<br/><!--GIDEROSMTD:ImGui:checkbox(text, flag) displays an ImGui checkbox--> | [[ImGui.Core:checkbox|ImGui:checkbox]] ''displays an ImGui checkbox''<br/><!--GIDEROSMTD:ImGui:checkbox(text, flag) displays an ImGui checkbox--> | ||
+ | [[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.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.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: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: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: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--> | ||
Line 52: | Line 67: | ||
[[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: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: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 | + | [[ImGui.Core:endDisabled|ImGui:endDisabled]] ''ends a stack that can be disabled''<br/><!--GIDEROSMTD:ImGui:endDisabled() ends a stack that can be disabled--> |
− | [[ImGui.Core:endWindow|ImGui:endWindow]] ''pops | + | [[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: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: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:getStyle|ImGui:getStyle]] ''accesses the Style structure (colors, sizes)''<br/><!--GIDEROSMTD:ImGui:getStyle() accesses the Style structure (colors, sizes)--> | ||
Line 63: | Line 86: | ||
[[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: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: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.Core:newFrame|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.Core:progressBar|ImGui:progressBar]] ''an ImGui progress bar''<br/><!--GIDEROSMTD:ImGui:progressBar(fraction, anchorX, anchorY, overlayString) an ImGui progress bar--> | [[ImGui.Core:progressBar|ImGui:progressBar]] ''an ImGui progress bar''<br/><!--GIDEROSMTD:ImGui:progressBar(fraction, anchorX, anchorY, overlayString) an ImGui progress bar--> | ||
+ | [[ImGui.Core:radioButton|ImGui:radioButton]] ''ImGui radio button''<br/><!--GIDEROSMTD:ImGui:radioButton(text, number, number) ImGui radio button--> | ||
[[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.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.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.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--> | ||
Line 73: | Line 110: | ||
[[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.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.Core:setClassicStyle|ImGui:setClassicStyle]] ''sets a classic color style''<br/><!--GIDEROSMTD:ImGui:setClassicStyle() sets a classic color style--> | [[ImGui.Core:setClassicStyle|ImGui:setClassicStyle]] ''sets a classic color style''<br/><!--GIDEROSMTD:ImGui:setClassicStyle() sets a classic color style--> | ||
+ | |||
+ | [[ImGui.Core:setColorEditOptions|ImGui:setColorEditOptions]] ''sets the color edit options flag''<br/><!--GIDEROSMTD:ImGui:setColorEditOptions(ImGuiColorEditFlags) sets the color edit options flag--> | ||
+ | |||
[[ImGui.Core:setDarkStyle|ImGui:setDarkStyle]] ''sets a dark color style''<br/><!--GIDEROSMTD:ImGui:setDarkStyle() sets a dark color style--> | [[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:setLightStyle|ImGui:setLightStyle]] ''sets a light color style''<br/><!--GIDEROSMTD:ImGui:setLightStyle() sets a light color style--> | ||
+ | |||
+ | [[ImGui.Core:setNextWindowPos|ImGui:setNextWindowPos]] ''sets next windows position''<br/><!--GIDEROSMTD:ImGui:setNextWindowPos(x,y) sets next windows position--> | ||
+ | [[ImGui.Core:setNextWindowSize|ImGui:setNextWindowSize]] ''sets next windows size''<br/><!--GIDEROSMTD:ImGui:setNextWindowSize(w,h) sets next windows size--> | ||
+ | [[ImGui.Core:setNextWindowSizeConstraints|ImGui:setNextWindowSizeConstraints]] ''sets next windows size constraints''<br/><!--GIDEROSMTD:ImGui:setNextWindowSizeConstraints(min_w,min_h,max_w,max_h [,resize_callback,user_data]) sets next windows size constraints--> | ||
+ | |||
+ | |||
[[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: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:showDemoWindow|ImGui:showDemoWindow]] ''adds an ImGui demo window''<br/><!--GIDEROSMTD:ImGui:showDemoWindow() adds an ImGui demo window--> | ||
Line 96: | Line 142: | ||
[[ImGui.Core:textDisabled|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.Core:textWrapped|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: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--> | [[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--> | ||
Line 117: | Line 165: | ||
ImGui._VERSION<br/><!--GIDEROSCST:ImGui._VERSION--> | ImGui._VERSION<br/><!--GIDEROSCST:ImGui._VERSION--> | ||
− | ''' | + | '''Backend Flags''' [[ImGui.CONST.BackendFlags]]<br/> |
− | + | '''Col Flags''' [[ImGui.CONST.Col]]<br/> | |
− | + | '''ColorEdit Flags''' [[ImGui.CONST.ColorEditFlags]]<br/> | |
− | ImGui. | + | '''Combo Flags''' [[ImGui.CONST.ComboFlags]]<br/> |
− | + | '''Cond''' [[ImGui.CONST.Cond]]<br/> | |
− | ImGui. | + | '''Config Flags''' [[ImGui.CONST.ConfigFlags]]<br/> |
− | + | '''Corner Flags''' [[ImGui.CONST.CornerFlags]]<br/> | |
− | ImGui. | + | '''Data Type''' [[ImGui.CONST.DataType]]<br/> |
− | + | '''Dir''' [[ImGui.CONST.Dir]]<br/> | |
− | ImGui. | + | '''DragDrop Flags''' [[ImGui.CONST.DragDropFlags]]<br/> |
− | + | '''Focused Flags''' [[ImGui.CONST.FocusedFlags]]<br/> | |
− | ImGui. | + | '''Glyph Ranges''' [[ImGui.CONST.GlyphRanges]]<br/> |
− | + | '''Hovered Flags''' [[ImGui.CONST.HoveredFlags]]<br/> | |
− | ImGui. | + | '''InputText Flags''' [[ImGui.CONST.InputTextFlags]]<br/> |
− | + | '''Item Flags''' [[ImGui.CONST.ItemFlags]]<br/> | |
− | ImGui. | + | '''Mouse Button''' [[ImGui.CONST.MouseButton]]<br/> |
− | + | '''Mouse Cursor''' [[ImGui.CONST.MouseCursor]]<br/> | |
− | ImGui. | + | '''Nav Input''' [[ImGui.CONST.NavInput]]<br/> |
− | + | '''Popup Flags''' [[ImGui.CONST.PopupFlags]]<br/> | |
− | ImGui. | + | '''Selectable Flags''' [[ImGui.CONST.SelectableFlags]]<br/> |
− | + | '''Slider Flags''' [[ImGui.CONST.SliderFlags]]<br/> | |
− | ImGui. | + | '''Sort Direction''' [[ImGui.CONST.SortDirection]]<br/> |
− | + | '''Style Var''' [[ImGui.CONST.StyleVar]]<br/> | |
− | ImGui. | + | '''TabBar Flags''' [[ImGui.CONST.TabBarFlags]]<br/> |
− | + | '''TabItem Flags''' [[ImGui.CONST.TabItemFlags]]<br/> | |
− | + | '''Table Flags''' [[ImGui.CONST.TableFlags]]<br/> | |
− | ''' | + | '''TableBg Target''' [[ImGui.CONST.TableBgTarget]]<br/> |
− | ImGui. | + | '''TableColumn Flags''' [[ImGui.CONST.TableColumnFlags]]<br/> |
− | + | '''TableRow Flags''' [[ImGui.CONST.TableRowFlags]]<br/> | |
− | ImGui. | + | '''TE''' [[ImGui.CONST.TE]]<br/> |
− | + | '''TreeNode Flags''' [[ImGui.CONST.TreeNodeFlags]]<br/> | |
− | ImGui. | + | '''Window Flags''' [[ImGui.CONST.WindowFlags]]<br/> |
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | ImGui. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
---- | ---- | ||
'''[[Dear ImGui]]''' | '''[[Dear ImGui]]''' | ||
+ | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 07:52, 11 September 2024
Supported platforms:
Available since: Gideros 2020.9
Description
This is the ImGui main class.
note: the extension .Core in the Wiki is for organisational purposes only. ImGui.Core is ImGui
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.
MethodsImGui.new initializes ImGui ImGui:arrowButton displays an ImGui arrow button ImGui:setColorEditOptions sets the color edit options flag ImGui:setDarkStyle sets a dark color style ImGui:setNextWindowPos sets next windows position
|
EventsImGui.KeyChar ConstantsImGui._VERSION Backend Flags ImGui.CONST.BackendFlags |