tweak some variables here and there

This commit is contained in:
2025-11-19 23:04:52 -05:00
parent ab65eb7c58
commit 009b285baa
5 changed files with 17 additions and 12 deletions

View File

@@ -262,7 +262,7 @@ namespace anm2ed::imgui
auto& rows = settings.generateRows;
auto& columns = settings.generateColumns;
auto& count = settings.generateCount;
auto& delay = settings.generateDelay;
auto& delay = settings.generateDuration;
auto& zoom = settings.generateZoom;
auto& zoomStep = settings.inputZoomStep;
@@ -278,7 +278,7 @@ namespace anm2ed::imgui
input_int_range("Count", count, anm2::FRAME_NUM_MIN, rows * columns);
ImGui::InputInt("Delay", &delay, STEP, STEP_FAST);
ImGui::InputInt("Duration", &delay, STEP, STEP_FAST);
}
ImGui::EndChild();
@@ -513,6 +513,11 @@ namespace anm2ed::imgui
settings = editSettings;
imgui::theme_set((theme::Type)editSettings.theme);
manager.chords_set(settings);
ImGui::GetIO().KeyRepeatDelay = settings.keyboardRepeatDelay;
ImGui::GetIO().KeyRepeatRate = settings.keyboardRepeatRate;
ImGui::GetStyle().FontScaleMain = settings.uiScale;
SnapshotStack::max_size_set(settings.fileSnapshotStackSize);
for (auto& document : manager.documents)
document.snapshots.apply_limit();

View File

@@ -137,7 +137,7 @@ namespace anm2ed::imgui
auto& isPivot = settings.changeIsPivot;
auto& isScale = settings.changeIsScale;
auto& isRotation = settings.changeIsRotation;
auto& isDelay = settings.changeIsDelay;
auto& isDuration = settings.changeIsDuration;
auto& isTint = settings.changeIsTint;
auto& isColorOffset = settings.changeIsColorOffset;
auto& isVisibleSet = settings.changeIsVisibleSet;
@@ -148,7 +148,7 @@ namespace anm2ed::imgui
auto& pivot = settings.changePivot;
auto& scale = settings.changeScale;
auto& rotation = settings.changeRotation;
auto& duration = settings.changeDelay;
auto& duration = settings.changeDuration;
auto& tint = settings.changeTint;
auto& colorOffset = settings.changeColorOffset;
auto& isVisible = settings.changeIsVisible;
@@ -190,7 +190,7 @@ namespace anm2ed::imgui
float2_value("##Is Pivot", "Pivot", isPivot, pivot);
float2_value("##Is Scale", "Scale", isScale, scale);
float_value("##Is Rotation", "Rotation", isRotation, rotation);
duration_value("##Is Delay", "Delay", isDelay, duration);
duration_value("##Is Duration", "Duration", isDuration, duration);
color4_value("##Is Tint", "Tint", isTint, tint);
color3_value("##Is Color Offset", "Color Offset", isColorOffset, colorOffset);
bool_value("##Is Visible", "Visible", isVisibleSet, isVisible);
@@ -206,7 +206,7 @@ namespace anm2ed::imgui
if (isPivot) frameChange.pivot = std::make_optional(pivot);
if (isScale) frameChange.scale = std::make_optional(scale);
if (isRotation) frameChange.rotation = std::make_optional(rotation);
if (isDelay) frameChange.duration = std::make_optional(duration);
if (isDuration) frameChange.duration = std::make_optional(duration);
if (isTint) frameChange.tint = std::make_optional(tint);
if (isColorOffset) frameChange.colorOffset = std::make_optional(colorOffset);
if (isVisibleSet) frameChange.isVisible = std::make_optional(isVisible);

View File

@@ -193,6 +193,9 @@ namespace anm2ed
io.IniFilename = nullptr;
io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
io.KeyRepeatDelay = settings.keyboardRepeatDelay;
io.KeyRepeatRate = settings.keyboardRepeatRate;
ImGui::GetStyle().FontScaleMain = settings.uiScale;
io.ConfigWindowsMoveFromTitleBarOnly = true;
ImGui::LoadIniSettingsFromDisk(settings_path().c_str());

View File

@@ -66,7 +66,7 @@ namespace anm2ed
X(CHANGE_IS_PIVOT, changeIsPivot, "##Is Pivot", BOOL, false) \
X(CHANGE_IS_SCALE, changeIsScale, "##Is Scale", BOOL, false) \
X(CHANGE_IS_ROTATION, changeIsRotation, "##Is Rotation", BOOL, false) \
X(CHANGE_IS_DELAY, changeIsDelay, "##Is Delay", BOOL, false) \
X(CHANGE_IS_DURATION, changeIsDuration, "##Is Duration", BOOL, false) \
X(CHANGE_IS_TINT, changeIsTint, "##Is Tint", BOOL, false) \
X(CHANGE_IS_COLOR_OFFSET, changeIsColorOffset, "##Is Color Offset", BOOL, false) \
X(CHANGE_IS_VISIBLE_SET, changeIsVisibleSet, "##Is Visible", BOOL, false) \
@@ -77,7 +77,7 @@ namespace anm2ed
X(CHANGE_PIVOT, changePivot, "Pivot", VEC2, {}) \
X(CHANGE_SCALE, changeScale, "Scale", VEC2, {}) \
X(CHANGE_ROTATION, changeRotation, "Rotation", FLOAT, 0.0f) \
X(CHANGE_DELAY, changeDelay, "Delay", INT, 0) \
X(CHANGE_DURATION, changeDuration, "Duration", INT, 0) \
X(CHANGE_TINT, changeTint, "Tint", VEC4, {}) \
X(CHANGE_COLOR_OFFSET, changeColorOffset, "Color Offset", VEC3, {}) \
X(CHANGE_IS_VISIBLE, changeIsVisible, "Visible", BOOL, false) \
@@ -109,7 +109,7 @@ namespace anm2ed
X(GENERATE_ROWS, generateRows, "Rows", INT, 4) \
X(GENERATE_COLUMNS, generateColumns, "Columns", INT, 4) \
X(GENERATE_COUNT, generateCount, "Count", INT, 16) \
X(GENERATE_DELAY, generateDelay, "Delay", INT, 1) \
X(GENERATE_DURATION, generateDuration, "Duration", INT, 1) \
X(GENERATE_ZOOM, generateZoom, "Zoom", FLOAT, 100.0f) \
\
X(EDITOR_IS_GRID, editorIsGrid, "Grid", BOOL, true) \

View File

@@ -86,9 +86,6 @@ namespace anm2ed
dockspace.update(taskbar, documents, manager, settings, resources, dialog, clipboard);
toasts.update();
ImGui::GetStyle().FontScaleMain = settings.uiScale;
ImGui::GetIO().KeyRepeatDelay = settings.keyboardRepeatDelay;
ImGui::GetIO().KeyRepeatRate = settings.keyboardRepeatRate;
SDL_GetWindowSize(window, &settings.windowSize.x, &settings.windowSize.y);
if (isQuitting && manager.documents.empty()) isQuit = true;