diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index 6b8fc250..48c7583b 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -246,23 +246,31 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept { //ig::ComboBox("##Operations", ox::Array{"Operations"}, i); } ImGui::EndChild(); - ImGui::BeginChild("OperationsBox", {0, 32}, true); + ImGui::BeginChild("OperationsBox", {0, 35}, ImGuiWindowFlags_NoTitleBar); { - auto constexpr btnSz = ImVec2{75, 16}; - if (ig::PushButton("Flip X", {55, 16})) { - oxLogError(m_model.flipX()); - } - ImGui::SameLine(); - if (ig::PushButton("Flip Y", {55, 16})) { - oxLogError(m_model.flipY()); - } - ImGui::SameLine(); - if (ig::PushButton("Rotate Left", {80, 16})) { - oxLogError(m_model.rotateLeft()); - } - ImGui::SameLine(); - if (ig::PushButton("Rotate Right", {80, 16})) { - oxLogError(m_model.rotateRight()); + size_t i{}; + if (ig::ComboBox("##Operations", ox::SpanView{{ + ox::CStringView{"Operations"}, + ox::CStringView{"Flip X"}, + ox::CStringView{"Flip Y"}, + ox::CStringView{"Rotate Left"}, + ox::CStringView{"Rotate Right"}, + }}, i)) { + switch (i) { + case 1: + oxLogError(m_model.flipX()); + break; + case 2: + oxLogError(m_model.flipY()); + break; + case 3: + oxLogError(m_model.rotateLeft()); + break; + case 4: + oxLogError(m_model.rotateRight()); + break; + default:; + } } } ImGui::EndChild();