Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topmost modal #7158

Open
SuperWangKai opened this issue Dec 21, 2023 · 1 comment
Open

Topmost modal #7158

SuperWangKai opened this issue Dec 21, 2023 · 1 comment

Comments

@SuperWangKai
Copy link

SuperWangKai commented Dec 21, 2023

Version/Branch of Dear ImGui:

Version: XXX
Branch: XXX (master/viewport/docking/etc.)

Back-end/Renderer/Compiler/OS

Dear ImGui 1.90.1 WIP (19002)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1938
define: _MSVC_LANG=201402
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_win32
io.BackendRendererName: imgui_impl_dx12
io.ConfigFlags: 0x00000443
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C0E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 HasMouseHoveredViewport
 RendererHasVtxOffset
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1264.00,761.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

My Issue/Question:

For the docking branch, platform windows are on top of the main window. When we use modal, the platform window can cover and block the modal. This could totally block any user interaction. In my case, the modal window is used to confirm exit and it is always centered in the main window, in this case, if it is covered by any platform window, user cannot click on the buttons, causing an unusable situation.

Screenshots/Video
image

@SuperWangKai
Copy link
Author

SuperWangKai commented Dec 21, 2023

Another question is how to make a modal on top of others.
In the ImGui demo code, modal on top of another modal (Add another modal..) is demonstrated, however, in a more practical situation, like my exit confirmation popup, I could not embed it within other modals. How to make sure that the exit modal is always top most?

Thanks!

@SuperWangKai SuperWangKai changed the title Topmost modal in docking branch Topmost modal Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants