1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-12 02:00:58 +01:00
Commit Graph

862 Commits

Author SHA1 Message Date
ocornut
c363b6df2b Modals: fixed issue hovering popups inside a child inside a modal. Fixed IsWindowFocused()/IsWindowHovered() issues with childs inside popups. (#4676)(#4676, #4527)
Amend/fix 6b1e094f, fc4988ffb (Sep 24)
2021-10-27 12:03:14 +02:00
ocornut
126a6f894f InputText: made double-click select word, triple-line select line. Word delimitation logic differs slightly from the one used by CTRL+arrows. (#2244) 2021-10-25 16:34:56 +02:00
ocornut
9c78fc928a Inputs: Mouse: Amend c8e3a01 for tracking multiple clicks, renaming. (#3229) 2021-10-25 14:30:20 +02:00
ocornut
19c3773cc0 Backends: Vulkan: Call vkCmdSetScissor() with a full-viewport at end of render. (#4644) 2021-10-15 12:11:11 +02:00
ocornut
e3bd9434b1 1.86 WIP + internals: tweaks table temp data code. 2021-10-14 16:58:14 +02:00
ocornut
55d35d8387 Version 1.85 2021-10-11 19:24:25 +02:00
ocornut
75c54e6384 Nav: Fixed vertical scoring offset when wrapping on Y in a decorated window. 2021-10-11 14:40:47 +02:00
ocornut
ba5c105c01 Menus: Fixed an assertion happening in some situations when closing nested menus (broken in 1.83). (#4640)
Broken since 936f5322
Weirdly chain-reaction caused by the fact following #4640 repro, the SourceWindow assignment in OpenPopupEx() picks Menu_04 before its closure. Value of SourceWindow since bda2cde6 #2517
2021-10-11 11:48:39 +02:00
ocornut
ec6ca06898 InputText: Fixed selection rectangle appearing one frame late when selecting all. 2021-10-08 13:00:55 +02:00
ocornut
31d033c9d8 Nav: refactor SetKeyboardFocusHere() into using Nav facility. Fix it for clipped items. (#343, #4079, #2352, #432)
+ Removed references to counter used by previous implementation of SetKeyboardFocus functions (the TabStop ones will be removed after)
2021-10-06 18:42:11 +02:00
ocornut
fbe78b1a3a Stack Tool: Docs (#4631) + also prevent Metrics window from displaying twice. 2021-10-06 18:22:40 +02:00
Basil Fierz
25332fa5ac Backends: Emscripten: Update the webgpu API to be compatible with chrome 4633 (#4512) 2021-10-06 17:51:00 +02:00
ocornut
2de96c4bd5 Stack Tool: Added Stack Tool (ShowStackToolWindow() function and available from Demo and Metrics window). (#4631) 2021-10-06 17:47:27 +02:00
Guus Waals
30db674147 Fix printf format warnings on mingw clang (#4626, #4183, #3592) 2021-10-06 12:00:50 +02:00
ocornut
8f495e5543 Internal: added ScrollToItem() upcoming replacement to ScrollToBringRectIntoView() + ImGuiScrollFlags (WIP) (#3692, #3208, #2812, #4242, #2900) 2021-09-29 17:13:45 +02:00
ocornut
fc4988ffb0 Added ImGuiFocusedFlags_NoPopupHierarchy and ImGuiHoveredFlags_NoPopupHierarchy (followup #4527) 2021-09-24 15:39:38 +02:00
ocornut
fba756176d Backends: SDL_Renderer: Amend 1d2d246, various tweaks, fixes, sync to latest. (#3926) 2021-09-21 19:29:48 +02:00
Rokas Kupstys
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 Kupstys
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
ocornut
15132217a3 Nav: Fixed an issue with losing focus on docked windows when pressing Alt while keyboard navigation is disabled. (#4547, #4439) 2021-09-21 14:17:49 +02:00
James McCartney
bc3d267c51 Backends: OSX: Use mach_absolute_time as CFAbsoluteTimeGetCurrent can jump backwards. (#4557, #4563) 2021-09-21 12:36:37 +02:00
ocornut
c6ca327fb2 Backends: Added more implicit asserts to detect invalid/redundant calls to Shutdown functions. (#4562) 2021-09-20 18:43:05 +02:00
ocornut
2cffcbdc64 InputText: fix Space key with nav enabled interfering with input text boxes (fix bd6c9e99). made it possible to activate InputText with tweak gamepad button (why not, now that we can cancel) (#4552, #2321) 2021-09-17 16:30:32 +02:00
ocornut
d366694062 Disabled: Added assert guard for mismatching BeginDisabled()/EndDisabled() blocks. (#211) + Added asserts for missing PopItemFlag() calls. Added both to ErrorCheckEndFrameRecover (#1651) 2021-09-15 15:26:29 +02:00
ocornut
4f10fe0a27 TreePush: removed arbitrary/weird suppot for TreePush((const char*)NULL) 2021-09-15 12:12:49 +02:00
ocornut
7b8bc864e9 Menus: Fixed vertical alignments of MenuItem() calls within a menu bar. (broken by f8fae022). (#4538) 2021-09-14 11:09:39 +02:00
ocornut
82754561e2 Nav: Fixed a few widgets from not setting reference keyboard/gamepad navigation ID when activated with mouse. 2021-09-13 15:17:54 +02:00
ocornut
17a7084b57 Menus: Fixed crash when navigating left inside a child window inside a sub-menu. (#4510). 2021-09-10 15:37:59 +02:00
ocornut
755bf985d2 Backends: OpenGL3: Made our custom GL loader a bit more tolerant of use of another loader in same compilation unit. (#4445, #4514) 2021-09-07 14:48:26 +02:00
ocornut
607ad8c949 Drag and Drop: Fixed using BeginDragDropSource() within a Begin()/BeginChild() that returned false. (#4515) + BeginDragDropTarget()
Note how 79ae6d3b adedd a SkipItems test in BeginDragDropTargetCustom() only.
Catching this similar to work needed to neatly represent the error in #4375 #4158, #4008, #2562
2021-09-06 20:59:16 +02:00
ocornut
bd6c9e99fc InputText: Allow cancelling/validating input with gamepad nav events.
Amend 158995f2 (#2321)
2021-09-06 18:47:12 +02:00
ocornut
528104a89b Menus: adjust closing logic to accomodate for varying font size and dpi + remove seemingly redundant use of g.NavActivateId where pressed was enough. 2021-09-03 16:35:27 +02:00
ocornut
dff15acdb5 Nav: Fixed toggling menu layer with Alt exiting menu layer with Esc not moving mouse when NavEnableSetMousePos config flag is set. 2021-09-01 16:05:03 +02:00
Filippo Crocchini
eb6c16d3dd PlotHistogram: Fixed zero-line position when manually specifying min<0 and max>0. (#4349)
+ amended demo tweaks by ocornut
2021-08-31 13:14:43 +02:00
ocornut
4aea1c5adb IO: added io.WantCaptureMouseAllowPopupClose (#4480) + comments 2021-08-30 19:11:47 +02:00
ocornut
333807b483 Windows: fixed background order of overlapping childs submitted sequentially. (#4493)
Amend 07704496
2021-08-30 13:08:41 +02:00
ocornut
780c1ee265 TextUnformatted: Accept null ranges including (NULL,NULL) without asserting. (#3615) 2021-08-24 19:30:02 +02:00
Rokas Kupstys
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
ocornut
4a7c21d330 Fonts: Fixed ImFontAtlas::ClearInputData() marking atlas as not built. (#4455, #3487) 2021-08-24 15:28:39 +02:00
Corentin Wallez
e652527313 Backends: WebGPU: Update impl_wgpu for an emscripten change 2021-08-24 14:55:43 +02:00
Rokas Kupstys
4c22b3e5d9 Backends: OpenGL3: Fix gl3wProcs colliding with gl3w. (#4445) 2021-08-24 14:33:04 +02:00
ocornut
0608887fb5 InputTextMultiline: Fixed label size not being included into window contents rect unless the whole widget is clipped. 2021-08-23 17:07:46 +02:00
ocornut
68f428b449 imgui_freetype: Fixed crash when FT_Render_Glyph() returns NULL (which apparently happens with Freetype 2.11). (#4394, #4145 ?) 2021-08-23 16:42:58 +02:00
ocornut
e23bee353c Removed GetWindowContentRegionWidth() function 2021-08-23 16:15:16 +02:00
Nicolas Noble
e3e1fbcf02 Backends: OpenGL3: OpenGL: Fixed ES 3.0 shader ("#version 300 es") to use normal precision floats. (#4463) 2021-08-23 15:03:27 +02:00
ocornut
d79ca9b0b6 Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [Legulysse] 2021-08-23 14:57:54 +02:00
ocornut
32d4f6c5d9 Fix BeginDisabled(false), again, (#211, #4452, #4453) Version 1.84.1
(forced pushed since our earlier versioning didn't sort correctly in github web)
2021-08-20 23:59:46 +02:00
ocornut
d2ffbd9b86 Version 1.84
Fix PVS Studio false positive //-V1020
Fix missing #ifndef for IMGUI_IMPL_OPENGL_LOADER_CUSTOM path
2021-08-20 18:03:55 +02:00
ocornut
c543d93af1 Expose BeginDisabled()/EndDisabled() in public API. Add to demo. (#211) 2021-08-20 16:34:43 +02:00
thedmd
cb00972b87 ImDrawList: Fix AddCircle{Filled} with 12 segment case (#4419, #4421) 2021-08-19 17:06:40 +02:00
ocornut
e3988a84db Backends: OpenGL3: Embed our own minimal GL loader (amends). (#4445) 2021-08-19 16:24:59 +02:00
Rokas Kupstys
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
ocornut
7bbf8f2ab0 Drag and Drop: fix using AcceptDragDropPayload() with ImGuiDragDropFlags_AcceptNoPreviewTooltip.
Window was not properly hidden in that case.
2021-08-18 15:40:22 +02:00
thedmd
2f40be638f IO, Backends: add io.AddFocusEvent(). Clear pressed keys after loosing input focus (#3532)
Amend/fix #2445, #2696, #3751, #4377
2021-08-17 20:10:45 +02:00
Rokas Kupstys
86afe966d3 Metrics: Fixed a crash when inspecting the individual draw command of a foreground drawlist. 2021-08-17 16:23:26 +02:00
Oliver 'kfsone' Smith
7e9e1ff1c2 InputText: Fix named filtering flags disabling newline or tabs in multiline inputs (#4409, #4410) 2021-08-17 16:10:11 +02:00
ocornut
8fa502ca42 Nav: Alt doesn't toggle menu layer if other modifiers are held. (#4439) 2021-08-17 12:23:54 +02:00
ocornut
f99fe72c42 Backends: Win32: Fixed keyboard modifiers being reported when host window doesn't have focus. (#2622) 2021-08-02 17:22:33 +02:00
ocornut
db686ad522 Backends: Win32: Mouse position is correctly reported when the host platform window is hovered but not focused. (#2445, #2696, #3751, #4377) 2021-07-29 19:38:33 +02:00
ocornut
044fd0cd2d Backends: GLFW: Mouse position is correctly reported when the host platform window is hovered but not focused. (#3751, #4377, #2445) 2021-07-29 19:37:18 +02:00
ocornut
1cdd110eb4 Backends: SDL2: Mouse position is correctly reported when the host platform window is hovered but not focused. (#2445, #3751, #4377)
(requires SDL 2.0.5 because SDL_GetMouseFocus() is only usable with SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH).
2021-07-29 18:47:43 +02:00
David Maas
923bd2fd21 Examples: DirectX12: Fixed Alt+Enter fullscreen in DirectX12 example. (#4346, #4348)
This also removes unnecessary recreation of backend-owned device objects when the window is resized.
+ amend original PR with a g_pSwapChain->SetFullscreenState(false, NULL); call.
2021-07-26 16:39:09 +02:00
ocornut
b846969fe1 Removed unnecessary line in Begin() + commented out redirecting functions/enums names that were marked obsolete in 1.67 and 1.69 + readded commented obsoleted function. 2021-07-26 12:22:48 +02:00
Rokas Kupstys
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
sitic
9c77734447
Correct version 1.83 release date (#4355) 2021-07-24 02:07:11 +02:00
ocornut
fb4bbeb033 Disabled: fixed IsItemHovered() if popped disabled state after item, or when using Selectable_Disabled. (#211) 2021-07-12 15:43:17 +02:00
ocornut
638e1a721b Disabled: fixed IsItemHovered() returning true on disabled item when navigated to. (#211) 2021-07-12 15:01:02 +02:00
Rokas Kupstys
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
ocornut
cac869b333 Disabled: don't prevent Selectable() from being selected. (#211) + BeginMenu()/MenuItemEx() uses PushDisabled() the standard way.
ImGuiSelectableFlags_Disabled is now unused by the library and might be marked obsolete later.
2021-07-09 19:54:43 +02:00
ocornut
29525255f3 Disabled items more consistently release active id if the active item got disabled. (#211) 2021-07-09 19:54:41 +02:00
ocornut
f6682404e1 InputInt/InputFloat: When used with Steps values and _ReadOnly flag, the step button look disabled. (#211) 2021-07-09 19:54:34 +02:00
ocornut
4a100f7f11 Nav: Disabled items are not candidate for default focus. (#211, #787) + simplify handling of ImGuiButtonFlags_PressedOnDragDropHold path. 2021-07-09 18:57:23 +02:00
ocornut
f8fae02270 Menus: rework to allow for an icon column (not yet exposed, but usable via internals) + fix menus being affected by style.SelectableTextAlign (#126) 2021-07-08 15:05:02 +02:00
ocornut
30d164eb26 Backends: Win32: IME functions are disabled by default for non-Visual Studio compilers (MinGW etc.) (#2590, #738, #4185, #4301)
Enable with '#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS' for those compilers. Undo change from 1.82.
2021-07-08 14:23:31 +02:00
ocornut
baa4caf9e3 Backends: GLFW: Installing and exposed ImGui_ImplGlfw_MonitorCallback() for forward compatibility with docking branch.
+ Comments (#3934)
2021-07-07 14:12:48 +02:00
ocornut
d9b606672a InputText: Fix handling of paste failure (buffer full) which in some cases could corrupt the undo stack. (#4038) 2021-07-05 17:52:44 +02:00
ocornut
4ddb6b46c3 Drag and Drop: drop target highlight doesn't try to bypass host clipping rectangle. (#4281, #3272)
Revert 4b94738c
2021-06-30 16:12:52 +02:00
Giovanni Funchal
6792e1a3e0 Backends: SDL2: Remove unnecessary ImGui_ImplSDL2_NewFrame() parameter. (#3244) 2021-06-30 15:04:40 +02:00
ocornut
23a15834fa Fonts: Fix calling ClearTexData() (clearing CPU side font data) triggering an assert in NewFrame(). (#3487) + Backends: added additional assert to facilitate detecting user understand they haven't initialized a backend. 2021-06-29 18:16:47 +02:00
ocornut
4cec3a0467 Backends: support for multiple imgui context with little testing (#586, #1851, #2004, #3012, #3934, #4141)
I believe more renderer backends should work. GLFW/Win32/SDL/Vulkan probably have many issues.
2021-06-29 16:42:13 +02:00
ocornut
70c603854e Backends: moved global to a data structure to facilitate support for multi-contexts. (#586, #1851, #2004, #3012, #3934, #4141)
This is NOT enable multi-contexts for any backends
- in order to make this commit as harmless as possible, while containing all the cruft/renaming
-
2021-06-29 14:37:58 +02:00
Chaoya Li
2ab7f96f21 Backends: OpenGL3: Enable OES_vertex_array_object extension for emscripten/wasm build (#4266, #4267) 2021-06-25 16:19:55 +02:00
ocornut
9440974f66 Fonts: Add U+FFFD ("replacement character") to default asian glyphs ranges. Remove SetFallbackChar() (amend 0ffd99d31). (#4269) 2021-06-25 15:47:42 +02:00
ocornut
38165f420f Fonts: Prefer using U+FFFD character for fallback instead of '?'. Use U+FF0E dot character to construct an ellipsis if U+002E '.' is not available. (#4269) 2021-06-25 15:44:14 +02:00
Anthony
8ced41570e Backends: DX9: explicitely disable texture state stages after >= 1. (#4268)
imgui only uses texture stage state for stage 0
But any state set in stages >= 1 will affect rendering
Set stage 1 COLOROP to DISABLED, to deactivate stages >= 1
2021-06-25 12:33:38 +02:00
rokups
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
ocornut
e534c56485 Fonts: Functions with a 'float size_pixels' parameter can accept zero if it is set in ImFontSize::SizePixels. 2021-06-24 17:15:14 +02:00
ocornut
1965f38e9e ImGuiWindowFlags_UnsavedDocument/ImGuiTabItmeFlags_UnsavedDocument display a dot instead of a '*'. 2021-06-24 14:30:32 +02:00
Rokas Kupstys
0b8a247074 Backends: OSX: Added a fix for shortcuts using CTRL key instead of CMD key. (#4253) 2021-06-23 15:25:10 +02:00
Ivan Sokolov
0905439c31 Backends: OpenGL3: Destroy shader objects right away (#4244)
In OpenGL, after a shader program has been linked, shader objects don't need to be kept neither attached to the program nor in existence
2021-06-21 11:51:51 +02:00
ocornut
7c44d067e8 Tables: Fix invalid data in TableGetSortSpecs() when SpecsDirty flag is unset. (#4233)
Amend 4ce6bd8cf, but with usage of ImPool<> bug existed even before 4ce6bd8c. Would only materialize if user called (ableGetSortSpecs and used data without checking SpecsDirty.
2021-06-17 15:18:11 +02:00
ocornut
98a6292165 Backends: DX12: Fix texture casting crash on 32-bit systems (introduced on 2021/05/19 and v1.83) + added comments about building on 32-bit systems. (#4225) 2021-06-14 17:43:42 +02:00
ocornut
b66529fe3e Backends: Win32: Rework to handle certains Windows 8.1/10 features without a manifest. (#4200, #4191) 2021-06-08 18:38:20 +02:00
ocornut
020d1ced1d Examples: SDL2: Accomodate for vcpkg install having headers in SDL2/SDL.h vs SDL.h + vcpkg related comments. 2021-06-08 17:10:24 +02:00
ocornut
7fc144edde Examples: update all VS project files to VS2015. Update DX12 project Windows SDK to latest. 2021-06-08 17:08:49 +02:00
ocornut
6ee398ac2b Tables: Added ImGuiTableColumnFlags_Disabled acting a master disable over (hidden from user/context menu). (#3935, #3740) 2021-06-07 15:18:20 +02:00
ocornut
b918751ff4 Tables: Clarified that TableSetColumnEnabled() requires the table to use the ImGuiTableFlags_Hideable flag. (#3935) 2021-06-07 15:09:02 +02:00
ocornut
642426c15b Tables: Fix columns order on TableSetupScrollFreeze() if previous data got frozen columns out of their section. 2021-06-07 11:23:43 +02:00
ocornut
1b4323a1b4 Tables: Added ImGuiTableColumnFlags_NoHeaderLabel to request TableHeadersRow() to not submit label for a column. (#4206) 2021-06-07 09:11:53 +02:00
ocornut
a640d8a6d2 Fixed printf-style format checks on non-MinGW flavors. (#4183, #3592) 2021-05-31 13:03:50 +02:00