[jasper/world/studio/worldobjectseteditor] Disable Interval for objects with only 1 frame
This commit is contained in:
parent
d5d22372e1
commit
d33eef2be6
@ -188,11 +188,15 @@ void WorldObjectSetEditorImGui::drawObjEditor() noexcept {
|
||||
std::ignore = pushCommand<EditObjectFrames>(
|
||||
m_doc, m_selectedObj, static_cast<uint8_t>(m_objEditor.frames));
|
||||
}
|
||||
ImGui::BeginDisabled(m_objEditor.frames < 2);
|
||||
{
|
||||
if (ImGui::InputInt("Interval (ms)", &m_objEditor.interval, 50, 1000)) {
|
||||
m_objEditor.interval = ox::clamp(m_objEditor.interval, 50, 65535);
|
||||
std::ignore = pushCommand<EditObjectInterval>(
|
||||
m_doc, m_selectedObj, static_cast<uint16_t>(m_objEditor.interval));
|
||||
}
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Subsheet:");
|
||||
ImGui::BeginChild("SubsheetSelector", {300, 300});
|
||||
|
Loading…
x
Reference in New Issue
Block a user