Commit Graph

4046 Commits

Author SHA1 Message Date
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 7f25143972 Better error reporting for PopStyleColor()/PopStyleVar() + easier to recover. (#1651) 2022-09-01 10:54:00 +02:00
ocornut 747c9a7adf IsKeyPressed(), IsMouseClicked(), GetKeyPressedAmount(): add a (normally unnecessary) test for ->Down next to ->DownDuration tests, facilitating the use of key eating mechanism.
Consider removing when we add support for input ownership.
2022-08-31 19:15:13 +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 b3b3a07133 Nav: Fixed regression in e99c4fc preventing CTR+Tab to work without NavEnableKeyboard (#5504, #4023); 2022-08-24 14:45:11 +02:00
ocornut 72096bf698 Clipper: simplify code and remove cases where true is returned with empty display range as an extra step. 2022-08-23 15:40:07 +02:00
ocornut 07b9999de9 Debug Log: added 'Clipper' events logging. 2022-08-23 15:40:07 +02:00
ocornut 4eb9066997 Clipper: extract code into a ImGuiListClipper_StepInternal() to facilitate debugging. Moved clipper End() call to outer layer, stopped heretic use of comma operator.
Removed obsolete comments in clipper Begin()
2022-08-23 15:40:06 +02:00
ocornut d357e8504b TestEngine: revert part of 5b0510c as IMGUI_TEST_ENGINE_ITEM_ADD() woul see an erreneous hierarchy.
+ Fix typo (#5600)
2022-08-22 14:36:32 +02:00
ocornut 5b0510c5b7 TestEngine: facilitate aiming at InputScalar() using wildcards + removed unnecessary IDStack.size hack (require TestEngine latest) 2022-08-20 22:55:51 +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
Vlad Serebrennikov c911901b5e
Fix ImGuiIO docs and default values (#5540) 2022-08-03 22:46:31 +02:00
ocornut 0a4ddd7246 Fix being unable to mouse wheel while dragging a payload (fix 1480bc5, #4921, #2891) 2022-08-03 22:02:00 +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
ocornut e99c4fc668 Nav: fixes keyboard/gamepad nav actions running without the corresponding config flags (#5504). Fixes 8b8a61b. #4921, #4858, #787, #1599, #323)
NavUpdate() can now clears ImGuiInputSource_None.
2022-07-25 17:19:45 +02:00
ocornut 2d38bc99b3 Internals: renamed recently added ImGuiInputReadFlags to ImGuiInputFlags. (Amend 8b8a61b) 2022-07-22 17:05:34 +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 105bb3ef8a Legacy: clear g.ActiveIdUsingNavInputMask when active id is clear + Internals: added helpers GetKeyChordName(), ImGuiModFlags_All.
Amend 8b8a61b
2022-07-08 17:51:46 +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 4711b9b05a Add trailing commas to enum (to simplify the diff/patch of further additions) (#4537)
Possible since we are now C++11 + fix warning in GetNavInputAmount().
2022-07-06 20:39:39 +02:00
ocornut 90ef327882 Reordered keys representing directions to follow a consistent L/R/U/D order everywhere. (#2625, #4921, #3724)
Amended to avoid static analysis false positive.
2022-07-06 17:48:01 +02:00
ocornut f9ccdba352 Nav: Fix regression 93f02ee + Internals: Remove ImGuiNavReadMode_Pressed, ImGuiNavReadMode_Released.
Toward using keys.
2022-07-06 17:03:50 +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
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 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 08572189f0 MovingWindow auto-cancelled if active id is stolen (instead of ill-defined bahavior + assert in docking).
Followup to 27343ef
2022-06-15 15:25:21 +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 dd28500835 Debug: Add more log. Reworked IMGUI_DEBUG_PRINT IMGUI_DEBUG_PRINTF. Added internal IsDragDropActive() helper.
DebugLog() output to TTY by default.
Amend 1d6e34f.
2022-06-15 11:31:19 +02:00
ocornut 2ed9e21eba Nav, Internals: wrap changes to g.NavWindow into a helper function to help track/log changes.
Amend 076d8fc. Eventually we should REALLY clean up the SetNavWindow SetNavID SetFocusID FocusWindow fiasco.
2022-06-13 19:05:55 +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 23a785aeb3 Internals: wrapped used of g.TempBuffer into ImFormatStringToTempBuffer/ImFormatStringToTempBufferV helpers.
This leaves us room for growing the buffer if needed, and gives us a resizable buffer available for other work.
2022-06-07 19:20:03 +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
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 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 9779cc2fe2 Internals: shallow changes to simplify diff of upcoming commits. Should have no side-effect. 2022-05-06 14:20:01 +02:00
ocornut 55f8989392 Docs update, binaries link + Backend: Allegro: fix warning (#5281) 2022-05-04 15:16:05 +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