Nav: fixed using NavMenu/windowing select when no window is already focused + cleanup code (#323)

This commit is contained in:
ocornut
2016-07-31 16:07:58 +02:00
parent 1ecbf73c97
commit e9c881e4de
2 changed files with 36 additions and 19 deletions

View File

@ -746,7 +746,6 @@ public:
ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight())); }
float MenuBarHeight() const { return (Flags & ImGuiWindowFlags_MenuBar) ? CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f : 0.0f; }
ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight(); return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight()); }
bool IsNavigableTo() const { return Active && this == RootNonPopupWindow && (!(Flags & ImGuiWindowFlags_NoNavFocus) || this == GImGui->NavWindow); }
};
//-----------------------------------------------------------------------------