100 Commits
Author SHA1 Message Date
Rokas Kupstysandocornut 8ff7f35eec CI: run imgui_test_suite as part of CI build. 2025-11-20 14:35:48 +01:00
Rokas Kupstysandocornut e8448d0494 CI: general update + rename steps. 2025-11-20 14:33:23 +01:00
Rokas Kupstysandocornut b3ea01d86f Menus: Fix sub-menu inhibition stopping working in some cases. (Amend WIP) (#2517, #5614, noticed in #5546)
Amend bda2cde6
Fixes the case where following menu hover sequence results in incorrect RestoreNavWindow (previously SourceWindow) pointing to opened sub-menu:
1. Hover "Menu -> Options" - Open ##Menu_01 window
2. Hover "Menu -> Colors"  - SourceWindow incorrectly points to ##Menu_01 window
2022-09-01 17:02:46 +02:00
Rokas Kupstysandocornut 0e95cf0dec Fix appending to windows causing a child window to be inserted to g.WindowsFocusOrder which eventually causes a crash. (#5515, #3496, #4797)
Amend a528398
2022-08-03 14:44:05 +02:00
Rokas Kupstysandocornut e926a664d5 TabBar: Allow closing entire TabBar (possible docking only) when it contains user-appended buttons. (#5515)
In docking branch we mass-call TabBarCloseTab(). Amend b26f1530. Standardize Changelog entries.
2022-08-02 19:30:01 +02:00
Rokas Kupstysandocornut 37a07858a9 Nav: Fixed inability to cancel nav in modal popups. (#5400) 2022-06-17 14:58:26 +02:00
Rokas Kupstysandocornut 0b1bcfcc20 Menus: Separate menu sets by nav layer. (#3496, #4797) + Demo: Remove incorrect and useless suggestion to use PushID().
Fixes a common case where opening menu in one nav layer and hovering a menu in another nav layer would open that menu without a click.
2022-06-08 17:17:54 +02:00
Rokas Kupstysandocornut 74f7ac04a1 Misc: Fix font compressor utility warnings. (#5359) 2022-05-31 14:25:40 +02:00
Rokas Kupstysandocornut f58bd817e2 Tables: Fix drawcall merging of last column. (#4843, #4844)
Amend 83d22f4e
2022-05-31 14:22:23 +02:00
Rokas Kupstysandocornut b7686a88e9 Backends: OpenGL3: Fix state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING and vertex attribute states.
This change partially reverts 9770c8b21d.
2022-05-13 18:03:18 +02:00
rokupsandocornut d768b8c812 Backends: Metal: Align code more closely with other backends. OSX: Add missing return for mouse pos events.
'#if __has_feature(objc_arc)' was removed as callback gets required reference via ImGui_ImplMetal_GetBackendData() so that weakref is not really needed.
2022-05-04 16:40:35 +02:00
Rokas Kupstysandocornut 1ad8ad623e Backends: GLFW: Fixed keyboard modifiers events being reported incorrectly on Linux/X11. 2022-03-23 16:09:42 +01:00
Rokas Kupstysandocornut c5f67218bf Backends: SDL: Fix multi-viewport dragging issue with SDL on some systems. (v2 for master, using bd->MouseButtonsDown == 0) (#5012, #5082)
# Conflicts:
#	backends/imgui_impl_sdl.cpp
#	docs/CHANGELOG.txt
2022-03-22 18:08:39 +01:00
Rokas Kupstysandocornut 6315716f23 Backends: Glut: Fix comparison operator precedence. 2022-03-01 15:20:40 +01:00
Rokas Kupstysandocornut 40fd163a3b Backends: OpenGL3: Fix OpenGL ES2 includes on Apple systems.
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
2022-02-07 12:26:19 +01:00
rokupsandocornut 551ab84c2d Backends: OSX: Fix building with old Xcode versions.
Builds have failed on Xcode versions that do not yet support `@available` or do not have new APIs (that are unavailable on target OS version) defined at all. Using true build time version checks fixes these issues.
2022-01-31 14:41:56 +01:00
Rokas Kupstysandocornut 19471da3fd Popups: Fix a crash when a new window is created after a modal on the same frame. (#4920) 2022-01-20 15:03:56 +01:00
Rokas Kupstysandocornut 0e8c199e87 CI: Use regex to fix vcxproj platform and toolset versions. (#3249) Remove Discord integration. 2021-12-13 14:58:23 +01:00
Rokas Kupstysandocornut b38af0f522 Popups: Fix popups being closed by newly appearing windows. (#4317)
* Popups/modals now remain open when new windows are created from within popup/modal begin stack.
* Modals are not closed when new window appears behind active modal.
Tested by "window_popup_interruptions"
2021-12-07 15:52:13 +01:00
Rokas Kupstysandocornut 5c388c39f4 Backends: SDL_Renderer: Added support for large meshes (64k+ vertices) with 16-bit indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in this backend. (#3926) 2021-12-03 12:28:03 +01:00
Rokas Kupstysandocornut 4d9a3b19d5 Internals: Implement a continuable IM_DEBUG_BREAK on GCC for common archs. (#2673) 2021-11-22 12:35:07 +01:00
Rokas Kupstysandocornut 39b99072fb ImVector: fix Clang warning (implicit conversion changes signedness: 'const ptrdiff_t' (aka 'const long long') to 'unsigned long long') 2021-10-22 14:52:26 +02:00
Rokas Kupstysandocornut 13cdf2ff0e CI: Add MinGW DLL builds, 2021-10-13 17:24:08 +02:00
Rokas Kupstysandocornut be03b8ff93 Misc: Fix build with MinGW when using IMGUI_API. 2021-10-12 16:43:28 +02:00
Rokas Kupstysandocornut 15fe7ba31f ColorPicker: Fix not being able to pick exactly (1.0f, 1.0f, 1.0f) color by dragging toward the edges of the SV square. (#3517)
Old code attempted to mitigate hue/saturation resetting for colors where these components are undefined. Since we now explicitly back up and restore these components this workaround is no longer necessary.
2021-09-21 15:10:07 +02:00
Rokas Kupstysandocornut 30546bc0e7 ColorEdit: Fix multiple issues. (#4014)
* Change g.ColorEditLastColor type to ImU32 and store RGB color value.
  - Fixes inability to change hue when saturation is 0. (#4014)
  - Fixes edgecases where lossy color conversion prevent restoration of hue/saturation.
  - Fixes hue value jitter when modifying color using SV square.
* Fix hue resetting to 0 when it is set to 255 by explicitly restoring hue if it is 0 and previous value was 1.
* Further reduce hue jitter by restoring hue when color is modified using SV square.
2021-09-21 15:10:07 +02:00
Rokas Kupstysandocornut b08ed61907 CI: Build with empty IM_ASSERT() macro. 2021-08-27 16:21:17 +02:00
Rokas Kupstysandocornut 2b0bd40b99 Backends: Metal: Fixed a crash when clipping rect larger than framebuffer is submitted. (#4464)
Backends: Normalize clipping rect handling across backends.
+ Squashed amends.
2021-08-24 18:23:13 +02:00
Rokas Kupstysandocornut 4c22b3e5d9 Backends: OpenGL3: Fix gl3wProcs colliding with gl3w. (#4445) 2021-08-24 14:33:04 +02:00
Rokas Kupstysandocornut fc062e6028 Backends: OpenGL3: Update loader to include APIs used by test framework. 2021-08-20 17:22:27 +02:00
Rokas Kupstysandocornut 459de65477 Backends: OpenGL3: Embed our own minimal GL loader based on gl3w and use it in SDL/GLFW examples. (#4445)
Loader repository at https://github.com/dearimgui/gl3w_stripped
Removed support for using custom loaders in examples/opengl3 backend
2021-08-19 16:24:58 +02:00
Rokas Kupstysandocornut 86afe966d3 Metrics: Fixed a crash when inspecting the individual draw command of a foreground drawlist. 2021-08-17 16:23:26 +02:00
Rokas Kupstysandocornut 3e4c89051d Popups: Fix OpenPopup() being called after BeginPopup() resulting in a failure to open a popup when focus is NULL. (#4308)
Story of removed line begins in commit b80cf0a. It's purpose was to close popups when they lost focus.
Later on few other changes were introduced:
* bcc49ff - closing popups with RMB without changing window focus
* af679a1 - closing popups in FocusWindow()
These two changes covered all the cases of popup closing which made deleted line obsolete. Conveniently, now all popup closing is handled from within UpdateMouseMovingWindowEndFrame() either by calling FocusWindow() or ClosePopupsOverWindow().
2021-07-26 11:43:39 +02:00
Rokas Kupstysandocornut 5dd1e38b7a Disabled: disabled items set HoveredId, allowing e.g. HoveredIdTimer to function. (#211, #3419) + Menus: fix hovering a disabled menu or menu item not closing other menus.
Rework of https://github.com/rokups/imgui/commit/c24b470
Note that the declared intent of that commit "Prevents window from being dragged if mouse hovers a disabled item." was already fullfilled by a876ad87.
Changes in ButtonBehavior() not needed anymore since ImGuiButtonFlags_Disabled is gone
2021-07-09 19:54:46 +02:00
rokupsandocornut 88f4c1321a Examples: Bring code of example_apple_metal and example_apple_opengl2 closer to each other. (#1873, #3543) 2021-06-28 14:22:55 +02:00
rokupsandocornut 30224fdde0 Examples: example_apple_opengl2: Fix keys remaining stuck in pressed state when using shortcuts with CMD. (#4253)
Fix follows event capture scheme of example_apple_metal, where this issue is not present.
2021-06-25 11:34:12 +02:00
Rokas Kupstysandocornut 0b8a247074 Backends: OSX: Added a fix for shortcuts using CTRL key instead of CMD key. (#4253) 2021-06-23 15:25:10 +02:00
Rokas Kupstysandocornut d5828cd988 SplitterBehavior: fix using IsItemHovered() after SplitterBehavior() 2021-06-16 15:42:42 +02:00
Rokas Kupstysandocornut 4c420f3cf9 CI: Add a build of imgui_impl_vulkan.cpp with IMGUI_IMPL_VULKAN_NO_PROTOTYPES defined. (#4151, #3759, #3227) 2021-05-25 16:01:25 +02:00
Rokas Kupstysandocornut 21428ad3f4 Nav, InputText: Fixed accidental menu toggling while typing non-ascii characters using AltGR. (#370) 2021-04-23 18:50:46 +02:00
rokupsandocornut 6d53884487 Backends: OSX: Fix keys remaining stuck in pressed state when CMD-tabbing to a different application. (#3832) 2021-04-19 15:15:23 +02:00
Rokas Kupstysandocornut bcdc8bcc4b Examples: Vulkan: Update GPU selection to pick discrete GPU if available, or use first GPU otherwise. (#4012)
Fixes examples failing on optimus laptops with integrated graphics not supporting Vulkan.
2021-04-07 14:39:01 +02:00
Rokas Kupstysandocornut 475c0fcc39 TabBar: Use mouse position instead of hardcoded +1/-1 offset when reordering tabs.
Fixes tab reordering in test engine when using fast mode.
2021-03-25 19:12:49 +01:00
Rokas Kupstysandocornut 0c5b0c8b97 Internals: Add a way to request window to not process any interactions for specified number of frames. 2021-03-18 14:19:23 +01:00
Rokas Kupstysandocornut 1bc6f82091 Misc: added imgui.gdb and imgui.natstepfilter debugger helpers for gdb and msvc. 2021-03-12 17:03:16 +01:00
Rokas Kupstysandocornut c2d6d26139 ImDrawList: upgraded AddRect(), AddRectFilled(), PathRect() to use general ImDrawFlags instead of ImDrawCornersFlags 2021-03-11 16:03:32 +01:00
Rokas Kupstysandocornut 01a2bac7d5 DrawList: Replace "bool close" in drawing functions with flags. 2021-03-10 12:57:01 +01:00
Rokas Kupstysandocornut 8ee77f1b65 Widgets: Sliders: Skip custom stb_sprintf.h format flags (', #, _) in RoundScalarWithFormatT() as they break ImAtof()/ImAtoi() and cause Drag*()/Slider*() widgets display incorrect values. (#3604)
Widgets: Sliders: Fix a bug where numbers after format specifier (eg. %d123) would cause RoundScalarWithFormatT() return incorrect value.
2021-03-05 18:06:54 +01:00
Rokas Kupstysandocornut b53b8f58df Demo: Use correct string formats on non-windows platforms.
(amended)
2021-03-04 18:40:46 +01:00
Rokas Kupstysandocornut 3f5bb5939a Examples: Fix MinGW detection in makefiles. Fix example_null build due to missing IME input libs. (#2590) 2021-02-24 17:18:53 +01:00
Rokas Kupstysandocornut 9576dfd5e7 CI: Use workflow_run to trigger scheduled builds and static analysis.
Scheduled builds now are triggered by a dummy "scheduled" workflow that is invoked by the timer. This gives forks an ability to disable scheduled builds while maintaining ability to perform CI builds in forked repository. Similarly static analysis is invoked on completion of "build" workflow, ensuring analysis is performed with every build. Also should build workflow triggers change, we do not need to replicate same changes in static analysis workflow file.
2021-02-16 14:39:16 +01:00
Rokas Kupstysandocornut 066406b9be Backends: OSX: Fix mouse position not being reported when mouse buttons other than left one are down. (#3762)
# Conflicts:
#	docs/CHANGELOG.txt
2021-01-27 12:44:42 +01:00
Rokas Kupstysandocornut 8690d1f9ce Tables: Fix sort specs sometimes incorrectly reporting sort spec count when table loses _MultiSortable flag during runtime. 2020-12-04 19:15:22 +01:00
Rokas Kupstysandocornut a3e8dc3f34 CI: Fix deployment of PVS-Studio license + fix reported error. 2020-11-13 12:51:55 +01:00
Rokas Kupstysandocornut a3f79104df Examples: Apple+Metal: Forward events to OS key combinations like CMD+Q can work. (#3554) 2020-11-11 15:30:08 +01:00
Rokas Kupstysandocornut 9cca1b2e97 Replace UTF-8 decoder with one based on branchless version by Christopher Wellons. (not branchless anymore tho)
Decoding performance increase ~30%
2020-11-03 14:43:08 +01:00
Rokas Kupstysandocornut 6f57d58e82 Backends: OSX: Fix KeyPadEnter on MacOS. (#3554) 2020-10-28 12:31:10 +01:00
Rokas Kupstysandocornut b3576dd354 Replace UTF-8 decoder with branchless version by Christopher Wellons.
Decoding performance increase ranges from 30-40%.

Changes:
* Errors handling near the end of string changed. If input does not contain enough bytes, decoder returns `IM_UNICODE_CODEPOINT_INVALID`, consuming all remaining bytes while old decoder consumed only one byte.

Guarantees:
* At least one byte is consumed, if input had at least one byte available.
* Number of consumed bytes will never seek past end of string.

Requirements:
* `in_text` is a valid pointer.
* String pointed by `in_text` must be zero-terminated, or `in_text_end` is not NULL.
2020-10-23 13:10:37 +02:00
Rokas Kupstysandocornut c6f9c558ec CI: Use our own discord notifier. 2020-10-08 14:23:55 +02:00
Rokas Kupstysandocornut 3be352fc80 CI: Add discord notifications. 2020-09-30 14:58:18 +02:00
Rokas Kupstysandocornut b7b08f52a4 Fix popup and tooltip positioning when not fitting in the screen. 2020-09-17 11:01:15 +02:00
Rokas Kupstysandomar b2039aac67 Slider: Fixed to reach maximum value with inverted integer min/max ranges, both with signed and unsigned types. Added reverse Sliders to Demo. (#3432, #3449) 2020-09-07 17:57:23 +02:00
Rokas Kupstysandocornut 833eb771f2 Nav: Fix navigation resuming on first visible item when using gamepad.
In cases where navigation was requested with focused item out of view, clipping of current item rect resulted in an inverted rect, which was completely discarded and ImRect(0,0,0,0) was used as current point from which navigation scoring was calculated. IsInverted() check is completely removed as rect can no longer be inverted. Since rects are not initialized to ImRect(0,0,0,0) - old .Min.x != FLT_MAX check (which was changed in c7835dd189) is not necessary either.
2020-08-26 11:30:08 +02:00
Rokas Kupstysandocornut 021c28ae39 Nav: Fix ScrollToBringRectIntoView() not bringing entire item into view when nav moves to the left. Correct some comments. 2020-08-25 16:48:49 +02:00
Rokas Kupstysandomar 0d03e1fafa CI: Fix emscripten builds that broke due behavior change of emscripten SDK. 2020-07-07 13:06:02 +02:00
Rokas Kupstysandomar 0738611559 Misc: Bunch of code formatting changes suggested by a pass running 'astyle' 2020-06-30 16:37:21 +02:00
Rokas Kupstysandomar 6b0cf2e6ae Windows: Fix unintended window size changes when resizing windows close to main viewport edges. 2020-06-25 22:16:19 +02:00
Rokas Kupstysandocornut 5af8a8c7e8 CI: Extra warnings for builds with Clang. Backends: OpenGL3: Fix sign conversion warnings. 2020-06-05 15:50:12 +02:00
Rokas Kupstysandocornut dc49b14e29 Misc: Fix examples of using other OpenGL3 bindings in Makefiles. 2020-06-05 14:05:39 +02:00
Rokas Kupstysandocornut 6b688561aa CI: Test building without C++ runtime on GCC/Clang. 2020-05-25 14:43:18 +02:00
Rokas Kupstysandomar a6f4b0fd70 Nav, Menus: Fix vertical wrap-around in menus or popups created with multiple appending calls to BeginMenu()/EndMenu() or BeginPopup/EndPopup(). (#3223, #1207)
First call to EndPopup() called NavRequestTryWrapWindow() which performed wrap-around operation while we were not done composing menu. This resulted in navigation wrapping around to first item.
Since wrap-around operation is only valid in last call to EndPopup() and there is no way to know which call is last - this operation is delayed to the end of the frame.
2020-05-11 15:30:12 +02:00
Rokas Kupstysandomar 794bf7a28d CI: Implement builds with IMGUI_DISABLE_WIN32_FUNCTIONS, IMGUI_DISABLE_FILE_FUNCTIONS, IMGUI_USE_BGRA_PACKED_COLOR IM_VEC2_CLASS_EXTRA, IM_VEC4_CLASS_EXTRA and building library as a DLL. 2020-05-04 11:05:07 +02:00
Rokas Kupstysandomar 2593b6a1c8 Drag and Drop: Fix unintended fallback "..." tooltip during drag operation when drag source uses _SourceNoPreviewTooltip flags. (#3160) 2020-04-27 13:51:07 +02:00
Rokas Kupstysandomar ac5ffffc23 CI: Test builds with freetype on linux. 2020-03-19 11:05:53 +01:00
Rokas Kupstysandomar 75a65f6fb0 CI: Test build with large indices, obsolete functions disabled and demo/metrics windows disabled.
+ amend notes
2020-03-17 20:33:28 +01:00
Rokas Kupstysandocornut 0342a3c548 Menus: Implement BeginMenu() appending to existing menu when executed with same ID multiple times. (#1207) 2020-02-28 16:35:33 +01:00
Rokas Kupstysandomar 21b9e42964 Minor fixes to example_sdl_metal and a changelog entry.
Add example_sdl_metal to CI builds.

Closes #3017.
2020-02-10 16:53:37 +01:00
Rokas Kupstysandomar 83efdcec8d Canceling text input with [esc] key uses stb_textedit facilities to restore original value. This makes restoration undoable using hotkeys.
Fixes #3008.
2020-02-03 15:50:17 +01:00
Rokas Kupstysandomar 9cff4d6e5e Columns: ImDrawList::Channels* functions now work inside columns.
Use a private splitter in columns, paving way for removal of obsolete ImDrawList::Channels* functions.
2020-01-31 12:02:56 +01:00
Rokas Kupstysandomar 7a22767483 CI: Add MSVC extra warnings build and correct labels of other extra warnings builds. 2020-01-22 14:17:03 +01:00
Rokas Kupstysandomar f03c00bc89 Added imgui_single_file.h, We use this to validate compiling all *.cpp in same compilation unit.
Removed Unity builds stuff from example_null/. CI builds a temporary .cpp file.
2020-01-10 19:04:35 +01:00
Rokas Kupstysandomar 97a8dc6514 CI: Added PVS-Studio static analysis on the continuous-integration server. 2020-01-10 16:58:39 +01:00
Rokas Kupstysandomar ae1e3619f6 Disable some PVS studio warnings.
V1048: While they are technically correct we want to emphasize assigned values must remain same.
2020-01-10 15:20:08 +01:00
Rokas Kupstysandomar 00c515f51a Add glbinding build sample to Makefiles of GL3 examples. (#2870) 2020-01-09 16:26:42 +01:00
Rokas Kupstysandomar 32c33c6659 ColorEdit: Preserve last saturation value when V=0. Disable Hue editing lock.
This workaround is no longer necessary because preserving hue value prevents it from resetting when it is edited in said condition.
2020-01-07 21:26:15 +01:00
Rokas Kupstysandomar 5e2329b98e Backends: GL3: Implement glbinding opengl loader support. (#2870) 2020-01-07 21:06:37 +01:00
Rokas Kupstysandomar e254167afd ColorEdit: Fix label alignment when using ImGuiColorEditFlags_NoInputs. (#2955) 2020-01-06 16:26:14 +01:00
Rokas Kupstysandomar 3831d50ab9 Add ImBezierClosestPoint() function which returns a point on bezier curve which is closed to a specified point. 2019-12-17 16:22:02 +01:00
Rokas Kupstysandomar 03b7170dac Backends: GLFW: Added workaround for people who use development version of GLFW which is older than commit that added required cursor support. (#2922) 2019-12-06 15:12:26 +01:00
Rokas Kupstysandomar 945a509773 Implement ImGuiMouseCursor_NotAllowed mouse cursor. 2019-12-05 15:32:10 +01:00
Rokas Kupstysandomar b5cad20d79 Implement new GLFW 3.4 resizing cursors. 2019-12-05 15:27:09 +01:00
Rokas Kupstysandomar bf6d1ba3d1 CI: Add 32/64 bit build variations to builds with extra warnings. 2019-11-27 16:20:19 +01:00
Rokas Kupstysandomar 1742ca45c5 CI: Add unity builds test. (#2893) 2019-11-27 16:18:52 +01:00
Rokas Kupstysandomar 1615e9ea2a CI: Enable extended warnings in example_null builds.
CI: Add MinGW build with extra warnings on windows.

(cherry picked from commit ebc98c273054d0f9b305a1346db98052616a8b21)
2019-11-25 16:38:21 +01:00
Rokas Kupstysandomar c9182424a8 Normalize all the line endings.
(cherry picked from commit f1772d44be09fd78bf5f1ebda44b39b96180d319)
2019-11-04 15:28:31 +01:00
Rokas Kupstysandomar c9ffa62e1f Add .gitattributes with rules for line endings of files.
(cherry picked from commit f2a2be72b341f55c44a035b1257177d83489ea5c)
2019-11-04 15:28:25 +01:00
Rokas Kupstysandomar bcd752cfcc CI: Fix emscripten builds after portable SDK archive became unavailable.
(cherry picked from commit 14b18697e653de80f75af18113033b2086846194)
2019-11-04 15:17:06 +01:00
Rokas Kupstysandomar 5006639526 CI: Add scheduled builds and limit some examples to build only on schedule in order to decrease time of builds performed on each push.
(cherry picked from commit 6c0e1baca29b853586dadf75eb32ef75e2725f10)
2019-10-30 15:58:03 +01:00
Rokas Kupstysandomar 5ebd4e4c6e CI: Install SDL SDK in windows workers and add SDL examples to the build.
CI: Add Vulkan GLFW and SDL builds to windows build job.
2019-10-30 15:58:03 +01:00
Rokas Kupstysandomar a4420be1a2 CI: Split builds of examples into separate jobs.
(cherry picked from commit ee73b1b5a47f176ab123239aa3cbcc2cdf284383)
2019-10-30 15:57:16 +01:00