diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-09 15:53:11 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-09 15:53:11 +0200 |
commit | 4fffd3d33a2e3ead4d8c1443b7364b5bac35dd5a (patch) | |
tree | 4fa2a0d53e28b4258f30e6a85bbfefcff373da4f | |
parent | 6c3e56306c0e40081dc5a2389f1086bd8d10c2f3 (diff) | |
download | hurrycurry-4fffd3d33a2e3ead4d8c1443b7364b5bac35dd5a.tar hurrycurry-4fffd3d33a2e3ead4d8c1443b7364b5bac35dd5a.tar.bz2 hurrycurry-4fffd3d33a2e3ead4d8c1443b7364b5bac35dd5a.tar.zst |
increase font size in setup menu for chinese font (#305)
-rw-r--r-- | client/menu/setup.gd | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/client/menu/setup.gd b/client/menu/setup.gd index 1c4f7e12..19dfabf8 100644 --- a/client/menu/setup.gd +++ b/client/menu/setup.gd @@ -47,11 +47,20 @@ func _ready(): Global.get_viewport().msaa_2d = Viewport.MSAA_4X if Global.profile.username != "": username.text = Global.profile.username - + + if TranslationServer.get_locale().begins_with("zh"): + $ScrollContainer/Control/TextureRect.rotation = 0 + increase_font_size(self) + super() - $Back.visible = not is_instance_of(parent_menu, Entry) +func increase_font_size(node: Node): + if node is RichTextLabel: + for oname in ["bold_italics_font_size", "italics_font_size", "normal_font_size", "mono_font_size", "bold_font_size"]: + node.add_theme_font_size_override(oname, node.get_theme_default_font_size() * 1.2) + for c in node.get_children(): increase_font_size(c) + func _on_back_pressed() -> void: exit() |