[nostalgia/core/studio] Adjust size of SubSheet Editor in cases without size input
This commit is contained in:
@@ -248,10 +248,12 @@ void TileSheetEditorImGui::SubSheetEditor::draw() noexcept {
|
||||
return;
|
||||
}
|
||||
ImGui::OpenPopup(popupName);
|
||||
ImGui::SetNextWindowSize(ImVec2(235, 125));
|
||||
const auto modSize = m_cols > 0;
|
||||
const auto popupHeight = modSize ? 125.f : 80.f;
|
||||
ImGui::SetNextWindowSize(ImVec2(235, popupHeight));
|
||||
if (ImGui::BeginPopupModal(popupName, &m_show, modalFlags)) {
|
||||
ImGui::InputText("Name", m_name.data(), m_name.cap());
|
||||
if (m_cols != -1) {
|
||||
if (modSize) {
|
||||
ImGui::InputInt("Columns", &m_cols);
|
||||
ImGui::InputInt("Rows", &m_rows);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user