aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-06-24 00:55:45 +0200
committer GitHub <noreply@github.com>2023-06-24 00:55:45 +0200
commit432000a3ab73980fc6421b3587de4b97af30d3ad (patch)
tree4b80d98261252f25011e34b22a8d49767525559f /game/src/Game/Menu/OptionMenu/OptionsMenu.gd
parent40cf0fa95e325f3bf875e42c11254da23192f506 (diff)
parent206cafc8bba310e4d4f35f4898ef3ac289abe81a (diff)
Merge pull request #131 from OpenVicProject/ui-cleanup
Localisation and UI focus cleanup
Diffstat (limited to 'game/src/Game/Menu/OptionMenu/OptionsMenu.gd')
-rw-r--r--game/src/Game/Menu/OptionMenu/OptionsMenu.gd12
1 files changed, 10 insertions, 2 deletions
diff --git a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
index 5f6a088..c74c458 100644
--- a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
+++ b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
@@ -5,9 +5,17 @@ extends Control
signal back_button_pressed
+@export var _tab_container : TabContainer
+
func _ready():
+ _tab_container.set_tab_title(0, "OPTIONS_GENERAL")
+ _tab_container.set_tab_title(1, "OPTIONS_VIDEO")
+ _tab_container.set_tab_title(2, "OPTIONS_SOUND")
+ _tab_container.set_tab_title(3, "OPTIONS_CONTROLS")
+ _tab_container.set_tab_title(4, "OPTIONS_OTHER")
+
# Prepare options menu before loading user settings
- var tab_bar : TabBar = $Margin/Tab.get_child(0, true)
+ var tab_bar : TabBar = _tab_container.get_child(0, true)
# This ends up easier to manage then trying to manually recreate the TabContainer's behavior
# These buttons can be accessed regardless of the tab
@@ -60,7 +68,7 @@ func _save_overrides() -> void:
var file := ConfigFile.new()
var err_ret := file.load(override_path)
if err_ret != OK: push_error("Failed to load overrides from %s" % override_path)
- file.set_value("display", "window/size/mode", get_viewport().get_window().mode)
+ file.set_value("display", "window/size/mode", Resolution.get_current_window_mode())
var resolution : Vector2i = Resolution.get_current_resolution()
file.set_value("display", "window/size/viewport_width", resolution.x)
file.set_value("display", "window/size/viewport_height", resolution.y)