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
+11
-1
@@ -770,7 +770,17 @@ namespace anm2ed
|
||||
if (kind == SelectionKind::SPRITESHEETS) add(content.spritesheets, path_label_get(FORMAT_SPRITESHEET));
|
||||
if (kind == SelectionKind::SOUNDS) add(content.sounds, path_label_get(FORMAT_SOUND));
|
||||
if (kind == SelectionKind::LIBRARIES) add(content.libraries, path_label_get(FORMAT_SOUND));
|
||||
if (kind == SelectionKind::EVENTS) add(content.events, name_get);
|
||||
if (kind == SelectionKind::EVENTS)
|
||||
{
|
||||
add(content.events, name_get);
|
||||
// An extended document offers the built-in events it doesn't have yet.
|
||||
for (int i = 0; model.isExtendedFormat && i < (int)std::size(model::EVENT_BUILT_INS); ++i)
|
||||
if (std::ranges::find(content.events, model::EVENT_BUILT_INS[i], &model::Event::name) == content.events.end())
|
||||
{
|
||||
choices.ids.push_back(model::EVENT_BUILT_IN_ID_FIRST - i);
|
||||
choices.labels.emplace_back(model::EVENT_BUILT_INS[i]);
|
||||
}
|
||||
}
|
||||
if (kind == SelectionKind::SHADERS) add(content.shaders, name_get);
|
||||
if (kind == SelectionKind::REGIONS)
|
||||
if (auto spritesheet = model.layer_spritesheet_get(layerId)) add(spritesheet->regions, name_get);
|
||||
|
||||
Reference in new issue
Block a user