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

Disable movement of popup_context_window #1533

Closed
Shadowblitz16 opened this issue Jan 4, 2018 · 3 comments
Closed

Disable movement of popup_context_window #1533

Shadowblitz16 opened this issue Jan 4, 2018 · 3 comments
Labels

Comments

@Shadowblitz16
Copy link

Shadowblitz16 commented Jan 4, 2018

Hello I am using a gamemaker port of this library and I was wondering how to make a rightclick context menu while disallowing it to be dragged around.
could you show me a example on how to do this in c++?

@Shadowblitz16 Shadowblitz16 reopened this Jan 4, 2018
@Shadowblitz16 Shadowblitz16 changed the title disable movement of popup_context disable movement of popup_context_window Jan 4, 2018
@ocornut
Copy link
Owner

ocornut commented Jan 4, 2018

You cannot at the moment.

You'd essentially need to pass the ImGuiWindowFlags_NoMove flags to the Begin() call, but for various reasons you can't yourself since flags are not exposed to BeginPopup() and BeginPopupContextItem(), unless you use and rely on the imgui_internal.h private API.

May I ask what is the reason you want to disable dragging around?

@Shadowblitz16
Copy link
Author

thankyou for your time
ya thats what I was thinking but I couldn't find a way to pass that flag in
I want it like this so its more like a window7 context strips where its not able to be dragged around.
not much of a reason behind it besides the feel and looks, but I feel that these things should be able to be done.

@ocornut ocornut changed the title disable movement of popup_context_window Disable movement of popup_context_window Jan 5, 2018
@ocornut ocornut added the popups label Jan 5, 2018
ocornut added a commit that referenced this issue Jan 7, 2018
… reopen_existing which is always true. This also makes the public API on par with OpenPopupEx(). (#1497, #1533)
@ocornut
Copy link
Owner

ocornut commented Jan 7, 2018

@Shadowblitz16
With recent planned work I have exposed flags to BeginPopup() so it is possible to pass the ImGuiWindowFlags_NoMove flag to it now.

@ocornut ocornut closed this as completed Jan 7, 2018
ocornut added a commit that referenced this issue Jun 6, 2018
…p() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).

Followup/fix the change made in deab2ab
ocornut added a commit that referenced this issue Feb 8, 2024
…on a BeginMenu() followed by right-arrow. (#1497, #1533)

  reopen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants