mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Viewports: rework viewport's WorkOffset (positive top-left, negative top-right0 into WorkInset (positive everywhere). (#7823)
This commit is contained in:
parent
139e99ca37
commit
cfd23957fb
3 changed files with 21 additions and 16 deletions
|
|
@ -8559,9 +8559,9 @@ bool ImGui::BeginViewportSideBar(const char* name, ImGuiViewport* viewport_p, Im
|
|||
|
||||
// Report our size into work area (for next frame) using actual window size
|
||||
if (dir == ImGuiDir_Up || dir == ImGuiDir_Left)
|
||||
viewport->BuildWorkOffsetMin[axis] += axis_size;
|
||||
viewport->BuildWorkInsetMin[axis] += axis_size;
|
||||
else if (dir == ImGuiDir_Down || dir == ImGuiDir_Right)
|
||||
viewport->BuildWorkOffsetMax[axis] -= axis_size;
|
||||
viewport->BuildWorkInsetMax[axis] += axis_size;
|
||||
}
|
||||
|
||||
window_flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDocking;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue