aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-07-08 01:48:21 +0200
committernokoe <nokoe@mailbox.org>2024-07-08 01:48:21 +0200
commit08e8fb4d84a4585686ea6d931020a2b405efbccc (patch)
tree0846bfbf1eb1a6456a95fa989ab98fb1b5734a9c /client/global.gd
parentea08be33bf29179249866daf8ba10df53546361c (diff)
parentcad20ebc56b36082d20e634dc28a9518b16c3d19 (diff)
downloadhurrycurry-08e8fb4d84a4585686ea6d931020a2b405efbccc.tar
hurrycurry-08e8fb4d84a4585686ea6d931020a2b405efbccc.tar.bz2
hurrycurry-08e8fb4d84a4585686ea6d931020a2b405efbccc.tar.zst
Merge branch 'master' of ssh://codeberg.org/metamuffin/undercooked
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index 2ee08c6b..3e46b1dc 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -37,6 +37,7 @@ var default_settings := {
"usernames": ToggleSetting.new(tr("Show username tags"), false),
"server_binary": TextSetting.new(tr("Server binary (leave empty to search PATH)"), "", tr("Enter path")),
"server_data": TextSetting.new(tr("Server data directory (leave empty to auto-detect)"), "", tr("Enter path")),
+ "ui_scale": DropdownSetting.new(tr("UI scale"), 0, [tr("Resize"), tr("Disabled")]),
"aa": DropdownSetting.new(tr("Anti-aliasing"), 2, [tr("Disabled"), "FXAA", "MSAA 2x", "MSAA 4x"]),
"ssao": ToggleSetting.new(tr("Ambient occlusion"), true),
"taa": ToggleSetting.new(tr("Temporal Anti-Aliasing"), false),
@@ -109,6 +110,13 @@ func apply_settings():
get_viewport().use_taa = get_setting("taa")
emit_signal("settings_changed")
+
+ # UI scale
+ match get_setting("ui_scale"):
+ 0:
+ get_tree().root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
+ 1:
+ get_tree().root.content_scale_mode = Window.CONTENT_SCALE_MODE_DISABLED
func update_language():
var lang_idx: int = get_setting("language")