diff --git a/.gitignore b/.gitignore index 858ef05..f3cac74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ @releases/ +@src/notes.md .vscode/ diff --git a/00 Dart Core (Required)/gamedata/scripts/dart_module.script b/00 Dart Core (Required)/gamedata/scripts/dart_module.script index fb5ee46..fc16d79 100644 --- a/00 Dart Core (Required)/gamedata/scripts/dart_module.script +++ b/00 Dart Core (Required)/gamedata/scripts/dart_module.script @@ -165,10 +165,12 @@ function refresh() end --- refresh UI via options change if the resolution isn't changing -function onOptionChange() - if Utils.getDeviceResolution() == Utils.getResolutionOption() then - refresh() +-- refresh UI if a dart option changed +function mcmOnOptionChange(changes) + for key in pairs(changes) do + if (key:match("^dart/")) then + return refresh() + end end end @@ -211,9 +213,9 @@ AddScriptCallback("on_dart_mcm_config") AddScriptCallback("on_dart_pre_refresh") AddScriptCallback("on_dart_post_refresh") -RegisterScriptCallback("on_option_change", onOptionChange) -RegisterScriptCallback("on_screen_resolution_changed", onResolutionChange) function on_game_start() + RegisterScriptCallback("on_screen_resolution_changed", onResolutionChange) + RegisterScriptCallback("mcm_option_change", mcmOnOptionChange) RegisterScriptCallback("on_key_release", onKeyRelease) end diff --git a/00 Dart Core (Required)/gamedata/scripts/dart_utils.script b/00 Dart Core (Required)/gamedata/scripts/dart_utils.script index 9212dc7..8476231 100644 --- a/00 Dart Core (Required)/gamedata/scripts/dart_utils.script +++ b/00 Dart Core (Required)/gamedata/scripts/dart_utils.script @@ -160,11 +160,6 @@ function getDeviceResolution() end -function getResolutionOption() - return ui_options.get("video/basic/resolution") -end - - function getAspectRatio() return device().width / device().height end diff --git a/@src/thumbnail.afdesign b/@src/thumbnail.afdesign new file mode 100644 index 0000000..022c7ff Binary files /dev/null and b/@src/thumbnail.afdesign differ diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..4d26075 Binary files /dev/null and b/thumbnail.png differ