mirror of
https://github.com/Ed94/Cog.git
synced 2026-07-11 20:21:26 -07:00
Add Inspector window
Add Inspector window Hide main menu widgets when the width gets too small Add log category description Renaming
This commit is contained in:
@@ -323,16 +323,25 @@ void UCogWindowManager::RenderMainMenu()
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
const float MinCursorX = ImGui::GetCursorPosX();
|
||||
float CursorX = ImGui::GetWindowWidth();
|
||||
|
||||
for (UCogWindow* Window : MainMenuWidgets)
|
||||
{
|
||||
float Width = 0.0f;
|
||||
Window->DrawMainMenuWidget(false, Width);
|
||||
Window->RenderMainMenuWidget(false, Width);
|
||||
|
||||
//-------------------------------------------
|
||||
// Stop drawing if there is not enough room
|
||||
//-------------------------------------------
|
||||
if (CursorX - Width < MinCursorX)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
CursorX -= Width;
|
||||
ImGui::SetCursorPosX(CursorX);
|
||||
Window->DrawMainMenuWidget(true, Width);
|
||||
Window->RenderMainMenuWidget(true, Width);
|
||||
|
||||
CursorX -= ImGui::GetStyle().ItemSpacing.x;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user