Disable movement of popup_context_window #1533

Closed
opened 2018-01-04 06:29:35 +00:00 by Shadowblitz16 · 3 comments
Shadowblitz16 commented 2018-01-04 06:29:35 +00:00 (Migrated from github.com)

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++?

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++?
ocornut commented 2018-01-04 10:27:13 +00:00 (Migrated from github.com)

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?

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 commented 2018-01-04 20:55:07 +00:00 (Migrated from github.com)

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.

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 commented 2018-01-07 17:21:30 +00:00 (Migrated from github.com)

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

@Shadowblitz16 With recent planned work I have exposed flags to `BeginPopup()` so it is possible to pass the `ImGuiWindowFlags_NoMove` flag to it now.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#1533
No description provided.