[studio] Cleanup
This commit is contained in:
parent
5d3d9229b7
commit
48e45c7dd6
@ -102,15 +102,16 @@ void StudioUI::handleKeyEvent(turbine::Key const key, bool const down) noexcept
|
||||
void StudioUI::draw() noexcept {
|
||||
glutils::clearScreen();
|
||||
drawMenu();
|
||||
auto const viewport = ImGui::GetMainViewport();
|
||||
constexpr auto menuHeight = 18;
|
||||
ImGui::SetNextWindowPos(ImVec2(viewport->Pos.x, viewport->Pos.y + menuHeight));
|
||||
ImGui::SetNextWindowSize(ImVec2(viewport->Size.x, viewport->Size.y - menuHeight));
|
||||
constexpr auto windowFlags = ImGuiWindowFlags_NoTitleBar
|
||||
| ImGuiWindowFlags_NoResize
|
||||
| ImGuiWindowFlags_NoMove
|
||||
| ImGuiWindowFlags_NoScrollbar
|
||||
| ImGuiWindowFlags_NoSavedSettings;
|
||||
auto const&viewport = *ImGui::GetMainViewport();
|
||||
ImGui::SetNextWindowPos(viewport.WorkPos);
|
||||
ImGui::SetNextWindowSize(viewport.WorkSize);
|
||||
ImGui::SetNextWindowViewport(viewport.ID);
|
||||
auto constexpr windowFlags =
|
||||
ImGuiWindowFlags_NoTitleBar |
|
||||
ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_NoMove |
|
||||
ImGuiWindowFlags_NoScrollbar |
|
||||
ImGuiWindowFlags_NoSavedSettings;
|
||||
ImGui::Begin("MainWindow##Studio", nullptr, windowFlags);
|
||||
{
|
||||
if (m_showProjectExplorer) {
|
||||
@ -118,7 +119,7 @@ void StudioUI::draw() noexcept {
|
||||
ImGui::SameLine();
|
||||
}
|
||||
drawTabBar();
|
||||
for (auto &w: m_widgets) {
|
||||
for (auto const&w : m_widgets) {
|
||||
w->draw(m_sctx);
|
||||
}
|
||||
for (auto const p : m_popups) {
|
||||
|
Loading…
Reference in New Issue
Block a user