Commit Graph

1178 Commits

Author SHA1 Message Date
ocornut
f9b5168fb3 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
2021-08-02 16:00:50 +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
omar
c720075c67
Update FAQ to clarify conflict with window (#4158, #4008, #2562) 2021-07-28 16:46:59 +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
7bfc379a23 Merge branch 'master' into docking
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
2021-07-19 21:58:06 +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
ocornut
a11f36811f Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_win32.cpp
#	imgui.cpp
#	imgui_internal.h
2021-07-09 20:16:19 +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
omar
03ca38eda1
Update FAQ 2021-07-08 16:10:30 +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
696d3e056e Internals: Menus: Naming offset field + fix spacing/offset computation to handle more offsets. 2021-07-07 20:47:37 +02:00
ocornut
eb6f4b1a6a Docking: Fix crash when a dock node gets re-qualified as dockspace>floating>dockspace.. (#3203, #4295)
Which tends to happen when incorrectly calling DockBuilderAddNode() without ImGuiDockNodeFlags_Dockspace and using it as a Dockspace on the next frame after the floating window hosting the node has been automatically created.
2021-07-07 18:22:55 +02:00
ocornut
cd4cc9ff0d Docking: Fixed crash issues using DockBuilderRemoveNode() in some situations. (#3111, #3179, #3203, #4295)
If the deleted root node isn't part of a dockspace with a central node, it won't be "protected" but removed when last window gets removed.
2021-07-07 16:39:39 +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
6136b3844b Docking: Reworked node flags saving/inheritance... (#4292, #3834, #3633, #3521, #3492, #3335, #2999, #2648)
..so that flags enforced by docked windows via the DockNodeFlagsOverrideSet mechanism are are not left in empty dockspace nodes once the windows gets undocked.
2021-07-05 13:31:34 +02:00
ocornut
0a8ab75e4b Docking: removed DockNodeFlagsOverrideClear flags from ImGuiWindowClass. (#2999, #3521, #3633)
+ extraded bits of metrics into DebugNodeDockNodeFlags()
2021-07-05 12:58:33 +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
ocornut
cf2daf353e Backends: Cleanup, removed unnecessary create/destroy wrappers. Fix allegro5 backend + use same code as other backend.
+ Update gallery links (#4280)
2021-06-30 15:50:15 +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
682447306d Merge branch 'features/backends_context' into docking
# Conflicts:
#	backends/imgui_impl_dx10.cpp
#	backends/imgui_impl_dx11.cpp
#	backends/imgui_impl_dx12.cpp
#	backends/imgui_impl_dx9.cpp
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl2.cpp
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_sdl.cpp
#	backends/imgui_impl_vulkan.cpp
#	backends/imgui_impl_win32.cpp
#	examples/example_apple_opengl2/main.mm
2021-06-29 14:53:25 +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
ac35b4bba2 Merge branch 'master' into docking
# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
2021-06-24 18:21:19 +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
cce307a2be Viewports: Fix popup/tooltip created without a parent window from being given a ParentViewportId value of the implicit/fallback window. (#4236, #2409)
Amend 3ead9820
2021-06-17 16:22:14 +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
0cca0d1617 Internals/experimental: BeginComboPreview(), EndComboPreview(). (#4168, #1658)
(amended)
2021-06-15 15:27:28 +02:00
Michel Lesoinne
90deb0959a Backends, Viewports: Vulkan: Fix the use of the incorrect fence in wait for fence. (#4208)
The fence being waited upon was not the one associated with the current frame.
This results in validation error detecting a reset of command buffers still in use and resetting fences while still in use.
Read more details in #4208
2021-06-14 17:54:19 +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