UI Scale and render Scale are entered as percents

input_percent_range edits a multiplier setting as a percent, so saved
settings keep their meaning. UI Scale: 50-200% in 25% steps; render Scale:
10-1000%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-03 20:05:27 -04:00
1 parent 640bf0abeb
commit e6a374f571
5 files changed
+19 -3

No files matched your search

+4 -2
View File
@@ -1,5 +1,6 @@
#include "configure.hpp"
#include "math.hpp"
#include "sdl.hpp"
#include "util/imgui/input.hpp"
#include "util/imgui/layout.hpp"
@@ -7,6 +8,7 @@
#include "util/imgui/theme.hpp"
using namespace anm2ed::types;
using namespace anm2ed::util;
namespace anm2ed::imgui::wizard
{
@@ -25,8 +27,8 @@ namespace anm2ed::imgui::wizard
if (ImGui::BeginChild("##Tab Child", childSize, true))
{
ImGui::SeparatorText(localize.get(LABEL_WINDOW_MENU));
input_float_range(localize.get(LABEL_UI_SCALE), temporary.uiScale, UI_SCALE_MIN, UI_SCALE_MAX,
UI_SCALE_STEP, UI_SCALE_STEP, "%.2fx");
input_percent_range(localize.get(LABEL_UI_SCALE), temporary.uiScale, UI_SCALE_MIN, UI_SCALE_MAX,
math::unit_to_percent(UI_SCALE_STEP), math::unit_to_percent(UI_SCALE_STEP));
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_UI_SCALE));
ImGui::Checkbox(localize.get(LABEL_VSYNC), &temporary.isVsync);
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_VSYNC));
+1 -1
View File
@@ -229,7 +229,7 @@ namespace anm2ed::imgui::wizard
ImGui::BeginDisabled(!isUseAnimationBounds);
{
input_float_range(localize.get(BASIC_SCALE), scale, 0.1f, 100.0f, 1.0f, STEP_FAST, "%.1fx");
input_percent_range(localize.get(BASIC_SCALE), scale, RENDER_SCALE_MIN, RENDER_SCALE_MAX);
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_SCALE_OUTPUT));
}
ImGui::EndDisabled();