From 5848bc8eb7917de8a4a504426404e2f9f5e08aa9 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 18 Jan 2024 22:09:09 -0600 Subject: [PATCH] [nostalgia/core/studio] Change Subsheet Editor button position --- .../core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index c771ed49..e04c3636 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -499,14 +499,16 @@ void TileSheetEditorImGui::SubSheetEditor::draw() noexcept { } ImGui::OpenPopup(popupName); auto const modSize = m_cols > 0; + auto const popupWidth = 235.f; auto const popupHeight = modSize ? 125.f : 80.f; - ImGui::SetNextWindowSize(ImVec2(235, popupHeight)); + ImGui::SetNextWindowSize(ImVec2(popupWidth, popupHeight)); if (ImGui::BeginPopupModal(popupName, &m_show, modalFlags)) { ImGui::InputText("Name", m_name.data(), m_name.cap()); if (modSize) { ImGui::InputInt("Columns", &m_cols); ImGui::InputInt("Rows", &m_rows); } + ImGui::SetCursorPosX(popupWidth - 116); if (ImGui::Button("OK", ImVec2{50, 20})) { ImGui::CloseCurrentPopup(); m_show = false;