Added SetNextWindowSizeConstraint() + demo code (#668)

This commit is contained in:
ocornut
2016-05-21 22:53:08 +02:00
parent 753bf5cefe
commit b7ebeb1610
4 changed files with 103 additions and 8 deletions

View File

@ -394,6 +394,10 @@ struct ImGuiContext
ImGuiSetCond SetNextWindowSizeCond;
ImGuiSetCond SetNextWindowContentSizeCond;
ImGuiSetCond SetNextWindowCollapsedCond;
ImRect SetNextWindowSizeConstraintRect; // Valid if 'SetNextWindowSizeConstraint' is true
ImGuiSizeConstraintCallback SetNextWindowSizeConstraintCallback;
void* SetNextWindowSizeConstraintCallbackUserData;
bool SetNextWindowSizeConstraint;
bool SetNextWindowFocus;
bool SetNextTreeNodeOpenVal;
ImGuiSetCond SetNextTreeNodeOpenCond;
@ -472,6 +476,8 @@ struct ImGuiContext
SetNextWindowContentSizeCond = 0;
SetNextWindowCollapsedCond = 0;
SetNextWindowFocus = false;
SetNextWindowSizeConstraintCallback = NULL;
SetNextWindowSizeConstraintCallbackUserData = NULL;
SetNextTreeNodeOpenVal = false;
SetNextTreeNodeOpenCond = 0;