[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);
|
//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>{{
|
||||||
oxLogError(m_model.flipX());
|
ox::CStringView{"Operations"},
|
||||||
}
|
ox::CStringView{"Flip X"},
|
||||||
ImGui::SameLine();
|
ox::CStringView{"Flip Y"},
|
||||||
if (ig::PushButton("Flip Y", {55, 16})) {
|
ox::CStringView{"Rotate Left"},
|
||||||
oxLogError(m_model.flipY());
|
ox::CStringView{"Rotate Right"},
|
||||||
}
|
}}, i)) {
|
||||||
ImGui::SameLine();
|
switch (i) {
|
||||||
if (ig::PushButton("Rotate Left", {80, 16})) {
|
case 1:
|
||||||
oxLogError(m_model.rotateLeft());
|
oxLogError(m_model.flipX());
|
||||||
}
|
break;
|
||||||
ImGui::SameLine();
|
case 2:
|
||||||
if (ig::PushButton("Rotate Right", {80, 16})) {
|
oxLogError(m_model.flipY());
|
||||||
oxLogError(m_model.rotateRight());
|
break;
|
||||||
|
case 3:
|
||||||
|
oxLogError(m_model.rotateLeft());
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
oxLogError(m_model.rotateRight());
|
||||||
|
break;
|
||||||
|
default:;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user