pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping

Home Page:https://pthom.github.io/hello_imgui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drag/move window without decorations?

awaowouwu opened this issue · comments

Hello, is it possible to make "backend window" of GLFW draggable for example by grabbing the top "menu bar"?
I'd like to replace OS window decorations with my own, but then I think there's no way to drag the window around.
I don't use fullscreen or docking, I'd just like to render one small window with it.

Hello,

See configWindowsMoveFromTitleBarOnly in ImGui window params

If false, windows can be dragged from anywhere

Hello,

See configWindowsMoveFromTitleBarOnly in ImGui window params

If false, windows can be dragged from anywhere

Sorry, this works only for inner ImGui windows, not for the main app window.

don't use fullscreen or docking, I'd just like to render one small window with it.

In that case, I don't think of an immediate solution. You may handle this by yourself for example by calling

    auto pos = ImGui::GetMousePos();
    if (pos somewhere near the menu bar)
       if (ImGui::IsMouseDragging(0))
          move the backend window