Commit Graph

1363 Commits

Author SHA1 Message Date
ocornut
d0b1aaa076 Backends: GLFW: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
Namely, GLFW JS emulation seems to quantize values to a min of -1/+1 which breaks modern OSX/Windows emulating smoothness with stepping wheels (slow steps are sending sub-1.0 values)
+ Massage changelog.
2023-02-03 15:05:39 +01:00
ocornut
6584de4a78 Backends: SDL: Avoid calling SDL_SetCursor() when cursor has not changed. (#6113) 2023-02-02 21:28:28 +01:00
ocornut
1f1861dae6 Backends: Added support for SDL 2.0.18+ preciseX/preciseY mouse wheel data for smooth scrolling + scaling for Emscripten. (#4019, #6096)
+ Missing changelog entries.
2023-02-02 19:18:58 +01:00
ocornut
624c057ae1 Backends: GLFW: revert flipping mouse-wheel axis for Emscripten. (#4019)
Latest version seems ok.
2023-02-02 18:09:20 +01:00
ocornut
96ab68eee0 Examples: refactor all examples with a MainLoopStep() function, to facilitate use with Emscripten. (#2492, #3699)
Aligned all examples.
2023-02-02 17:30:48 +01:00
ocornut
0370856d78 Backends: GLFW: Removed mouse-wheel value scaling for Emscripten. (#4019, #6096, #6081) 2023-02-02 15:27:14 +01:00
ocornut
f822e07d76 Backends: SDL: Removed SDL_MOUSEWHEEL value clamping. (#4019, #6096, #6081)
+ Fix warnings.
2023-02-02 15:27:14 +01:00
ocornut
3617a96372 Backends, Inputs: Made horizontal scroll wheel and horizontal scroll direction consistent accross backends/os. (#4019, #6096, #1463)
Documented assumptions.
2023-02-01 21:29:08 +01:00
ocornut
8d29665ae1 Backends: OSX: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices).
Ref #4019 for details provided in .XLS sheet, although not strictly related to main issue topic.
+ Rename Emscripten demo titles to make SDL visible.
2023-02-01 19:43:03 +01:00
ocornut
5a3f82e2f4 Examples: SDL+SDL_Renderer: Added call to SDL_RenderSetScale() to display is correct on a Retina display (albeit lower-res as our other unmodified examples). (#6121, #6065, #5931). 2023-01-31 15:49:54 +01:00
ocornut
f142887088 Combo: Allow SetNextWindowSize() to alter combo popup size. (#6130)
Amend a5e939214
2023-01-31 11:23:24 +01:00
ocornut
27f2dd56d6 Internals: move "%s" skip-formatting logic to ImFormatStringToTempBuffer() function, meaning Text() and all the *V() functions can also benefit from it. (#3466)
Amend 645a6e0 and 23a785a.
2023-01-27 15:24:23 +01:00
Basil Fierz
d73e3285de Backends: WebGU: Revert the implicit render pipeline layout generation as introduced in 83bdfef (#6117, #4116, #3632)
The feature was removed from WebGPU (https://github.com/gpuweb/gpuweb/issues/2470)
2023-01-25 21:55:17 +01:00
ocornut
fc50532213 InputText: On OSX, inhibit usage of Alt key to toggle menu when active (used for work skip). 2023-01-25 21:44:30 +01:00
AJ Weeks
f4ef420c01 InputText: Added support for Ctrl+Delete to delete up to end of word. (#6067) 2023-01-25 14:41:38 +01:00
ocornut
07490618ae Misc: Tolerate zero delta-time under Emscripten. (#6114, #3644) 2023-01-25 14:13:12 +01:00
Mark Reid
fe0a24f38a Examples: Win32: Fixed examples using RegisterClassW() since 1.89 to also call DefWindowProcW(). (#5725, #5961, #5975)
Fixes the window title from being truncated on calls to Platform_SetWindowTitle. Stops the WM_SETTEXT message that happens when calling setWindowTextW from being interpreted as ascii.
2023-01-24 21:52:07 +01:00
ocornut
739a79b1e9 ImDrawList: Added missing early-out in AddPolyline() and AddConvexPolyFilled() when color alpha is zero. Window: Avoid rendering shapes for hidden resize grips. 2023-01-24 17:30:50 +01:00
ocornut
f6db9e2f39 Menus: Fixed layout of MenuItem()/BeginMenu() when label contains a '\n'. (#6116) 2023-01-24 16:11:38 +01:00
ocornut
91667430a8 Tables: increase table columns limit from 64 to 512 using bit array allocated in contiguous memory +. (#6094, #5305, #4876, #3572) 2023-01-21 00:41:54 +01:00
ocornut
3482d4eccf Text: Fixed layouting of wrapped-text block skipping successive empty lines. (#5720, #5919)
Regression in the bd96f6e fix
2023-01-19 15:59:39 +01:00
ocornut
51c97a41aa PlotHistogram, PlotLines: Passing negative sizes honor alignment like other widgets. 2023-01-18 15:13:23 +01:00
ocornut
1297a2be52 Text: Tweaked rendering of three-dots "..." ellipsis variant. Baking more data. (#2775, #4269)
Ideally we're bake a single glyph but it's currently difficult to setup in our font building process.
2023-01-11 16:37:47 +01:00
ocornut
8801f02949 Text: Fix clipping of single-character "..." ellipsis when font is scaled. (#2775 2023-01-11 15:56:33 +01:00
ocornut
482ac70a0b Version 1.89.3 WIP 2023-01-11 15:52:30 +01:00
ocornut
d7c8516a4b Version 1.89.2 2023-01-05 15:49:29 +01:00
ocornut
e06bbe05e1 Revert most/part of "Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo." (#456, #2637)
This reverts commit 0949acb6e6.

# Conflicts:
#	imgui.h
2023-01-05 15:21:48 +01:00
ocornut
57a5b73a4c InputText: fixed cursor navigation when pressing Up Arrow on the last character of a multiline buffer which doesn't end with a carriage return. (#6000)
Simplify stb_textedit_find_charpos(). Leaving that to simmer for a while before attempting an upstream PR.
2023-01-04 17:58:07 +01:00
ocornut
1f6e62a4ae Backends: GLFW: Fixed mods state on Linux with Alt-GR text input (e.g. German keyboard layout), (#6034)
Amend 07557674, 1ad8ad62
Ref maybe https://github.com/glfw/glfw/issues/1630
2023-01-04 15:43:41 +01:00
ocornut
9150c23c04 imgui_freetype: fixed a packing issue which in some occurrences would prevent large amount of glyphs from being packed correctly. (#5788, #5829)
This seemingly innocuous change sursingly had very large side-effects of completly breaking packing for the test font mentioned in above issue. Not even sure why tbh. New code matches what stb_truetype's stbtt_PackBegin() does.
2023-01-04 15:22:56 +01:00
ocornut
9c1dac3ff0 Examples: DirectX10, DirectX11: try WARP software driver if hardware driver is not available. (#5924, #5562) 2023-01-04 12:14:53 +01:00
Martin Ejdestig
e5d51866c6 Backends; Vulkan: do not set VkDescriptorSetLayoutBinding::pImmutableSamplers, allow changing sampler. (#6001, #5502, #914)
Follow up to c9aef16 which removec three funtions worth of duplicate code.
2023-01-02 16:30:10 +01:00
ocornut
317b33d647 Tables: fixed matching width of synchronized tables when only some (not all) instances have a vertical scrollbar. (#5920) 2022-12-08 20:06:26 +01:00
ocornut
0949acb6e6 Shortcut: added Shortcut() function and ImGuiInputFlags in public API + Demo. (#456, #2637) 2022-12-08 18:54:41 +01:00
ocornut
1dae7df26f Misc: added GetItemID() in public API. 2022-12-08 18:45:04 +01:00
ocornut
9d08506dce Tables, Nav: frozen columns are not part of menu layer and can be crossed over. (#5143, #3692)
Frozen rows (~header) still moving from menu to main layer based on freezing stat.e
2022-12-06 22:11:51 +01:00
ocornut
fd0b3734d3 Tables, Nav, Scrolling: fixed scrolling functions and focus tracking with frozen rows and columns. (#5143, #4868, #3692) 2022-12-06 21:07:50 +01:00
ocornut
24b873a740 Internals: renaming inside ScrollToRectEx() + fixed misplaced changelog entry. 2022-12-06 18:22:59 +01:00
ocornut
844e0ae688 Fixes/amend 9825f7f + amend Changelog (#4857, #5937) 2022-12-01 20:19:26 +01:00
ocornut
0e2a167bdb Fonts: added a 'void* UserData' field in ImFontAtlas, as a convenience for use by applications using multiple font atlases.
+ fixed mislocated Changelog entries added recently.
2022-12-01 20:10:37 +01:00
ocornut
9825f7fa87 Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with zero triangles. (#4857, #5937)
Amend b0a6cd6
2022-12-01 18:40:36 +01:00
assiduous
66ad2ad539 Properly detect SSE instruction support in 32-bit MSVC build. (#5943) 2022-12-01 17:41:38 +01:00
ocornut
45736443be Debug Tools: Metrics: added "Inputs" section, moved from Demo for consistency. 2022-11-30 20:14:52 +01:00
ocornut
87caf27ac4 Inputs, Scrolling: better selection of scrolling window when hovering nested windows and backend/OS is emitting dual-axis wheeling inputs. (#3795, #4559) 2022-11-30 17:49:59 +01:00
ocornut
a5f3596e6c Backends: Allegro5: use al_draw_indexed_prim() or al_draw_prim() depending on version. (#5937)
+ OSX comments (#5938)
Amend 185b4dde + 50aeeff
2022-11-30 14:46:45 +01:00
ocornut
bf4c2e00c0 Docs: retroactively update 1.89 changelog/docs to clarify that strong typing ImGuiKey was technically a breaking change for users of legacy indices. (#4921)
Amend 4b522e145
2022-11-29 21:36:59 +01:00
ocornut
1a497c2499 Inputs, IO: reworked ImGuiMod_Shortcut to redirect to Ctrl/Super at runtime instead of compile-time. (#5923, #456) 2022-11-29 19:07:50 +01:00
Teselka
969af7c773 Internal: Disable debug logs macro if IMGUI_DISABLE_DEBUG_TOOLS is defined. (#5901)
+ needed to rework clipper code to avoid "The 'then' statement is equivalent to the 'else' statement." PVS Studio warning.
2022-11-28 15:44:10 +01:00
ocornut
bd96f6eac4 Text: Fixed layouting of wrapped-text block when the last source line is above the clipping region. Regression added in 1.89. (#5720, #5919)
+ Update version marker
2022-11-28 14:59:13 +01:00
ocornut
a8df192df0 Version 1.89.1 2022-11-24 21:24:33 +01:00
ocornut
27c58c3946 Scrolling, Focus, Combo: fixed SetKeyboardFocusHere()/SetItemDefaultFocus()/ScrollToRectEx() during an appearing form not centering item. (#5902, #2812, #4242, #2900)
Amend 44f801186 and 8f495e554
2022-11-24 20:57:41 +01:00
kdchambers
233d7ad3f2 Backends: WebGPU: fixed validation error with default depth buffer settings. (#5869, #5914)
(initialize WGPUCompareFunction params to valid values)
2022-11-24 12:52:38 +01:00
ocornut
856c6314ec Drag and Drop: fixed GetDragDropPayload() returning a non-NULL value before payload is submitted. (#5910, #143)
+ Added test "widgets_dragdrop_new_payloads" in Test Suite.
2022-11-23 17:58:14 +01:00
ocornut
c3d9f8ee7e Layout: fixed End()/EndChild() incorrectly asserting if users manipulates cursor position inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (#5548, #5911) 2022-11-23 15:18:59 +01:00
ocornut
3a685749cb ColorEdit: fixed label overlapping when using style.ColorButtonPosition == ImGuiDir_Left. (#5912)
Amend 54fb051e5
+ Internals: added IsKeyboardKey(), IsMouseKey() helpers.
2022-11-23 15:00:50 +01:00
ocornut
16476f99fd Backends: GLFW: cancel out errors emitted by glfwGetKeyName() when a name is missing. (#5908) 2022-11-22 18:08:25 +01:00
ocornut
5bb2874940 Version 1.89.1 WIP 2022-11-16 17:55:27 +01:00
ocornut
7bee9a8f96 Inputs: fixed moving a window or drag and dropping from preventing input-owner-unaware code from accessing keys. (#5888, #4921, #456)
Amend 4448d97. This is more consistent with input owner design.
2022-11-16 17:53:35 +01:00
ocornut
d60985df7f Inputs: fix moving a window or drag and dropping from capture mods. (#5888, #4921, #456)
Amend change of SetActiveIdUsingAllKeyboardKeys() in 4448d97 which seemingly accidentally reverted the change intended by fd408c97
2022-11-16 17:41:24 +01:00
ocornut
81160fee56 Version 1.89
+ fix warning from a582d92
2022-11-15 15:20:36 +01:00
ocornut
a582d92c31 Inputs: modulate wheel lock timer for small amount of wheeling. Slightly lower timer. (#3795) 2022-11-15 14:19:29 +01:00
Peter Nimmervoll
00b6370848 Backends: WebGPU: fixed rendering when a depth buffer is enabled. (#5869) 2022-11-10 16:28:44 +01:00
ocornut
7380b9816e Scrolling: Exposed SetNextWindowScroll() in public API. (#1526) 2022-11-09 17:03:07 +01:00
ocornut
b8b0f9d02e Backends: OpenGL3: Reverted use of glBufferSubData(). (#4468, #4504, #3381, #2981, #4825, #4832, #5127) 2022-11-09 15:57:54 +01:00
ocornut
4448d975d1 Inputs: added wip/internal Input Owner system. (#456, #2637, #2620, #2891, #3370, #4828, #5108, #5242, #5641)
- Added SetKeyOwner(), SetItemKeyOwner(), TestKeyOwner().
- Added new IsKeyXXX IsMouseXXX functions with ImGuID owner_id and flags.
- Obsoleted SetItemUsingMouseWheel(). (#2891)
- Removed IsKeyPresseedEx() which was a recent internal addition 2022-07-08 deemed to be temporary exactly for this.
- Added ImGuiButtonFlags_NoSetKeyOwner, ImGuiButtonFlags_NoTestKeyOwner
- Added ImGuiSelectableFlags_NoSetKeyOwner.
- Added ImGuiInputFlags_LockThisFrame, ImGuiInputFlags_LockUntilRelease for for SetKeyOwner(), SetItemKeyOwner().
- Added ImGuiInputFlags_CondXXX values for SetItemKeyOwner().
2022-11-08 18:47:36 +01:00
ocornut
529cba19b0 Debug Tools: Added DebugLocateItem()/DebugLocateItemOnHover() to visually locate items when hovering a 0xXXXXXXXX value. (#5855, #2673, #4631) 2022-11-04 16:06:34 +01:00
ocornut
90e9465fa5 Window: Fixed position not being clamped while auto-resizing (#5843) 2022-11-02 12:36:41 +01:00
ocornut
6e9dfe1de1 Window: Auto-fit size takes account of work rectangle (menu bars eating from viewport). (#5843) 2022-11-02 12:36:22 +01:00
Akira Maezawa
86f2af2bc7 Backends: OSX: Fixed mouse coordinate before clicking on the host window. (#5842) 2022-11-02 12:02:39 +01:00
Rewtio
c2694ef75e Examples: Android: Using LoadIniSettingsFromMemory() / SaveIniSettingsToMemory() to save in appropriate location for Android. (#5836) 2022-10-31 11:47:05 +01:00
ocornut
a241dc7990 IO: Fixed AddFocusEvent(false) to also clear MouseDown[] state. (#4921) 2022-10-27 20:17:19 +02:00
ocornut
a61bbdc239 Commented out redirecting OpenPopupContextItem() which was briefly the name of OpenPopupOnItemClick() from 1.77 to 1.79. 2022-10-26 22:22:53 +02:00
ocornut
9a35bfea39 Internals: added temporary ImGuiItemStatusFlags_Visible (used internally - please do not use).
Used by BeginMenu() as I'm experimenting with blind menus honoring shortcuts.
Extra comments about KeyMap and ImGuiKeys
2022-10-21 14:57:10 +02:00
ocornut
e3fa56ae05 BeginMenu(): Menus: Fixed a one-frame issue where SetNextWindowXXX data are not consumed by a BeginMenu().
+ Shallow tweaks to reduce diff of future branches. Removing early return also facilitate some changes.
2022-10-19 14:12:04 +02:00
ocornut
5ac94ad898 Window: Fixed an issue where uncollapsed a window would show a scrollbar for a frame.
Amend / fix regression from 6e8e2c0
2022-10-18 16:43:38 +02:00
ocornut
ab6e48b833 Backends: GLFW: Perform a dummy glfwGetError() read to cancel missing mouse cursors errors. (#5785) 2022-10-18 12:21:31 +02:00
ocornut
08752b372e Menus, Popups: Experimental fix for issue where clicking on an open BeginMenu() item called from a window which is neither a popup neither a menu used to incorrectly close and reopen the menu. (#5775)
This works by moving the ClosePopupsOverWindow() in FocusWindow() in the if() block which luckily solves our problem.
In our test suite I couldn't find situation where this had side-effect others than BeginMenu() using the 'menuset_is_open' trick.
It's difficult to tell if other side-effects are possible: a window being already focused should mean it doesn't have popups overit.
Effectively this means that clicking e.g. on the BeginMenu() item to close a menu in a menu-bar now relies on BeginMenu() logic for the closure rather than FocusWindow() triggerd by button behavior.
2022-10-14 18:47:00 +02:00
ocornut
81176737f8 Menus: Fixed using IsItemHovered()/IsItemClicked() on BeginMenu(). (#5775) 2022-10-14 17:39:04 +02:00
ocornut
b15347cb7d Tables: activating an ID (e.g. clicking button inside) column doesn't prevent columns output flags from having ImGuiTableColumnFlags_IsHovered set. (#2957) 2022-10-13 15:15:42 +02:00
ocornut
3e8d198133 Removed runtime patching of obsolete/invalid "%f"/"%.0f" types of format strings for DragInt()/SliderInt(). 2022-10-12 23:09:09 +02:00
ocornut
dfa1bb0ac7 Backends: OSX: Fixed mouse inputs on flipped views. (#5756) 2022-10-06 14:28:14 +02:00
ocornut
c7d3d22ae1 Scrolling: Mitigated issue where multi-axis mouse-wheel inputs (usually from touch pad events) are incorrectly locking scrolling in a parent window. (#4559, #3795, #2604) 2022-10-04 15:41:57 +02:00
ocornut
80a870a3e5 Scrolling: Tweak mouse-wheel locked window timer so it is shorter but also gets reset whenever scrolling again (#2604) + small refactor
Somehow interesting for (#3795, #4559). sorry this will break PR for 3795 but we got the info.
2022-10-04 15:34:17 +02:00
ocornut
a588f00f7b Backends: Vulkan: Added experimental ImGui_ImplVulkan_RemoveTexture() for api symetry. (#914, #5738). 2022-10-04 12:02:48 +02:00
ocornut
f2a522d70d ImDrawList: Not using alloca() anymore, lift single polygon size limits. (#5704, #1811) 2022-09-30 15:58:55 +02:00
ocornut
cc5058e5d7 IO: Filter duplicate input events during the AddXXX() calls. (#5599, #4921) 2022-09-29 22:01:11 +02:00
ocornut
0749453355 Menus, Nav: Fixed not being able to close a menu with Left arrow when parent is not a popup. (#5730) 2022-09-29 19:51:54 +02:00
ocornut
bd2355a047 Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple BeginMenu() call with same names). (#1207) 2022-09-29 19:25:26 +02:00
ocornut
3532ed1621 Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item in parent when the parent is not a popup. (#5730)
Replace BeginMenu/MenuItem swapping g.NavWindow with a more adequate ImGuiItemFlags_NoWindowHoverableCheck.
Expecting more subtle issues to stem from this.
Note that NoWindowHoverableCheck is not supported by IsItemHovered() but then IsItemHovered() on BeginMenu() never worked: fix should be easy in BeginMenu() + add test is IsItemHovered(), will do later
2022-09-29 18:44:19 +02:00
Andrew D. Zonenberg
e74a50f525 Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (#5676, #5727) 2022-09-28 17:46:20 +02:00
ocornut
0a7054c7e4 Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode). (#5725, #1807, #471, #2815, #1060) 2022-09-28 17:04:42 +02:00
ocornut
a229a7f39f Examples: Win32: Always use RegisterClassW() to ensure windows are Unicode. (#5725) 2022-09-28 16:57:18 +02:00
ocornut
e0330c1696 Fonts, Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region. (#5720)
which would result in an abnormal number of vertices created.
2022-09-28 14:58:41 +02:00
ocornut
5c4426c5b8 Demo: Fixed Log & Console from losing scrolling position with Auto-Scroll when child is clipped. (#5721) 2022-09-28 12:22:44 +02:00
ocornut
12c0246890 Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (#255) 2022-09-28 12:08:21 +02:00
ocornut
04316bd223 ColorEdit3: fixed id collision leading to an assertion. (#5707) 2022-09-26 16:32:09 +02:00
ocornut
51bbc70652 Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows, and don't capture mouse when drag and dropping. (#5710) 2022-09-26 14:49:02 +02:00
ocornut
83a0030c0a Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (#456) 2022-09-26 10:43:26 +02:00
ocornut
fd408c9790 Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (#4921, #456)
Changed signature of GetKeyChordName() to use ImGuiKeyChord.
Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.
2022-09-26 10:43:26 +02:00
ocornut
85f327d8d3 InputText: added ImGuiInputTextFlags_EscapeClearsAll (#5688) 2022-09-21 16:23:44 +02:00
ocornut
60ab8a94a7 InputText: fixed minor one-frame selection glitch when reverting with Escape + disable cursor rendering on revert frame. (#3008)
Amend bdbb2b21, 83efdcec
2022-09-20 15:46:32 +02:00
ocornut
4b522e145c Experiment: ImGuiKey is now a typed enum, allowing ImGuiKey_XXX symbols to be named in debuggers. (#4921, #4537)
May affect binding generators.
2022-09-20 12:42:29 +02:00
ocornut
440f257688 Popups & Modals: fixed nested Begin() being erroneously input-inhibited. (useful for e.g. #718, #4461 and probably other things) 2022-09-16 22:08:11 +02:00
Javier Marín
a0e1591ac2 Fix more typos (#5679) 2022-09-13 11:23:49 +02:00
ocornut
091445a4a9 Examples: added all SDL examples to VS solution. 2022-09-13 10:46:30 +02:00
ocornut
513c1ba996 Removed the bizarre legacy default argument for 'TreePush(const void* ptr = NULL)' (#1057)
Followup to e605f2179
2022-09-12 16:00:19 +02:00
ocornut
3e6f948851 Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
Also fixed SetNextItemWidth(0.0f) not being consistent with tabs. (#5262)
2022-09-07 12:42:42 +02:00
ocornut
b137f31b8c Tabs: Fixed ShrinkWidths() redistribution of remainder leading to infinite bug + over redistribution. (#5652)
Amend c4b91017
2022-09-07 12:22:49 +02:00
ocornut
2171375f93 InputText: clarified that callbacks cannot modify buffer when using the ReadOnly flag. 2022-09-06 14:33:02 +02:00
Constantine Tarasenkov
b87e58fab3 ImGui::InputText: added support for shift+click style selection. (#5619)
(Amend, force-push: sorry wrong edit by omar)
2022-09-05 18:27:58 +02:00
ocornut
9e1ccf8fab Commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020): (#3361)
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4() with signature ending with (..., float power = 1.0f)
- SliderScalar(), SliderScalarN(), SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4() with signatures ending with (..., float power = 1.0f)
- BeginPopupContextWindow(const char*, ImGuiMouseButton, bool)
2022-09-05 14:38:00 +02:00
ocornut
edcd5b113e Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
This incorrect pattern has been mentioned or suggested in: #4510, #3355, #1760, #1490, #4152, #150
2022-09-02 16:37:35 +02:00
scorpion-26
5867a43dc8 Backends: GLFW: Honor GLFW_CURSOR_DISABLED by not setting mouse position. (#5625) 2022-09-01 20:50:08 +02:00
ocornut
9445776d61 Nav: Fixed an issue opening a menu with Right key from a non-menu window. 2022-09-01 20:42:10 +02:00
ocornut
03fc9a0b17 Menus: Fixed gaps in closing logic. (#5614)
The _MenuBar test introduced in c2cb2a69 doesn't appear to be meaningful.
2022-09-01 20:42:07 +02:00
Rokas Kupstys
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
ocornut
2569c64740 Demo: Improved "Constrained-resizing window" example, more clearly showcase aspect-ratio. (#5627, #5618) 2022-09-01 11:13:39 +02:00
ocornut
7f25143972 Better error reporting for PopStyleColor()/PopStyleVar() + easier to recover. (#1651) 2022-09-01 10:54:00 +02:00
ocornut
e13913ed57 IsItemHovered: Added ImGuiHoveredFlags_DelayNormal, ImGuiHoveredFlags_DelayShort, ImGuiHoveredFlags_NoSharedDelay. (#1485)
IsItemHovered() can't have a non-zero default, but higher-level tooltip helpers may enable a different default later.
2022-08-24 21:32:13 +02:00
ocornut
07b9999de9 Debug Log: added 'Clipper' events logging. 2022-08-23 15:40:07 +02:00
David Chavez
21b5fac57a Backends: Metal: Update deprecated property 'sampleCount'->'rasterSampleCount' (#5603) 2022-08-23 12:52:45 +02:00
ocornut
268565079c InputText: numerical fields automatically accept full-width characters (U+FF01..U+FF5E) by converting them to half-width (U+0021..U+007E). 2022-08-08 17:06:11 +02:00
ocornut
a396233cb6 Platform IME: Windows: Revert 133bbafa and 29a8ee08 as regression until new results comes. (#2589, #5535, #5264, #4972) 2022-08-08 12:42:57 +02:00
ocornut
839c31006b Debug Log: Added IO events logging. 2022-08-08 11:58:57 +02:00
ocornut
133bbafa3c Platform IME: Windows: Fixed a call to ImmAssociateContextEx() leading to freeze on some setups. (#2589, #5535, #5264, #4972)
+ misc comments
2022-08-08 11:31:48 +02:00
ocornut
4a2ae06ca4 Changed signature of ImageButton() function: Added 'const char* str_id' parameter + removed 'int frame_padding = -1' parameter. (#5533, #4471, #2464, #1390).
Also removed frame_padding parameter from ImageButtonEx(), amend e0ec69d8.
2022-08-03 21:04:33 +02:00
Rokas Kupstys
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 Kupstys
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
ocornut
6ab5fd1da9 Tables,Columns: fixed a layout issue where SameLine() prior to a row change would set the next row in such state where subsequent SameLine() would move back to previous row. 2022-07-18 17:40:52 +02:00
ocornut
1480bc5d4e Added ImGuiKey_MouseXXX aliases. (#4921) Reworked SetItemUsingMouseWheel() to use this for ActiveId. (#2891)
The rework of SetItemUsingMouseWheel() is half-complete since there's a HoveredIdUsingMouseWheel component. This will however be totally cleaned when we transtion to InputOwner system.
2022-07-08 18:32:25 +02:00
ocornut
8b8a61bdf9 Removed io.NavInputs[] and ImGuiNavInput enum. Kept inline redirection code. (#4921, #4858, #787, #1599, #323) 2022-07-08 16:02:07 +02:00
ocornut
a7a25ee19d Tools: Item Picker: Mouse button can be changed by holding Ctrl+Shift. (#2673) 2022-07-07 14:18:08 +02:00
ocornut
93f02ee0c6 Nav: Fixed moving window with gamepad or keyboard when running at very high framerate + removed ImGuiNavDirSourceFlags_RawKeyboard. 2022-07-06 16:46:57 +02:00
luigifcruz
82e10f1b61 Backends: Metal: Add dispatch synchronization. (#5447) 2022-07-05 15:24:37 +02:00
ocornut
467a1cd4a5 Misc: io.Framerate moving average now converge in 60 frames instead of 120. (#5236, #4138) 2022-07-01 17:09:58 +02:00
Stephen H. Gerstacker
67410d53f7 Backends: Metal, OSX: Various fixes (ARC / Autorelease fixes with metal-cpp and extensions). (#5403) 2022-06-30 20:16:45 +02:00
ocornut
609b935a8c InputText: added experimental io.ConfigInputTextEnterKeepActive feature to make pressing Enter keep the input active and select all text. 2022-06-30 15:47:54 +02:00
ocornut
24dfe6db8a Version 1.89 WIP 2022-06-27 16:55:55 +02:00
ocornut
9aae45eb4a Version 1.88
(fix "Show Debug Log" checkbox in Metrics window)
2022-06-21 18:11:50 +02:00
ocornut
d51e5d2898 TabItem: revert support for SetNextItemOpen(true) at it creates too much ambiguity with p_open/close button vs Selected state. (#5262)
Revert a small part of 4b97296.
2022-06-21 17:20:06 +02:00
ocornut
c4b9101759 TabBar: Tweak shrinking policy so that while resizing tabs that don't need shrinking keep their initial width more precisely.
Has been the case before but adding support for SetNextItemWidth() #5262 made this more noticeable.
2022-06-21 17:13:13 +02:00
ocornut
4b97296148 TabBar: TabItem() now reacts to SetNextItemWidth() and SetNextItemOpen(true). (#5262) 2022-06-21 17:13:12 +02:00
ocornut
d3fd2630b7 Sliders: An initial click within the knob/grab doesn't shift its position. (#1946, #5328) + Adjust default GrabMinSize. 2022-06-20 18:13:10 +02:00
Rokas Kupstys
37a07858a9 Nav: Fixed inability to cancel nav in modal popups. (#5400) 2022-06-17 14:58:26 +02:00
ocornut
07efd7cc20 Renamed IMGUI_DISABLE_METRICS_WINDOW to IMGUI_DISABLE_DEBUG_TOOLS. 2022-06-15 16:02:55 +02:00
ocornut
27343efb0b Nav, Focus: Changed SetKeyboardFocusHere() to not behave if a drag or window moving is in progress + move KeepAliveID() call from Scrollbar() to ScrollbarEx() 2022-06-15 15:25:07 +02:00
ocornut
ddcff10343 Settings: Fixed some SetNextWindowPos/SetNextWindowSize API calls not marking settings as dirty. 2022-06-15 14:30:20 +02:00
ocornut
1d6e34f3f9 Debug: Added ShowDebugLogWindow().
Internal: renamed old IMGUI_DEBUG_LOG() to IMGUI_DEBUG_PRINT().
Amended once.
2022-06-13 19:05:55 +02:00
ocornut
076d8fc868 Nav: Fixed issues with nav request being transferred to another window when calling SetKeyboardFocusHere() and simultaneous changing window focus. (#4449) 2022-06-10 19:25:53 +02:00
Rokas Kupstys
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
ocornut
a35e876978 InputText: Amends and tidying up: Fixed undo/redo state corruption when editing buffer in user callback. (#4947, #4949) 2022-06-08 15:27:36 +02:00
ocornut
64d6c30562 InputText: Fixed an undo-state corruption issue when editing buffer before reactivating item. (#4947) + Metrics: Added "InputText" section. 2022-06-07 15:34:21 +02:00
ocornut
65c4c0a490 IO: Added SetAppAcceptingEvents() function (#4921, #4858) 2022-06-02 16:56:00 +02:00
Warren Moore
7354009a73 Backends: Metal: Fixed null dereference inside command buffer completion handler. (#5363, #5365) 2022-06-01 00:40:22 +02:00
Rokas Kupstys
f58bd817e2 Tables: Fix drawcall merging of last column. (#4843, #4844)
Amend 83d22f4e
2022-05-31 14:22:23 +02:00
Quantum
e23c5edd5f Settings: Fixed out-of-bounds read when .ini file on disk is empty. (#5351) 2022-05-29 21:58:39 +02:00
ocornut
697ce2d67b InputText: Fixed a one-frame display glitch where pressing Escape to revert after a deletion would lead to small garbage being displayed for one frame. (#3008)
Curiously very old, amend 83efdce and bdbb2b2. Using stb_ functions updated ->CurLenA without updating ->TextA, leading to `buf_display_end = buf_display + state->CurLenA;` in the display.
Since f3ab5e62 they are 1 case out of 4 which didn't apply back to ->TextA and this is essentially the one where we ensure appliance. Another solution would be to alter the lower display code, but applying to TextA makes things more consistent.
2022-05-25 18:39:00 +02:00
ocornut
ca222d30c8 Backends: OpenGL: Partially revert 1.86 change of using glBufferSubData(): now only done on Intel GPUs. (#4468, #3381, #2981, #4825, #4832, #5127)
Essentially reverts 389982eb for non-Intel GPUs + update imgui_impl_opengl3_loader.h
Amended once (force-pushed).
2022-05-23 12:47:40 +02:00
ocornut
7bf07d2526 Renamed CaptureMouseFromApp() and CaptureKeyboardFromApp() to SetNextFrameWantCaptureMouse() and SetNextFrameWantCaptureKeyboard(). Added demo. (#5304, #4831, #4480, #533) 2022-05-23 11:22:46 +02:00
ocornut
cb56b0b238 Removed leftover KeepAliveID() call in GetIDWithSeed() variant. (#5181) + doc tweaks. 2022-05-23 10:51:01 +02:00
ocornut
e346059eef IO: Fixed input queue trickling of mouse wheel events. (#4921, #4821) 2022-05-18 14:16:02 +02:00
ocornut
60bea052a9 Backends: OpenGL3: Fix state corruption on OpenGL ES 2.0 due to not preserving GL_ELEMENT_ARRAY_BUFFER_BINDING and vertex attribute states. (amends) 2022-05-13 18:06:24 +02:00
Rokas Kupstys
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
thedmd
507a87354b DrawList: Circles disappear when using a radius < 0.5f (#3491)
Amend 051ce0765e
2022-05-13 17:22:35 +02:00
ocornut
9e0517a134 DrawList: Fixed divide-by-zero or glitches with Radius/Rounding values close to zero. (#5249, #5293, #3491)
Amend 8ed34af6f8
2022-05-13 17:19:51 +02:00
ocornut
6d27fecce1 Debug: added DebugTextEncoding() to help diagnose between text encoding issues and font loading issues. Simplified code + extracted DebugNodeFontGlyph().
Helper to diagnose issues such as #4866, #3558, #3436, #2233, #1880, #1780, #905, #832, #762, #726, #609, #565, #307)
2022-05-03 19:23:54 +02:00
stuartcarnie
e66fc22057 Backends: OSX: Removed ImGui_ImplOSX_HandleEvent() from backend API. Move event tracking (desktop only) to OSX backend. (#4821)
Fix using NSKeyUp (#5268).
2022-05-03 14:35:08 +02:00
ocornut
26f817807c Backends: Vulkan: Don't use VK_PRESENT_MODE_MAX_ENUM_KHR as specs state it isn't part of the API. (#5254) 2022-05-03 12:51:51 +02:00
ocornut
3e5dde9a26 Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. (#5276) 2022-05-02 16:45:27 +02:00
cpichard
709bc03d6f Backends: GLFW: fixed ImGui_ImplGlfw_TranslateUntranslatedKey() for lower case letters on OSX (#5260, #5261) 2022-04-30 15:34:40 +02:00
noisewuwei
e54db4ee70 Backends: OSX, Metal: Store backend data in a per-context struct, allowing to use these backends with multiple contexts. (#5203, #5221, #4141)
# Conflicts:
#	docs/CHANGELOG.txt
2022-04-27 15:17:32 +02:00
ocornut
04689979b4 Examples: Emscripten+WebGPU: Fix for latest spec rename of WGPURenderPassColorAttachment::clearColor to ::clearValue (#3632) 2022-04-22 20:38:59 +02:00
Dima Koltun
b5b704d376 Windows: Fixed first-time windows appearing in negative coordinates. (#5215, #3414)
Regression added in 6af92b05b
2022-04-22 20:24:44 +02:00
ocornut
5b29d14783 Layout: Fixed mixing up SameLine() and SetCursorPos() together. SameLine() is a stateful.
+ minor unrelatedcomments.
2022-04-22 17:48:06 +02:00
Andrea Palmatè
14ca75d4e7 Backends: SDL, OpenGL3: Small fixes for AmigaOS4. (#5190) + Allow redefining IM_COL32_XXX layout macros. (#5190, #767, #844) 2022-04-13 20:43:35 +02:00
ocornut
088487a3d4 Nav: Fixed nav movement in a scope with only one disabled item from focusing the disabled item. (#5189) 2022-04-13 12:34:13 +02:00
ocornut
90386780e3 Misc: Fixed calling GetID("label") _before_ a widget emitting this item inside a group (such as InputInt()) from causing an assertion when closing the group. (#5181). 2022-04-12 14:44:57 +02:00
ocornut
2c03aac6d3 Renamed ImGuiKeyModFlags to ImGuiModFlags (Breaking but technically never advertised type) 2022-04-05 15:45:00 +02:00
ocornut
a472e8834b InputScalar: Automatically allow hexadecimal/scientific input when format is adequate. 2022-04-05 15:13:37 +02:00
ocornut
c521883be4 Sliders, Drags: Fixed manual input when using hexadecimal display format string. (#5165, #3133)
InputScalar: Fixed manual input when using %03d style width in display format string.
(amended once)
2022-04-04 18:42:04 +02:00
ocornut
508c9aaf60 Sliders, Drags: Fixed using hexadecimal display format strings (pretty much never worked). (#5165, #3133)
Ditched unnecessary code. When transitioning from float in 3e8087458 we added an unnecessary path there, which evolved in c5fb92955.
2022-04-04 14:43:30 +02:00
ocornut
0dec430707 Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window always lead to menu closure. 2022-03-28 12:33:58 +02:00
ocornut
dfbe938e54 InputText: Fixed pressing Tab emitting two tabs characters. (#2467, #1336)
Using Tab keys entirely now, ignoring Tab character. Technically affect who owns the repeat rate.
2022-03-24 12:04:49 +01:00
Rokas Kupstys
1ad8ad623e Backends: GLFW: Fixed keyboard modifiers events being reported incorrectly on Linux/X11. 2022-03-23 16:09:42 +01:00
cfillion
7d7bf993bb ImDrawList: Fix texture-based anti-aliasing with RGBA textures (#5132, #3245)
When using an Alpha8 font texture, GetTexDataAsRGBA32 converts 0x00 to transparent white.
When using a RGBA32 font texture, ImFontAtlasBuildRenderLinesTexData was writing transparent black.
2022-03-23 16:00:39 +01:00
thedmd
3c07879504 Backends: OSX: Inputs: Monitor NSKeyUp events to catch missing keyUp for key when user press Cmd + key (#5128) 2022-03-22 18:48:52 +01:00
Rokas Kupstys
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
Sergiu Giurgiu
31e77eacdb Backends: SDL: Add extra mouse buttons handling (#5125) 2022-03-22 16:59:46 +01:00
ocornut
6fae29679a Examples: Emscripten: Fix build. (#3632) 2022-03-15 18:36:41 +07:00
ocornut
0cff5ac5a1 Updated stb_textedit.h from 1.20 to 1.26 (many fixes). (#5075) 2022-03-13 17:57:32 +07:00
ocornut
de451d4474 Updated stb_textedit.h from 1.13 to 1.14. (#5075)
(Our pageup/pagedown PR was merged, so this is essentially a no-op)
2022-03-13 13:23:03 +07:00
ocornut
279db55840 Updated stb_rect_pack.h from 1.00 to 1.01. (#5075)
(our STBRP__CDECL change was merged)
2022-03-13 13:23:00 +07:00
jakubtomsu
3deb92c2c5 Add IMGUI_STB_SPRINTF_FILENAME to support custom stb_printf.h include path (#5068, #2954) 2022-03-13 12:52:30 +07:00
ocornut
0f14933577 Tables: Fixed incorrect border height used for logic when resizing one of several synchronized instance of a same table ID, when instances have a different height. (#3955, #3565) 2022-03-01 18:47:03 +01:00
ocornut
54fb051e52 ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label. 2022-02-28 16:12:43 +01:00
ocornut
fa2b318dd6 IO: Fixed input queue trickling of interleaved keys/chars events when InputText() is not active. (#4921, #4858) 2022-02-22 14:36:27 +01:00
ocornut
5659db5529 IO: Fixed backward-compatibility accesses to io.KeysDown[]. (#4921, #4858)
+ Snuck in unrelated comments and removed the "fill once" comment (#5043)
2022-02-21 21:31:01 +01:00
ocornut
29d462ebce Set HoveredID even when g.NavDisableMouseHover is set by gamepad/keyboard navigation. This will facilitate the use of future InputOwner API based on HoveredID/ActiveID.
Note that this widen the small gap between polling g.HoveredID and using IsItemHovered() the later does various filtering.
Added IsItemHovered(ImGuiHoveredFlags_NoNavOverride) to disable that specific state redirect/filter.
Side-effect: fix EndGroup() use of combining HoveredId values when gamepad/keyboard nav is active. Unlikely to have user-visible side effect since IsItemHovered() would have filtered out anyway.
Side-effect: fix IsAnyItemHovered() when gamepad/keyboard is active (but this wasn't the primary intent of this change).
Side-effect: fix using SetItemUsingMouseWheel() while hovering an item and gamepad/keyboard is active. (#2891)
2022-02-17 18:39:03 +01:00
ocornut
d9e60d29e1 Clipper: Fixed a regresssion when not calling End() + calling End() twice as well. (#4822) 2022-02-17 11:09:06 +01:00
ocornut
2dfa71fad5 Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate. Using KeyModAlt. Removed KeyModsPrev. 2022-02-16 20:08:58 +01:00
Konstantin Podsvirov
7ff41a78f9 Fonts: binary_to_compressed_c.cpp gained -nostatic option (#5021)
This allow to use added variables in other source files via extern declaration.
2022-02-16 17:02:33 +01:00
thedmd
b6b8f6634e ImVector: Fixed erase() with empty range. (#5009) 2022-02-15 11:16:08 +01:00
Jeff Mears
71f98dd056 Declare ImVec2 and ImVec4 constructors as constexpr (#4995) 2022-02-11 12:27:27 +01:00
thedmd
4691fa0ed5 ImDrawList: PthArcTo: Add small tolerance when comparing angles (#4993) 2022-02-08 17:37:45 +01:00
ocornut
aa79d0cd2f Stack Tool: Added option to copy item path to clipboard. (#4631) 2022-02-08 16:36:54 +01:00
ocornut
88de982071 Version 1.88 WIP 2022-02-08 14:45:26 +01:00
ocornut
c71a50deb5 Version 1.87 2022-02-07 18:16:54 +01:00
ocornut
e52bb147a7 Backends: GLFW: Added ImGui_ImplGlfw_InstallCallbacks()/ImGui_ImplGlfw_RestoreCallbacks(). (#4981) 2022-02-07 16:11:05 +01:00
Rokas Kupstys
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
ocornut
2554b512c0 Backends: OSX: Forward keyDown/keyUp events to OS when unused by Dear ImGui. 2022-02-07 11:55:24 +01:00
Clownacy
c6cab1f352 Backends: SDL: Added SDL_Renderer* parameter to ImGui_ImplSDL2_InitForSDLRenderer(). Use SDL_GetRendererOutputSize() instead of SDL_GL_GetDrawableSize() when bound to a SDL_Renderer. (#4927)
This is (kind of) an OpenGL-only function, which should be avoided when SDL2 isn't using OpenGL.
The only alternative that is recommended is SDL_GetRendererOutputSize, which limits this fix to the SDL_Renderer backend. Still, I think it's better than nothing.
I say that SDL_GL_GetDrawableSize is "kind of" OpenGL-only because it does technically work even when SDL2 isn't using OpenGL.
It's just that it becomes a shim to SDL_GetWindowSize, which is not suitable for high-DPI usage because it reflects the size of the window in screen coordinates, not actual pixels, so it really should be avoided when not using OpenGL.
2022-02-04 16:51:29 +01:00
Clownacy
c39192ba64 Backends: SDL_Renderer: Fix texture atlas format on big-endian hardware (#4927)
SDL_PIXELFORMAT_RGBA32 is intended for byte arrays where the channels
are specifically in the RGBA order. However, this is not what
GetTexDataAsRGBA32 does: rather, it constructs an array where each
pixel is an unsigned int in ABGR order. On little-endian platforms,
this does indeed result in an RGBA byte order, however, on big-endian
platforms, this results in an ABGR byte order, which does not match
the PIXELFORMAT enum.

What should be used is the SDL_PIXELFORMAT_ABGR8888 enum, which
specifies that the pixels are in native-endian ABGR, which they are.
2022-02-04 16:43:05 +01:00
rokups
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
ocornut
49e38a5b32 Revert moving ImGuiKeyModFlags to internal.h (amendc906c65) 2022-01-28 15:53:09 +01:00
ocornut
c906c65cac (BREAKING) Replaced AddKeyModsEvent() added by 790132a in favor of unified key enum system. Backends: update most. (#4921, #4858)
Sorry this is an unusual breaking but since we are WIP it is a good time to make a correction.
2022-01-27 17:46:48 +01:00
ocornut
075f4ac661 Don't merge ImDrawCmd which have had their IdxOffset changed to not be sequential. Fixed CTRL+Tab into an empty window causing artefacts on the highlight rectangle due to bad reordering on ImDrawCmd.
This is bit of a weird edge case adding weight to ImDrawCmd merging, if we could rework the mess in RenderDimmedBackgroundBehindWindow() we may be able to undo some of that.
2022-01-26 15:53:18 +01:00
ocornut
b17b2fb732 Popups: Fixed an issue when reopening a same popup multiple times would offset them by 1 pixel on the right. (#4936)
Passing explicit ImGuiPopupFlags_MouseButtonRight to OpenPopupOnItemClick() calls somehow document the unusual (due to legacy) default value.
2022-01-24 13:24:54 +01:00
thedmd
c2db4c2462 Demo: draw a section of keyboard in "Inputs > Keyboard, Gamepad & Navigation state" to visualize keys. 2022-01-21 15:25:23 +01:00
ocornut
69b697378b Comments, tweaks. 2022-01-21 14:50:31 +01:00
ocornut
26e59c8742 Nav: Fixed gamepad navigation in wrapping popups not wrapping all the way. (#4365) 2022-01-21 14:41:34 +01:00
thedmd
5ea47d9560 Backends: OSX: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:49 +01:00
ocornut
39c3412f91 Backends: SDL: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:31 +01:00
ocornut
3d85433748 Backends: GLFW: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:15 +01:00
ocornut
9f8c599ca7 Backends: Win32: Add full gamepad support using io.AddKeyEvent(), io.AddKeyAnalogEvent(), stopped writing to io.NavInputs[]. (#4858, #787) 2022-01-20 17:25:04 +01:00
ocornut
f33bb99821 IO: added AddKeyAnalogEvent() and support for ImGuiKey_GamepadXXXX. (#4858, #787) 2022-01-20 17:24:52 +01:00
ocornut
ceb26bac48 Backends: Vulkan: Added support for ImTextureID as VkDescriptorSet, amends. (#914) 2022-01-20 15:53:28 +01:00
Rokas Kupstys
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
ocornut
7ad42ff431 IO: renamed io.ConfigInputEventQueue to io.ConfigInputTrickleEventQueue. (#4858) 2022-01-19 18:45:57 +01:00
ocornut
26d04c948f Tables: Fixed positioning of Sort icon on right-most column with some settings (not resizable + no borders). (#4918). 2022-01-19 18:03:36 +01:00
ocornut
91ae56af45 Removed support for legacy arithmetic operators (+*/) when inputing text into a slider/drag. (#4917, #3184) 2022-01-19 15:10:42 +01:00
ocornut
7374b96f5c IO: Added input queue. (#4858, #2787, #1992, #3383, #2525, #1320) 2022-01-17 17:36:55 +01:00
thedmd
b8e56dce83 IO: Added AddMousePosEvent(), AddMouseButtonEvent(), AddMouseWheelEvent() api + updated all Backends. (#4858) (input queue code will be next commit)
Details: note that SDL, OSX and GLFW backends removed recording of MouseJustPressed[] which will be unnecessary with input queue (which is the NEXT commit). (#2787, #1992, #3383, #2525, #1320)
2022-01-17 17:35:37 +01:00
ocornut
b6582a471a Backends: OSX: Fix Game Controller nav mapping to use shoulder for both focusing and tweak speed. (#4759) 2022-01-17 16:22:32 +01:00
ocornut
0755767440 Backends: move io.AddKeyModsEvent() next to io.AddKeyEvent() submission, rely on mods from platform/source. (#4858) + fix #2622 again broken by 746c9f7
Amended to submit modifiers before.
2022-01-17 15:21:17 +01:00
ocornut
eb823655af Removed support for pre-C++11 compilers. We'll stop supporting VS2010. (#4537)
Build all
2022-01-17 11:54:11 +01:00
ocornut
6188e94108 Examples: Vulkan: fill Subpass and MSAASamples to increase discoverability (#4886) + IO docs update (#4858)
https://github.com/mosra/magnum-integration/pull/89
2022-01-14 11:51:59 +01:00
ocornut
200a8f1ea2 Backends: GLFW: Update mouse inputs using glfwSetCursorPosCallback() (breaking) + fallback to provide it when focused but not hovered/captured + update MousePos before MouseButtons.
+ Allegro5 remove unnecessary clear.
2022-01-12 17:48:47 +01:00
ocornut
98ce013242 Backends: SDL: Update mouse inputs using SDL_MOUSEMOTION/SDL_WINDOWEVENT_LEAVE + fallback to provide it when focused but not hovered/captured + update MousePos before MouseButtons. 2022-01-12 17:48:47 +01:00
ocornut
bf4de2a46b Backends: Win32: Update mouse inputs using WM_MOUSEMOVE/WM_MOUSELEAVE + fallback to provide it when focused but not hovered/captured + update MousePos before Key Modifiers. 2022-01-12 17:48:46 +01:00
ocornut
7f8a89c25c Backends: Win32, SDL: maintain MouseButtonsDown instead of using IsAnyMouseDown(). Internals: added GetInputSourceName(). 2022-01-12 16:12:10 +01:00
Liu Liu
457d4b7b72 Backends: OSX: Adedd basic IME support for macOS. (#3108, #2598) 2022-01-12 14:37:05 +01:00
Théo Monnom
0818a42396 Backend: WebGPU: Fixed incorrect size parameters in WGPU backend (#4891)
+ squash SDL alignment bits.
2022-01-12 14:16:55 +01:00
ocornut
e8172fdfbc Rename io.AddKeyModEvent() -> io.AddKeyModsEvent() and updated backends accordingly. (#2625, #4858)
Amend 790132a (breaking)
2022-01-10 17:00:32 +01:00
thedmd
fe646ea591 Backends: SDL2: Update to use io.AddEventKey() will full key map (#2625, #4858) + created localized key (using keycode instead of scancode) (#456)
Legacy indexing stills uses Scancode
2022-01-10 15:12:58 +01:00
ocornut
bf08c13e9b Inputs: Extra Keys / AddKeyEvent(): bidirectional mapping, basic CI, simplify backends, asserts on misuses, tested backward compat. (#2625, #4858, #2787)
(edit: simplified backends merged into previous commits to make history clearer)
2022-01-10 15:09:56 +01:00
ocornut
afffcd5810 Inputs: rename ImGuiKey_KeyPadEnter > ImGuiKey_KeypadEnter (#2625) 2022-01-06 14:25:56 +01:00
ocornut
100ede5764 Backends: GLFW: Fix CTRL+A, CTRL+Y, CTRL+Z to match keyboard layout. Converting GLFW untranslated keycodes back to translated keycodes. (#456, #2625) 2022-01-05 16:57:50 +01:00
Liu Liu
de36ff043e Platform IME: add ImGuiPlatformImeData::InputLineHeight (unused by win32). (#3113) 2022-01-05 13:47:21 +01:00
actboy168
29a8ee0826 Platform IME: add ImGuiPlatformImeData::WantVisible, hide IME when not used. (#2589) 2022-01-05 13:47:21 +01:00
ocornut
1cbfe93520 Platform IME: [windows] call ImmSetCandidateWindow() to position candidate window. 2022-01-05 13:47:21 +01:00
ocornut
3a90dc3893 Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.
Ref #2589, #2598, #3108, #3113, #3653, #4642
2022-01-05 13:47:20 +01:00
ocornut
efa50f72a7 Backends: Metal: Ignore ImDrawCmd where ElemCount == 0. (#4857) 2022-01-03 22:14:19 +01:00
ocornut
b0a6cd6305 Fixed a situation where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with zero triangles, (#4857)
(2nd amend)
2022-01-03 21:45:20 +01:00
ocornut
2402958aec Commented out redirecting functions/enums names that were marked obsolete in 1.69, 1.70, 1.71, 1.72
- ImGui::SetNextTreeNodeOpen() -> use ImGui::SetNextItemOpen()
- ImGui::GetContentRegionAvailWidth() -> use ImGui::GetContentRegionAvail().x
- ImGui::TreeAdvanceToLabelPos() -> use ImGui::SetCursorPosX(ImGui::GetCursorPosX() + ImGui::GetTreeNodeToLabelSpacing());
- ImFontAtlas::CustomRect -> use ImFontAtlasCustomRect
- ImGuiColorEditFlags_RGB/HSV/HEX -> use ImGuiColorEditFlags_DisplayRGB/HSV/Hex
2022-01-03 16:37:33 +01:00
Jonathan Hoffstadt
83d22f4e48 Tables, ImDrawListSplitter: Fixed erroneously stripping trailing ImDrawList::AddCallback().(#4843, #4844) 2021-12-30 22:03:52 +01:00
luigifcruz
41e39ea6e1 Backends: Metal: Add Metal C++ bindings support. (#4824, #4746) 2021-12-30 15:04:03 +01:00
ocornut
89a28209e8 Version 1.87 WIP + Backends: OpenGL3: Fixed a buffer overflow in imgui_impl_opengl3_loader.h init, added in 1.86 (#4468, #4830) 2021-12-26 20:02:02 +01:00
ocornut
512c54bbc0 Version 1.86 2021-12-22 15:31:13 +01:00
ocornut
612b787b0d Menus: fixed top-level menu from not consistently using style.PopupRounding. (#4788)
+ Stack tool default size.
2021-12-21 15:05:10 +01:00
Sean Ridenour
4bad852a78 Backends: SDL_Renderer: Handle change to SDL_RenderGeometryRaw() function signature in SDL 2.0.19 (#4819) 2021-12-21 14:32:41 +01:00
ocornut
0636f9adac InputText: fixed Shift+Delete from not cutting into clipboard. (#4818, #1541) 2021-12-20 19:45:58 +01:00
ocornut
d9bc1e44af Backends: Marmalade: Removed obsolete Marmalade backend (imgui_impl_marmalade.cpp) + example. (#368, #375) 2021-12-20 19:29:41 +01:00
thedmd
0cdc4a9565 Backends: Win32: Store left/right variants of Ctrl/Shift/Alt mods in KeysDown[] array. (#2625)
Technically not much required yet but will be by extra-keys work. fix miscleared GLFW field for consistency (no effect)
2021-12-16 18:16:35 +01:00
ocornut
389982eb5a Backends: OpenGL3: Using buffer orphaning + glBufferSubData(), seems to fix leaks with multi-viewports with some Intel HD drivers.. (#4468, #4504, #2981, #3381) 2021-12-15 11:50:00 +01:00
ocornut
48f263336b Menus: fixed closing a menu inside a popup/modal. Fixed menu inside a popup/modal not inhibiting hovering of items in the popup/modal. (#3496, #4797)
Fixed sub-menu items inside a popups from closing the popup (debatable).
2021-12-14 16:54:23 +01:00
Stuart Carnie
1b6b8602c1 Backends: OSX: Fix keyboard support. Handle scroll cancel. Don't set mouse cursor shape unconditionally. (#4759, #4253, #1873)
Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.
2021-12-13 11:56:43 +01:00
SlavicPotato
f71ee5203e Fix infinite loop in ImFontGlyphRangesBuilder::AddRanges if the user passes upper range = UINT16_MAX without IMGUI_USE_WCHAR32. (#4802) 2021-12-13 11:35:59 +01:00
Stuart Carnie
b720f1f03c Backends: OSX: Add Game Controller support. (#4759) 2021-12-13 11:25:59 +01:00
xndcn
8a9fe26866 Menus: fixed closing a menu by clicking on its menu-bar item when inside a popup. (#3496, #4797) 2021-12-10 18:58:41 +01:00
ocornut
c801799218 Added an assertion for the common user mistake of using "" as an identifier at the root level of a window. (#1414, #2562, #2807, #4008, #4158, #4375, #4548, #4657, #4796)
#4158, #4375, #4548, #4657, #4796)
2021-12-09 15:35:02 +01:00
ocornut
bdd2a94315 InputTextMultiline: fixed vertical tracking with large values of FramePadding.y. (#3781, #4794) 2021-12-09 11:30:42 +01:00
ocornut
072caa4a90 InputText: fixed incorrect padding when FrameBorder > 0. (#4794, #3781) 2021-12-09 11:25:58 +01:00
ocornut
a19815dc6b Backends: Allegro5: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:34:57 +01:00
ocornut
c80e8b964c Backends: OpenGL2, Marmalade: Fixed mishandling of the ImDrawCmd::IdxOffset field. (#4790) 2021-12-08 16:26:52 +01:00
Rokas Kupstys
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
ocornut
926addbfe2 Clipper: fixed invalid state when number of frozen table row is smaller than ItemCount.
+ Bonus rather unorthodox coding style.
2021-12-06 17:17:43 +01:00
ocornut
a76bc52da5 Window, Clipper: store initial precision loss and apply in clipper. (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20) 2021-12-06 16:19:47 +01:00
ocornut
6e141a9cae Internals: made ScrollbarEx() use ImS64 to facilitate use with larger ranges (not fully tested) + clipper tweaks (#3609, #3962 + https://github.com/ocornut/imgui_club/issues/20)
This does NOT fix all problems with large ranges and floating point precision, it merely attenuate them.
2021-12-06 12:09:38 +01:00
ocornut
aa41f16589 Separator: fixed cover all columns while called inside a table. (#4787, #205) 2021-12-05 18:47:28 +01:00
ocornut
da3a36eefd Backport from docking branch: minor stuff.
Fixed software mouse cursor being rendered multiple times if Render() is called more than once.
2021-12-03 19:11:58 +01:00
ocornut
78c6435dbb Inputs: (breaking wip) removed IsMouseTripleClicked() added recently (during 1.86 WIP), replaced with GetMouseClickedCount(). (#3229) 2021-12-03 12:38:58 +01:00
Rokas Kupstys
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
ocornut
440824d431 Backends: Fixed early out on empty clip rect. In particular, DX12 backend would warn about it (others not so much). (#4775, #4464)
Amend/fix 2b0bd40b
2021-11-30 21:48:29 +01:00
ocornut
f087a5b856 Metrics: Added a node showing windows in submission order and showing the Begin() stack. 2021-11-30 16:04:19 +01:00
ocornut
66f0fb986c Inputtext, Nav: fixed using SetKeyboardFocusHere() on InputTextMultiline(). (#4761) 2021-11-29 16:25:45 +01:00
ocornut
5ccb66794b Backends: WebGPU: Passing explicit buffer sizes as validation layers appears to not do what the in-flux specs says. (#4766 2021-11-29 12:18:25 +01:00
ocornut
5ac25e7c7a InputText: fixed ReadOnly flag preventing callbacks from receiving the text buffer. (#4762) 2021-11-25 15:12:08 +01:00
ocornut
3fde445b91 Misc: Added missing ImGuiMouseCursor_NotAllowed cursor for software rendering (when io.MouseDrawCursor is enabled). (#4713) 2021-11-15 16:19:33 +01:00
ocornut
2c29e391dd Drag and Drop: BeginDragDropSource() with ImGuiDragDropFlags_SourceAllowNullID doesn't lose tooltip when scrolling. (#143)
Reduced amount of self critical commentary since it'll appear like a hack for users but it isn't more a hack than many other things.
2021-11-10 19:17:01 +01:00
ocornut
e790fc0e79 Nav: prevent child from clipping items when using _NavFlattened and parent has a pending nav request. (#787) 2021-11-10 12:00:50 +01:00
ocornut
eb02dcf87f Nav: enable move/resize window with keyboard in Ctrl+Tabbing windowing menu even without _NavEnableKeyboard. (#4023, #787). 2021-11-08 18:42:07 +01:00
ocornut
8ce23b3ccd Nav: Ctrl+tabbing to cycle through windows is now enabled regardless of _NavEnableKeyboard. (#4023, #767) 2021-11-08 17:41:36 +01:00
ocornut
bce1ba400f Clipper: add ForceDisplayRangeByIndices (#3841, #3578)
This partially reverts commit 6a7e2c74fb.
2021-11-08 17:20:30 +01:00
ocornut
1a7526dcd4 Nav, Tabbing: refactor tabbing system to support clipped items, scrolling, using nav queries. (#4449)
Not using counter/modulo anymore and special provisions to handle tab wrapping with ImGuiListClipper. Wrapping may be done better as a next-frame forwarded request.
Also one extra step toward #3949 #3985
2021-11-04 20:48:12 +01:00
ocornut
f01a6d3e8f InputText, Nav: fixed repeated calls to SetKeyboardFocusHere() preventing to use InputText(). (#4682)
+ Stack Tool: favor inspecting HoveredID over ActiveID as the later is more likely to be locked.
2021-11-04 20:02:42 +01:00
ocornut
64daeddf6f Removed CalcListClipping() function. (#3841) 2021-11-04 14:14:16 +01:00
ocornut
93cccd27f6 Clipper: bunch of rework. (#3841, #1725)
- Focused/NavId now always included in display range.
- Any number of steps (while preserving zero-alloc policy).
- Non contiguous ranges for nav processing
- Moved new fields internally (+ moved StepNo away from sight so it doesn't get missused).
- Generally tweaks/refactors.
2021-11-04 14:05:14 +01:00
ocornut
b409df34db Clipper: Fixed content height declaration slightly mismatching the one of when not using a clipper. 2021-11-03 17:00:40 +01:00
ocornut
14466a6d19 Nav: Page/Home/End doesn't immediately restore highlight (before results comes) + pressing Esc to exit a child window re-enable the Nav highlight if it was disabled by mouse.
Also fix a move request fail restoring highlight from not moving mouse cursor.
Add NavRestoreHighlightAfterMove() helper a little bit of extra sanity.
2021-11-02 17:04:35 +01:00
ocornut
978598b174 Nav: pressing PageUp/PageDown/Home/End when in Menu layer automatically moves back to Main layer. + fixed resizing window from borders setting navigation to Menu layer. 2021-11-02 17:04:34 +01:00