[nostalgia/core/studio/tilesheet] Rework operation ctrls into a dropbox
Some checks failed
Build / build (push) Failing after 1m1s
Some checks failed
Build / build (push) Failing after 1m1s
This commit is contained in:
parent
1bc18e34a8
commit
105a1e5559
@ -246,23 +246,31 @@ void TileSheetEditorImGui::draw(studio::StudioContext&) noexcept {
|
||||
//ig::ComboBox("##Operations", ox::Array<ox::CStringView, 1>{"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>{{
|
||||
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user