Prevent a Popup from Closing #3939
EricStancliff
announced in
Old/Archived discussions
Replies: 1 comment
-
For now, I can do this when I know I'm in my "picking" mode:
But I'd love a more elegant solution if available because I'm sure this will ruin something down the line. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have kind of an interesting use case where I need to prevent a popup window from closing on outside click. To summarize, I have a window floating with a button that you can click which then prompts you to select an entity from my moving map (a non-gui item). Sometimes this button is within a standard window (works well) and sometimes it is within a popup window. The issue I'm having is that although I can detect the click of the item and capture the mouse from the rest of my app, I can't prevent the click away from closing my current popup stack. 99% of the time, I want the popup behavior as is, it's just when I'm doing this specific action that I want to be able to override that somehow. Any pointers or hints would be much appreciated as I'm sure I'm just missing something! Attached are code snippets and pictures.
In the attached picture, I'm ok with the menu closing when I select "Pick Target on Map" as I snap some text to the cursor to keep the user in the loop. But when I click on the airplane, The window with the "Pick" button disappears completely which I'd like to avoid. I'm trying to make the picker functionality work in both popups and persistent windows as it's a commonly used item in procedurally generated UIs for my project.
Thanks so much!
Beta Was this translation helpful? Give feedback.
All reactions