From d1e0b14561ed1dbfeafa0ec7cda728b430c9b3e9 Mon Sep 17 00:00:00 2001 From: shweet Date: Sun, 23 Nov 2025 02:55:48 -0500 Subject: [PATCH] fixed issue with new button welcome window --- src/imgui/taskbar.cpp | 5 +++-- src/imgui/window/animation_preview.cpp | 3 +-- src/imgui/window/welcome.cpp | 2 +- src/loader.cpp | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/imgui/taskbar.cpp b/src/imgui/taskbar.cpp index c58bc76..b231109 100644 --- a/src/imgui/taskbar.cpp +++ b/src/imgui/taskbar.cpp @@ -389,7 +389,8 @@ namespace anm2ed::imgui ImGui::SeparatorText("Autosave"); ImGui::Checkbox("Enabled", &editSettings.fileIsAutosave); - ImGui::SetItemTooltip("Enables autosaving of documents."); + ImGui::SetItemTooltip( + "Enables autosaving of documents.\n(Does not overwrite files; makes copies to restore later.)"); ImGui::BeginDisabled(!editSettings.fileIsAutosave); input_int_range("Time (minutes)", editSettings.fileAutosaveTime, 0, 10); @@ -397,7 +398,7 @@ namespace anm2ed::imgui ImGui::EndDisabled(); ImGui::SeparatorText("Snapshots"); - input_int_range("Stack Size", editSettings.fileSnapshotStackSize, 0, 1000); + input_int_range("Stack Size", editSettings.fileSnapshotStackSize, 0, 100); ImGui::SetItemTooltip("Set the maximum snapshot stack size of a document (i.e., how many undo/redos are " "preserved at a time)."); diff --git a/src/imgui/window/animation_preview.cpp b/src/imgui/window/animation_preview.cpp index 83d3237..af6cf3b 100644 --- a/src/imgui/window/animation_preview.cpp +++ b/src/imgui/window/animation_preview.cpp @@ -770,8 +770,7 @@ namespace anm2ed::imgui if (mouseWheel != 0 || isZoomIn || isZoomOut) { auto previousZoom = zoom; - zoom_set(zoom, pan, mouseWheel != 0 ? vec2(mousePos) : vec2(), - (mouseWheel > 0 || isZoomIn) ? zoomStep : -zoomStep); + zoom_set(zoom, pan, vec2(mousePos), (mouseWheel > 0 || isZoomIn) ? zoomStep : -zoomStep); if (zoom != previousZoom) hasPendingZoomPanAdjust = true; } } diff --git a/src/imgui/window/welcome.cpp b/src/imgui/window/welcome.cpp index 6eab222..7939e08 100644 --- a/src/imgui/window/welcome.cpp +++ b/src/imgui/window/welcome.cpp @@ -30,7 +30,7 @@ namespace anm2ed::imgui auto widgetSize = widget_size_with_row_get(2); - if (ImGui::Button("New", widgetSize)) dialog.file_open(dialog::ANM2_NEW); // handled in taskbar.cpp + if (ImGui::Button("New", widgetSize)) dialog.file_save(dialog::ANM2_NEW); // handled in taskbar.cpp ImGui::SameLine(); if (ImGui::Button("Open", widgetSize)) dialog.file_open(dialog::ANM2_OPEN); // handled in taskbar.cpp diff --git a/src/loader.cpp b/src/loader.cpp index 88949f4..ef4653a 100644 --- a/src/loader.cpp +++ b/src/loader.cpp @@ -215,6 +215,8 @@ namespace anm2ed continue; } + SDL_FlashWindow(window, SDL_FLASH_UNTIL_FOCUSED); + auto paths = socket_paths_receive(client); for (auto& path : paths) {