Several events per trigger, built-in stop and done events
A trigger holds a list of events (Frame Properties lists them like sounds); the first stays its EventId, the rest are <Event Id> children in the editor's copy, and the Isaac warning counts the dropped ones. In extended documents, stop and done are offered as built-in events: listed in italics at the top of Events, locked from renaming, and added to the file when a trigger first uses one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4375844c84
commit
b31a28ebe9
19 files changed
+195
-101
No files matched your search
@@ -828,7 +828,7 @@ namespace anm2ed::imgui
|
||||
if (animation && animation->triggers.isVisible && !isOnlyShowLayers && !manager.isRecording)
|
||||
{
|
||||
if (auto trigger = model::frame_generate(animation->triggers, frameTime);
|
||||
trigger.isVisible && trigger.eventId > -1)
|
||||
trigger.isVisible && !trigger.eventIds.empty())
|
||||
{
|
||||
auto clipMin = ImGui::GetItemRectMin();
|
||||
auto clipMax = ImGui::GetItemRectMax();
|
||||
@@ -838,8 +838,11 @@ namespace anm2ed::imgui
|
||||
drawList->PushClipRect(clipMin, clipMax);
|
||||
ImGui::PushFont(resources.fonts[font::BOLD].get(), font::SIZE_LARGE);
|
||||
auto triggerTextColor = isLightTheme ? TRIGGER_TEXT_COLOR_LIGHT : TRIGGER_TEXT_COLOR_DARK;
|
||||
if (auto event = model::item_get(model.content.events, trigger.eventId))
|
||||
drawList->AddText(textPos, ImGui::GetColorU32(triggerTextColor), event->name.c_str());
|
||||
std::string names{};
|
||||
for (auto eventId : trigger.eventIds)
|
||||
if (auto event = model::item_get(model.content.events, eventId))
|
||||
names += (names.empty() ? "" : ", ") + event->name;
|
||||
drawList->AddText(textPos, ImGui::GetColorU32(triggerTextColor), names.c_str());
|
||||
ImGui::PopFont();
|
||||
drawList->PopClipRect();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user