Commit Graph

11921 Commits

Author SHA1 Message Date
ocornut
36d4913c85 ImStrv: Combo(), ListBox(): seems better to not introduce the ImStrv [] versions?
As 1) user is unlikely to store that on their end. 2) nowadays with lambdas isn't an easy user-side conversion.
Then we limit explosion of an already messy API.
2026-09-09 21:26:06 +02:00
ocornut
56eb4c9357 ImStrv: convert Combo()/ListBox() to use ImStrv in their getters.
Didn't convert Combo() "const char* items_separated_by_zeros" as this doesn't translate well when used via a ImStrv constructor, may actually aim to obsolete.
Fixed for shadowing local variable warning on 2025/06/25.
2026-09-09 21:26:06 +02:00
ocornut
2ef1ba81ac ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2026-09-09 21:26:05 +02:00
ocornut
ed2fae996f ImStrv: backtracked for now on supporting ImStrv for format strings.
It's widely incomplete and slow, requires a printf function taking non-zero-terminated format string to work.
Might do it eventually but it's much less a problem than labels. Format string are more frequently inlined in code and tend to be small, so existing solutions at call site can work better for now.
2026-09-09 21:26:05 +02:00
璀境石
90c8a40143 ImStrv: enhanced VS debugger .natvis support. build fixes. (5333, 5906) 2026-09-09 21:26:05 +02:00
ocornut
fac8cee755 ImStrv: standardized code doing format copy, optimized ImStrStr 2026-09-09 21:26:05 +02:00
ocornut
84ccc62ad8 ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings. 2026-09-09 21:26:05 +02:00
ocornut
675348f183 ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()
This is mostly for the benefit of cimgui parser, ideally we would do without.
2026-09-09 21:26:04 +02:00
ocornut
46efe961e8 ImStrv: Step 2 - change ImStrv typedef to struct, perform all other logic conversion.
Squashed commits (initially a commit from rokups + many rework by ocornut. keeping them separate commits made rebasing unnecessarily tricking so merged from 2024/02)
ImStrv: many fixes (see details), added imconfig class extension example, added natvis description.
ImStrv: rework toward ensuring End is always set to constant can be compile time calculated
ImStrv: using length(), fix ambiguous empty() function, fix altered behaviors, removed unused operators.
ImStrv: various tweaks and fixes. removed ImGuiTextRange from ImGuiTextFilter, fix test engine hooks, removed constructor only used twice.
2026-09-09 21:26:04 +02:00
Rokas Kupstys
758c14efd5 ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2026-09-09 21:26:03 +02:00
ocornut
367b2c24f3 Merge branch 'master' into docking 2026-09-09 21:25:09 +02:00
ocornut
e8602501bb Mixed Value: various fixes. (#5518, #5677, #6865)
- With MixedValue+LiveEdit: a single edit that ends up with same output reports as edited.
- Standardize path sin TempInputscalar(), InputScalar(), InputTextEx().
- Refer to changes in imgui_test_suite, in particular "widgets_datatype_1", "widgets_status_liveedit_off",
2026-09-09 20:44:34 +02:00
ocornut
ea6d21687b BeginComboPreview(): fixed issues with nesting. Previous comments were wrong. (#1658, #4168) 2026-09-08 21:52:23 +02:00
ocornut
db5b735a5d (Breaking) BeginComboPreview: removed ImGuiComboFlags_CustomPreview: now unnecessary + better detect issues (#1658, #4168) 2026-09-08 19:38:42 +02:00
ocornut
32c3f6095a BeginComboPreview: set/restore WorkRect.Max.x. (#1658, #4168) 2026-09-08 17:44:56 +02:00
ocornut
148d128f6e Mixed Value: use ImGuiCol_TextMixedValue (= ImGuiCol_TextDisabled). Set MixedValueLabel to null to display original value. (#5518, #5677, #6865) 2026-09-08 16:47:04 +02:00
ocornut
a2b7d6e792 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_metal.mm
#	backends/imgui_impl_metal4.mm
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdlgpu3.cpp
#	backends/imgui_impl_vulkan.cpp
#	imgui.cpp
2026-09-07 19:52:24 +02:00
ocornut
334f484892 ColorEdit4, ColorPicker4: added support for ImGuiItemFlags_MixedValue. (#5518, #5677, #6865) 2026-09-07 19:48:28 +02:00
ocornut
dd32dace81 InputText: using MixedValue automatically sets ImGuiInputTextFlags_AutoSelectAll. (#5518, #5677, #6865) 2026-09-07 19:09:24 +02:00
ocornut
04b37d6d23 Added ImGuiItemFlags_MixedValue support for Drags, Sliders, InputScalar, InputText, RadioButton, Combo. (#5518, #5677, #6865) 2026-09-07 18:56:32 +02:00
ocornut
9090ba71e5 Fixed Tesselation -> Tessellation in comments. 2026-09-07 16:38:38 +02:00
ocornut
53d421955f Amend Changelog. (#8564, #9534) 2026-09-07 16:23:01 +02:00
ocornut
687f7fb8ac Drags, Sliders: ongoing drags may be cancelled using Right-Mouse mouse button, reverting to the initial value. (#8564, #9534) 2026-09-07 16:16:55 +02:00
Lukasz Stalmirski
4ebb04333b IO: restore default platform handlers on ClearPlatformHandlers. (#9537, #8945, #2769)
Amend d4f722d5b.
2026-09-07 13:05:15 +02:00
ocornut
4898533613 Backends: DX10, DX11, DX12, Metal/4, OpenGL2/3, SDLGPU3, Vulkan: round framebuffer dimensions instead of truncating. (#9538, #9515, #8628) 2026-09-07 12:47:03 +02:00
SlowRiot
080319c4ce Backends: WebGPU: round framebuffer dimensions instead of truncating. (#9538, #9515, #8628) 2026-09-07 12:38:02 +02:00
ocornut
96b6eb7728 Fixed PVS-Studio false positives.
Not sure if there's a way to report them.
2026-09-04 12:37:48 +02:00
ocornut
f150bf09f9 Drags, Sliders: ongoing drags may be cancelled using Escape or Gamepad Triangle, reverting to the initial value. (#8564, #9534) 2026-09-04 12:24:49 +02:00
ocornut
51c3c0c992 Sliders: moved code from SliderBehaviorT() to SliderBehavior().
Remove a level of indent too.
2026-09-03 17:28:48 +02:00
Lukasz Stalmirski
5316e70614 Backends: Vulkan: support multiple Vulkan contexts with custom loader. (#6616)
Vulkan function calls now go through a short trampoline function, only apply when IMGUI_IMPL_VULKAN_USE_LOADER is set.
2026-09-03 17:01:15 +02:00
slowriot
7edd2b1f12 Sliders, Drags: adjust ScaleValueFromRatioT() to increase remapping precision (in theory). (#9536)
Omar: couldn't detect any output difference in test suite with large u64/s64 ranges drag/sliders.
I believe this is entirely theoretical and it's principal value is to shut Linter warnings
2026-09-03 15:42:24 +02:00
ocornut
1807b25b9a ScaleValueFromRatioT: removed unnecessary check, amend f27af1b20. 2026-09-03 15:29:37 +02:00
ocornut
7e1b65d26d Merge branch 'master' into docking
# Conflicts:
#	imgui_internal.h
2026-09-02 17:27:51 +02:00
ocornut
4dbb921b22 Examples: disabled /JMC in Visual Studio projects (unnecessary overhead). 2026-09-02 17:15:39 +02:00
ocornut
e2e9533991 Added IM_NODEBUGSTEP helper. Tagged ImVec2, ImVec4, ImRect and various operators.
cc #3038. Amend 1bc6f82091, 301c956039
2026-09-02 17:13:47 +02:00
ocornut
a15761f11c TreeNode: fixed UB shifts and general tree issues when using ImGuiTreeNodeFlags_DrawLinesXXX flags and over 32 deep. (#9509)
+ fix minor typo (#9533)
2026-09-01 20:06:02 +02:00
ocornut
f562ab8e32 DrawList: reworked assert in PushTexture() to allow convenience grace period of using texture already queued for destroy during the same frame. (#9528, #8465)
Amend 131f5c57ab
2026-09-01 16:22:14 +02:00
nilFinx
e0537bf72b Fixed build issue with MacPorts Clang 16 (missing TARGET_OS_OSX). (#9498) 2026-08-31 18:42:46 +02:00
ocornut
ebc7307db5 ColorButton, RenderColorRectWithAlphaCheckerboard: fixed issues/inconsistencies with checkerboard rendering when combining color alpha and global style alpha. (#9511)
Cleanup hacks in ColorButton(). Amend d851775c80, e9ff7162b.
2026-08-31 18:04:03 +02:00
ocornut
fd74775a0d ColorButton: fixed double style alpha multiply. Remove call to GetColorU32() in RenderColorRectWithAlphaCheckerboard() for consistency. (#9511)
The main fix is the change from GetColorU32() to ColorConvertFloat4ToU32() in calling code.
The change from GetColorU32() to manual multiply in RenderColorRectWithAlphaCheckerboard() is merely for consistency with other ::Render calls.
2026-08-31 17:29:10 +02:00
ocornut
19ead810d2 ColorButton, ColorEdit, ColorPicker: cancel-out alpha caused by BeginDisabled() so disabled color buttons have the same color. (#9511) 2026-08-31 17:29:10 +02:00
ocornut
7e0de0e411 Examples: GLFW/SDL2/SDL3+WebGPU: fixed running with wgpu-native missing wgpuInstanceWaitAny(). (#9377) 2026-08-31 12:30:37 +02:00
ocornut
35a13e9948 Backends, Examples: WebGPU: further simplications. (#9377, #9532, #9530)
Suggested by @lucascompython
2026-08-31 12:23:26 +02:00
ocornut
e44b1129bd Backends, Examples: WebGPU: fixed warnings, renamed .sln, fixed SDL2+WGPU cmakefile. 2026-08-31 12:11:39 +02:00
ocornut
6d1f88fe4a Backends: WebGPU: update to build with wgpu-native 29.0+. (#9532, #9530) 2026-08-31 11:56:01 +02:00
ocornut
760dff3244 Docs: misc additions. 2026-08-31 11:32:24 +02:00
ocornut
d3c5ff395c Drags, Sliders: fixed an overflow using ImGuiSliderFlags_Logarithmic with S32/S64 types. (#9526, #3361, #1823, #1316, #642) 2026-08-30 19:44:15 +02:00
ocornut
1e51b6ffdc Comments/fixes about using IMGUI_DEFINE_MATH_OPERATORS in imconfig.h (#9524) 2026-08-28 12:40:14 +02:00
ocornut
0af8f475d1 Fixed GetBackgroundDrawList()/GetForegroundDrawList() not being properly reset every frame when cumulated session time is very large. (#9521)
Using a FrameCount for compare. Kept time as float to be consistent with other GC-related timestamps: if there is an actual need to use double we'll switch everywhere.
2026-08-23 13:05:33 +02:00
ocornut
fd13a1e892 Merge branch 'master' into docking
# Conflicts:
#	examples/example_apple_opengl2/main.mm
2026-08-19 13:39:46 +02:00