[nostalgia/core/studio/tilesheet] Rework operation ctrls into a dropbox
Some checks failed
Build / build (push) Failing after 1m1s

This commit is contained in:
Gary Talent 2025-02-02 20:43:01 -06:00
parent 1bc18e34a8
commit 105a1e5559

View File

@ -246,23 +246,31 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept {
//ig::ComboBox("##Operations", ox::Array<ox::CStringView, 1>{"Operations"}, i); //ig::ComboBox("##Operations", ox::Array<ox::CStringView, 1>{"Operations"}, i);
} }
ImGui::EndChild(); ImGui::EndChild();
ImGui::BeginChild("OperationsBox", {0, 32}, true); ImGui::BeginChild("OperationsBox", {0, 35}, ImGuiWindowFlags_NoTitleBar);
{ {
auto constexpr btnSz = ImVec2{75, 16}; size_t i{};
if (ig::PushButton("Flip X", {55, 16})) { if (ig::ComboBox("##Operations", ox::SpanView<ox::CStringView>{{
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()); oxLogError(m_model.flipX());
} break;
ImGui::SameLine(); case 2:
if (ig::PushButton("Flip Y", {55, 16})) {
oxLogError(m_model.flipY()); oxLogError(m_model.flipY());
} break;
ImGui::SameLine(); case 3:
if (ig::PushButton("Rotate Left", {80, 16})) {
oxLogError(m_model.rotateLeft()); oxLogError(m_model.rotateLeft());
} break;
ImGui::SameLine(); case 4:
if (ig::PushButton("Rotate Right", {80, 16})) {
oxLogError(m_model.rotateRight()); oxLogError(m_model.rotateRight());
break;
default:;
}
} }
} }
ImGui::EndChild(); ImGui::EndChild();