Commit Graph

7968 Commits

Author SHA1 Message Date
ocornut
64519c6875 Docking: Fixed floating docked nodes not being clamped into viewport workrect to stay reachable when g.ConfigWindowsMoveFromTitleBarOnly is set and multi-viewports are disabled. (#5044) 2022-02-22 16:21:10 +01:00
ocornut
7b0d58c5e5 Merge branch 'master' into docking 2022-02-22 14:57:17 +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
Jan Sikorski
a61ca097a7
Backends: OSX: Fix typo in scrolling event handler. (#5036) 2022-02-19 18:57:41 +01:00
ocornut
dca527be1b Clipper: Assert on extraneous calls to Step(). (#4822) + Demo tweak. 2022-02-18 18:40:43 +01:00
ocornut
9948535118 Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.cpp
#	imgui.h
#	imgui_draw.cpp
2022-02-17 18:47:43 +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
421e73e6db Fix an assert in metrics. 2022-02-17 15:36:00 +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
thedmd
5c8f8d0311 ImVector: Fixed erase() with empty range. (#5009) amend/fix b6b8f66
Actual change was missing in b6b8f66
2022-02-16 20:08:58 +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
ocornut
8d3906365d CI: Fixes for OSX + explicitely request C++11. 2022-02-15 17:25:11 +01:00
thedmd
b6b8f6634e ImVector: Fixed erase() with empty range. (#5009) 2022-02-15 11:16:08 +01:00
ocornut
5854da10e6 Declare other structures as constexpr (#4995) + rename ImGuiInputEventType_Char to ImGuiInputEventType_Text for consistency with event structure. 2022-02-11 12:29:55 +01:00
Jeff Mears
71f98dd056 Declare ImVec2 and ImVec4 constructors as constexpr (#4995) 2022-02-11 12:27:27 +01:00
ocornut
1e14cc5cae Viewports: Fixed main viewport size not matching ImDrawData::DisplaySize for one frame during resize when multi-viewports are disabled. (#4900) 2022-02-10 18:50:28 +01:00
Borislav Stanimirov
955aacfbc5
GCC: Disable deprecated-enum-enum-conversion for gcc as well (#4997) 2022-02-09 09:47:11 +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
aa86800092 Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally. (Merged from master+ rework for docking)
# Conflicts:
#	imgui.cpp
#	imgui_draw.cpp
2022-02-08 12:29:44 +01:00
ocornut
97b1abd6dd Internals: rework RenderMouseCursor() signature so we can use it in docking branch more naturally. 2022-02-08 12:22:46 +01:00
ocornut
1ee252772a Merge branch 'master' into docking
# Conflicts:
#	docs/CHANGELOG.txt
2022-02-07 18:20:10 +01:00
ocornut
c71a50deb5 Version 1.87 2022-02-07 18:16:54 +01:00
ocornut
033538731c Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
2022-02-07 16:18:19 +01:00
ocornut
e52bb147a7 Backends: GLFW: Added ImGui_ImplGlfw_InstallCallbacks()/ImGui_ImplGlfw_RestoreCallbacks(). (#4981) 2022-02-07 16:11:05 +01:00
ocornut
732bc2058e Backends: GLFW: Handle spurious leave/enter sequences apparently submitted by X11/GLFW combo. (#4984) 2022-02-07 15:59:49 +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
ocornut
31762a8173 Docking: fixed potential crash if a passthrough dock node is submitted without a child intermediate (currently not possible via API) 2022-02-03 12:04:11 +01:00
ocornut
5017602752 Backends: SDL: Amend 08350e5, multi-viewports mouse tracking works under Linux. (#4960) + Reword tests to help static analysis. 2022-02-03 11:52:03 +01:00
ocornut
37958ca1b5 Docking: Fixed CTRL+TAB back into a docked window not selecting menu layer when no item are on main layer.
Could merge on master.
2022-02-03 00:19:31 +01:00
ocornut
8eb8689391 Docking: Tabs use their own identifier (in order to make window->ID refer to whole window in test engine). Also prevents Tab ID from clashing with "" which was common. 2022-02-02 23:23:13 +01:00
ocornut
c1ab3c406f Docking: Fixed size constraints not working on single window holding on a dock id (still doesn't work on docked windows). 2022-02-02 23:10:14 +01:00
ocornut
d378e4088f Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_draw.cpp
2022-02-01 15:46:42 +01:00
ocornut
43177324c0 Backends: GLFW: Fixed miss untranslation of keypad keys. (#4921, #452) 2022-02-01 15:29:10 +01:00
ocornut
6f73dbea80 TestEngine: submit window data to item system. 2022-02-01 15:20:32 +01:00
ocornut
35e197f413 TestEngine: fixed InvisibleButton() and ArrowButton() not calling the info macro. 2022-02-01 11:52:38 +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
Clownacy
422902dbda Correct typos (#4954, #4955), use IM_STATIC_ASSERT now that old pre-C++11 macro has been obsoleted. 2022-01-31 11:58:33 +01:00
ocornut
08350e53e7 Backends: SDL: no support for ImGuiBackendFlags_HasMouseHoveredViewport under OSX/LInux (#4960) 2022-01-31 11:47:44 +01:00
ocornut
64d910ad37 Removed IMGUI_API from inline templated classes. (#4962) 2022-01-29 18:10:36 +01:00
ocornut
27004aca70 Revert moving ImGuiKeyModFlags to internal.h (amendc906c65)
# Conflicts:
#	imgui.cpp
2022-01-28 15:53:41 +01:00
ocornut
49e38a5b32 Revert moving ImGuiKeyModFlags to internal.h (amendc906c65) 2022-01-28 15:53:09 +01:00
ocornut
d5f0d45ae4 Merge branch 'master' into docking + remove two _PopUnusedDrawCmd() from docking branch, following 718daa1
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
2022-01-27 17:50:31 +01:00
ocornut
9def2b04d7 IO: Added simple (incomplete) filter for duplicates to reduce data spam. (#4921, #4858) 2022-01-27 17:46:48 +01:00