feat: add runtime play tick and play-mode scene editing semantics

This commit is contained in:
2026-04-02 19:37:35 +08:00
parent e30f5d5ffa
commit fb15d60be9
28 changed files with 2016 additions and 45 deletions

View File

@@ -511,27 +511,27 @@ bool DrawCompactCheckedMenuItem(const char* label, bool checked) {
return false;
}
const bool clicked = ImGui::Selectable(label, false, ImGuiSelectableFlags_SpanAvailWidth);
const bool clicked = ImGui::MenuItem(label, nullptr, false, true);
const ImRect rect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax());
if (checked) {
const ImRect rect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax());
ImDrawList* drawList = ImGui::GetWindowDrawList();
const ImU32 color = ImGui::GetColorU32(ImGuiCol_CheckMark);
const float height = rect.Max.y - rect.Min.y;
const float checkWidth = height * 0.28f;
const float checkHeight = height * 0.18f;
const float x = rect.Max.x - 12.0f;
const float checkWidth = height * 0.24f;
const float checkHeight = height * 0.16f;
const float x = rect.Max.x - 10.0f;
const float y = rect.Min.y + height * 0.52f;
drawList->AddLine(
ImVec2(x - checkWidth, y - checkHeight * 0.15f),
ImVec2(x - checkWidth * 0.42f, y + checkHeight),
color,
1.4f);
1.8f);
drawList->AddLine(
ImVec2(x - checkWidth * 0.42f, y + checkHeight),
ImVec2(x + checkWidth, y - checkHeight),
color,
1.4f);
1.8f);
}
return clicked;
@@ -973,7 +973,7 @@ void ConsolePanel::Render() {
}
if (shouldPause) {
m_context->GetEventBus().Publish(PlayModePausedEvent{});
m_context->GetEventBus().Publish(PlayModePauseRequestedEvent{});
m_playModePaused = true;
}
m_lastErrorPauseScanSerial = latestSerial;