Skip to content

Commit

Permalink
v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bellyillish committed Jun 6, 2024
1 parent 30b6bfa commit 75f6ef8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@releases/
@src/notes.md
.vscode/
14 changes: 8 additions & 6 deletions 00 Dart Core (Required)/gamedata/scripts/dart_module.script
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
5 changes: 0 additions & 5 deletions 00 Dart Core (Required)/gamedata/scripts/dart_utils.script
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file added @src/thumbnail.afdesign
Binary file not shown.
Binary file added thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 75f6ef8

Please sign in to comment.