minor bug fixes

This commit is contained in:
2025-12-03 02:11:25 -05:00
parent 24f98fe0a0
commit b4fddb7714
9 changed files with 26 additions and 7 deletions
+1
View File
@@ -220,6 +220,7 @@ namespace anm2ed::imgui
auto add = [&]()
{
anm2::Animation animation;
animation.name = localize.get(TEXT_NEW_ANIMATION);
if (anm2::Animation* referenceAnimation = document.animation_get())
{
for (auto [id, layerAnimation] : referenceAnimation->layerAnimations)
+3 -1
View File
@@ -127,7 +127,9 @@ namespace anm2ed::imgui
auto add = [&]()
{
auto id = map::next_id_get(anm2.content.events);
anm2.content.events[id] = anm2::Event();
anm2::Event event{};
event.name = localize.get(TEXT_NEW_EVENT);
anm2.content.events[id] = event;
selection = {id};
reference = {id};
newEventId = id;
+6 -2
View File
@@ -31,9 +31,11 @@ namespace anm2ed::imgui
auto widgetSize = widget_size_with_row_get(2);
if (ImGui::Button(localize.get(BASIC_NEW), widgetSize)) dialog.file_save(dialog::ANM2_NEW); // handled in taskbar.cpp
if (ImGui::Button(localize.get(BASIC_NEW), widgetSize))
dialog.file_save(dialog::ANM2_NEW); // handled in taskbar.cpp
ImGui::SameLine();
if (ImGui::Button(localize.get(BASIC_OPEN), widgetSize)) dialog.file_open(dialog::ANM2_OPEN); // handled in taskbar.cpp
if (ImGui::Button(localize.get(BASIC_OPEN), widgetSize))
dialog.file_open(dialog::ANM2_OPEN); // handled in taskbar.cpp
if (ImGui::BeginChild("##Recent Files Child", {}, ImGuiChildFlags_Borders))
{
@@ -97,6 +99,8 @@ namespace anm2ed::imgui
ImGui::EndPopup();
}
selectable_input_text_id() = {};
}
}