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:
Arnaud Jamin
2023-10-13 23:35:16 -04:00
parent 5b50d97cbd
commit 63f4a8b92f
16 changed files with 1033 additions and 39 deletions
@@ -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;
}