Child triggers fire; Auto Resource Reload; animation layer labels
Playback, renders and the preview's event label include the triggers of child animations (from this file or a library) as each child reaches them; libraries' sounds load with them, and a frame can mix several sounds. The reload setting is now Auto Resource Reload and covers libraries too. Animation layers are labeled by their animation (not a spritesheet) in the timeline and Item Properties as well as the Layers window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
280adaa189
commit
76c2186c81
16 files changed
+201
-97
No files matched your search
+10
-10
@@ -23,6 +23,15 @@ namespace anm2ed::imgui
|
||||
ImGui::TextUnformatted(std::vformat(localize.get(FORMAT_ID), std::make_format_args(id)).c_str());
|
||||
}
|
||||
|
||||
// "#id name", then what the layer shows: its spritesheet or its animation.
|
||||
std::string layer_label_get(const model::Layer& layer)
|
||||
{
|
||||
if (layer.is_animation())
|
||||
return std::vformat(localize.get(FORMAT_LAYER_ANIMATION),
|
||||
std::make_format_args(layer.id, layer.name, layer.animation));
|
||||
return std::vformat(localize.get(FORMAT_LAYER), std::make_format_args(layer.id, layer.name, layer.spritesheetId));
|
||||
}
|
||||
|
||||
model::Layer item_edit_layer_get(const Manager::ItemEdit& edit)
|
||||
{
|
||||
return {.name = edit.name,
|
||||
@@ -159,16 +168,7 @@ namespace anm2ed::imgui
|
||||
TOOLTIP_ADD_LAYER, TOOLTIP_REMOVE_UNUSED_LAYERS, EDIT_REMOVE_UNUSED_LAYERS,
|
||||
EDIT_PASTE_LAYERS, TOAST_DESERIALIZE_LAYERS_FAILED, layers_get);
|
||||
ListRows rows{
|
||||
.label_get =
|
||||
[&](int id)
|
||||
{
|
||||
auto layer = model::item_get(layers, id);
|
||||
if (layer->is_animation())
|
||||
return std::vformat(localize.get(FORMAT_LAYER_ANIMATION),
|
||||
std::make_format_args(layer->id, layer->name, layer->animation));
|
||||
return std::vformat(localize.get(FORMAT_LAYER),
|
||||
std::make_format_args(layer->id, layer->name, layer->spritesheetId));
|
||||
},
|
||||
.label_get = [&](int id) { return layer_label_get(*model::item_get(layers, id)); },
|
||||
.tooltip_draw =
|
||||
[&](int id)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user