Merge branch 'master' into viewport

# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
This commit is contained in:
omar
2018-04-25 18:13:23 +02:00
3 changed files with 18 additions and 13 deletions

View File

@ -323,7 +323,6 @@ struct IMGUI_API ImRect
void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; }
void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; }
void Translate(const ImVec2& d) { Min.x += d.x; Min.y += d.y; Max.x += d.x; Max.y += d.y; }
void Translate(float dx, float dy) { Min.x += dx; Min.y += dy; Max.x += dx; Max.y += dy; }
void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); } // Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display.
void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } // Full version, ensure both points are fully clipped.
void Floor() { Min.x = (float)(int)Min.x; Min.y = (float)(int)Min.y; Max.x = (float)(int)Max.x; Max.y = (float)(int)Max.y; }
@ -984,10 +983,9 @@ struct IMGUI_API ImGuiWindow
int AutoFitChildAxises;
ImGuiDir AutoPosLastDirection;
int HiddenFrames;
ImGuiCond SetWindowPosAllowFlags; // store accepted condition flags for SetNextWindowPos() use.
ImGuiCond SetWindowSizeAllowFlags; // store accepted condition flags for SetNextWindowSize() use.
ImGuiCond SetWindowCollapsedAllowFlags; // store accepted condition flags for SetNextWindowCollapsed() use.
ImGuiCond SetWindowPosAllowFlags; // store acceptable condition flags for SetNextWindowPos() use.
ImGuiCond SetWindowSizeAllowFlags; // store acceptable condition flags for SetNextWindowSize() use.
ImGuiCond SetWindowCollapsedAllowFlags; // store acceptable condition flags for SetNextWindowCollapsed() use.
ImVec2 SetWindowPosVal; // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
ImVec2 SetWindowPosPivot; // store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
@ -1003,6 +1001,7 @@ struct IMGUI_API ImGuiWindow
ImVector<ImGuiColumnsSet> ColumnsStorage;
float FontWindowScale; // User scale multiplier per-window
float FontDpiScale;
ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
ImDrawList DrawListInst;
ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.