diff --git a/game/addons/openvic/TranslatorPlugin.gd b/game/addons/openvic/TranslatorPlugin.gd new file mode 100644 index 00000000..8a735c73 --- /dev/null +++ b/game/addons/openvic/TranslatorPlugin.gd @@ -0,0 +1,54 @@ +@tool +extends EditorTranslationParserPlugin + +const AppSetting := preload("res://addons/kenyoni/app_settings/app_settings.gd") + +func _customize_strings(strings: Array[PackedStringArray]) -> Array[PackedStringArray]: + strings.append_array(generate_localization(GameSettings)) + strings.append_array(generate_localization(ModSettings)) + strings.append_array(generate_localization(Vic2Settings)) + + var keychain_path: String = ControlsGlobal.get_script().resource_path + for action_id: StringName in ControlsGlobal.actions: + strings.append([ControlsGlobal.actions[action_id].display_name, "", "", "", keychain_path]) + + for group_name: StringName in ControlsGlobal.groups: + strings.append([group_name, "", "", "", keychain_path]) + + return strings + +func generate_localization(app_setting: AppSetting) -> Array[PackedStringArray]: + var resource_path: String = app_setting.get_script().resource_path + + var result: Array[PackedStringArray] = [] + for key: String in app_setting.get_sub_sections(): + result.append([key.capitalize(), "", "", "", resource_path]) + + var groups_handled: Array[GameSettings.RevertGroup] = [] + + for setting: AppSetting.Setting in app_setting.get_section(""): + if setting.has_meta(&"display_name"): + result.append([setting.get_meta(&"display_name"), "", "", "", resource_path]) + else: + var key := setting.key() + result.append([key.get_slice("/", key.get_slice_count("/") - 1).capitalize(), "", "", "", resource_path]) + + if setting.has_meta(&"description"): + result.append([setting.get_meta(&"description"), "", "", "", resource_path]) + + if setting.has_meta(&"display_template"): + result.append([setting.get_meta(&"display_template"), "", "", "", resource_path]) + else: + var display_values: PackedStringArray = setting.get_meta(&"display_values", PackedStringArray()) + for value: String in display_values: + if value.is_empty(): continue + result.append([value, "", "", "", resource_path]) + + if setting.has_meta(&"revert_group"): + var revert_group: GameSettings.RevertGroup = setting.get_meta(&"revert_group") + if not groups_handled.has(revert_group): + groups_handled.append(revert_group) + result.append([revert_group.title, "", "", "", resource_path]) + result.append([revert_group.text, "", "", "", resource_path]) + + return result diff --git a/game/addons/openvic/TranslatorPlugin.gd.uid b/game/addons/openvic/TranslatorPlugin.gd.uid new file mode 100644 index 00000000..0e02f18a --- /dev/null +++ b/game/addons/openvic/TranslatorPlugin.gd.uid @@ -0,0 +1 @@ +uid://d0rgx3infg54m diff --git a/game/addons/openvic/openvic.gd b/game/addons/openvic/openvic.gd new file mode 100644 index 00000000..b0fbe6fe --- /dev/null +++ b/game/addons/openvic/openvic.gd @@ -0,0 +1,12 @@ +@tool +extends EditorPlugin + +const TranslatorPlugin := preload("uid://d0rgx3infg54m") + +var _translation_plugin := TranslatorPlugin.new() + +func _enable_plugin() -> void: + add_translation_parser_plugin(_translation_plugin) + +func _disable_plugin() -> void: + remove_translation_parser_plugin(_translation_plugin) diff --git a/game/addons/openvic/openvic.gd.uid b/game/addons/openvic/openvic.gd.uid new file mode 100644 index 00000000..6587eaac --- /dev/null +++ b/game/addons/openvic/openvic.gd.uid @@ -0,0 +1 @@ +uid://bitrr5fd75qlp diff --git a/game/addons/openvic/plugin.cfg b/game/addons/openvic/plugin.cfg new file mode 100644 index 00000000..e3a8ab4c --- /dev/null +++ b/game/addons/openvic/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="OpenVic Plugin" +description="" +author="OpenVic Contributors" +version="" +script="openvic.gd" diff --git a/game/assets/translations/template.pot b/game/assets/translations/template.pot new file mode 100644 index 00000000..54405038 --- /dev/null +++ b/game/assets/translations/template.pot @@ -0,0 +1,632 @@ +# LANGUAGE translation for OpenVic for the following files: +# res://src/Autoload/Settings/GameSettings.gd +# res://src/Autoload/Settings/ModSettings.gd +# res://src/Autoload/Settings/Vic2Settings.gd +# res://src/UI/GameMenu/MainMenu/MainMenu.gd +# res://src/UI/GameMenu/MainMenu/MainMenu.tscn +# res://src/UI/GameMenu/OptionMenu/ControlsTab.tscn +# res://src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd +# res://src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.tscn +# res://src/UI/GameMenu/OptionMenu/OptionsMenu.gd +# res://src/UI/GameMenu/OptionMenu/OptionsMenu.tscn +# res://src/UI/GameMenu/OptionMenu/SettingsContainer.gd +# res://src/UI/GameMenu/OptionMenu/SettingsContainer.tscn +# res://src/UI/GameMenu/LobbyMenu/LobbyMenu.gd +# res://src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +# res://src/UI/GameMenu/LobbyMenu/LobbyPanelButton.gd +# res://src/UI/GameMenu/LobbyMenu/LobbyPanelButton.tscn +# res://src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd +# res://src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +# res://src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd +# res://src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +# res://src/UI/GameMenu/SaveLoadMenu/SavePanelButton.gd +# res://src/UI/GameMenu/SaveLoadMenu/SavePanelButton.tscn +# res://src/UI/GameMenu/SaveLoadMenu/SaveResource.gd +# res://src/UI/Session/PauseMenu/PauseMenu.gd +# res://src/UI/Session/PauseMenu/PauseMenu.tscn +# +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: OpenVic\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: src/Autoload/Settings/Vic2Settings.gd:106 +msgid "Failed to find Victoria II" +msgstr "" + +#: src/Autoload/Settings/Vic2Settings.gd:107 +msgid "OpenVic couldn't find a copy of Victoria II installed on your computer! If you do have Victoria II installed, please specify the path to your game directory with the \"search-path\" command line option." +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +msgid "New Game" +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +msgid "Continue" +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +msgid "Multiplayer" +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Options" +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +msgid "Credits" +msgstr "" + +#: src/UI/GameMenu/MainMenu/MainMenu.tscn +msgid "Exit" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd:19 +msgid "Mapmode {name}" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/OptionsMenu.gd:30 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "X" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/OptionsMenu.gd:42 +#: src/UI/GameMenu/OptionMenu/OptionsMenu.tscn +msgid "Controls" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:134 +msgid "On" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:135 +msgid "Off" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:256 +msgid "🗂️" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:257 +msgid "Open file dialog" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:302 +msgid "Reset to default" +msgstr "" + +#: src/UI/GameMenu/OptionMenu/SettingsContainer.gd:303 +msgid "↩" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.gd:54 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:46 +msgid "All" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.gd:103 +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Are you want to override {session_tag} as a previous session?" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.gd:104 +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Override {session_tag}" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.gd:137 +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:101 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Are you sure you want to delete {file_name}?" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.gd:138 +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:102 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Delete {file_name}" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Back" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Unknown Country" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Session Tag" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +msgid "Start Game" +msgstr "" + +#: src/UI/GameMenu/LobbyMenu/LobbyPanelButton.tscn +#: src/UI/GameMenu/SaveLoadMenu/SavePanelButton.tscn +msgid "PLACEHOLDER" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd:18 +msgid "Latest Release Name: {release_name}" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd:20 +msgid "Commit: {short_hash}" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd:32 +msgid "Checksum {checksum}" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd:33 +msgid "Checksum: {short_checksum}" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Game Info" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Release Missing" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Tag Missing" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Commit Missing" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Short Commit Missing" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Checksum Missing" +msgstr "" + +#: src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +msgid "Short Checksum Missing" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:30 +msgid "Load Menu" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:31 +msgid "Load" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:39 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Save Menu" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:40 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Save" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:88 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Are you want to overwrite {file_name}?" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd:89 +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Overwrite {file_name}" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +msgid "Session:" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SavePanelButton.tscn +msgid "00.00.0000" +msgstr "" + +#: src/UI/GameMenu/SaveLoadMenu/SavePanelButton.tscn +msgid "x" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Save Game" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Load Game" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Resign To Menu" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Quit Game" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Close" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Resign Game" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Are you sure you want to resign and return to the main menu?" +msgstr "" + +#: src/UI/Session/PauseMenu/PauseMenu.tscn +msgid "Are you sure you want to quit to desktop?" +msgstr "" + +msgid "OpenVic" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "General" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Video" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Audio" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Save Game Format" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The type of format to save." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Binary" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Text" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Auto-Save Interval" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The ingame interval to auto-save by." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Monthly" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Bi-Monthly" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Yearly" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Bi-Yearly" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Never" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Language" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The language of the game." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "English, UK" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Resolution" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The video resolution for the game." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "3840x2160 (4K)" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "2560x1080 (UW1080p)" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1920x1080 (1080p)" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1366x768" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1536x864" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1280x720 (720p, Default)" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1440x900" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1600x900" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "1024x600" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "800x600" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Keep Video Changes?" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Reverting changes in {time} seconds..." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Gui Scaling Factor" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The scaling factor for the game's GUI." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Screen Mode" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The windowing mode of the game." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Fullscreen" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Borderless" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Windowed" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Monitor Selection" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The monitor to display the game to." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Display {value}" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Refresh Rate" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "The refresh for the game." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "VSync" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Adaptive VSync" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Mailbox VSynx" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "30hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "60hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "90hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "120hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "144hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "365hz" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Unlimited" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Quality Preset" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Graphical detail level of the game." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Low" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Medium" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "High" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Ultra" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Custom" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Master Volume" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Game's Master volume." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Music Volume" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Game's Music volume." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "SFX Volume" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Game's Sound Effects volume." +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Auto-Start Music" +msgstr "" + +#: src/Autoload/Settings/GameSettings.gd +msgid "Whether to start the game with music already playing." +msgstr "" + +#: src/Autoload/Settings/ModSettings.gd +msgid "Mods" +msgstr "" + +#: src/Autoload/Settings/ModSettings.gd +msgid "Load List" +msgstr "" + +#: src/Autoload/Settings/Vic2Settings.gd +msgid "Victoria 2" +msgstr "" + +#: src/Autoload/Settings/Vic2Settings.gd +msgid "Base Defines Path" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Move North" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Move East" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Move South" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Move West" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Zoom In" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Zoom Out" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Mouse Drag" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Mouse Click" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Mouse Right Click" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Pause" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Speed Increase" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Speed Decrease" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Open Pause Menu" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Map" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Time" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "UI" +msgstr "" + +#: src/Autoload/Settings/ControlsGlobal.gd +msgid "Hotkeys" +msgstr "" diff --git a/game/project.godot b/game/project.godot index dddec8cb..f8a5f0c1 100644 --- a/game/project.godot +++ b/game/project.godot @@ -40,6 +40,7 @@ MusicManager="*res://src/Autoload/MusicManager/MusicManager.tscn" SaveManager="*res://src/Autoload/SaveManager.gd" CursorManager="*res://src/Autoload/CursorManager.gd" Keychain="*uid://dgiia2xg7fsud" +ControlsGlobal="*uid://u4g1f1gemv7i" [display] @@ -60,7 +61,7 @@ window/size/window_height_override.editor=0 [editor_plugins] -enabled=PackedStringArray("res://addons/MusicMetadata/plugin.cfg", "res://addons/kenyoni/app_settings/plugin.cfg", "res://addons/keychain/plugin.cfg") +enabled=PackedStringArray("res://addons/MusicMetadata/plugin.cfg", "res://addons/kenyoni/app_settings/plugin.cfg", "res://addons/keychain/plugin.cfg", "res://addons/openvic/plugin.cfg") [filesystem] @@ -154,7 +155,7 @@ select_add={ [internationalization] locale/translation_remaps={} -locale/translations=PackedStringArray("res://assets/localisation/locales/helpers.de.translation", "res://assets/localisation/locales/helpers.en.translation", "res://assets/localisation/locales/helpers.es.translation", "res://assets/localisation/locales/helpers.fr.translation") +locale/translations_pot_files=PackedStringArray("res://src/Autoload/Settings/GameSettings.gd", "res://src/Autoload/Settings/ModSettings.gd", "res://src/Autoload/Settings/Vic2Settings.gd", "res://src/UI/GameMenu/MainMenu/MainMenu.gd", "res://src/UI/GameMenu/MainMenu/MainMenu.tscn", "res://src/UI/GameMenu/OptionMenu/ControlsTab.tscn", "res://src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd", "res://src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.tscn", "res://src/UI/GameMenu/OptionMenu/OptionsMenu.gd", "res://src/UI/GameMenu/OptionMenu/OptionsMenu.tscn", "res://src/UI/GameMenu/OptionMenu/SettingsContainer.gd", "res://src/UI/GameMenu/OptionMenu/SettingsContainer.tscn", "res://src/UI/GameMenu/LobbyMenu/LobbyMenu.gd", "res://src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn", "res://src/UI/GameMenu/LobbyMenu/LobbyPanelButton.gd", "res://src/UI/GameMenu/LobbyMenu/LobbyPanelButton.tscn", "res://src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd", "res://src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn", "res://src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd", "res://src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn", "res://src/UI/GameMenu/SaveLoadMenu/SavePanelButton.gd", "res://src/UI/GameMenu/SaveLoadMenu/SavePanelButton.tscn", "res://src/UI/GameMenu/SaveLoadMenu/SaveResource.gd", "res://src/UI/Session/PauseMenu/PauseMenu.gd", "res://src/UI/Session/PauseMenu/PauseMenu.tscn") locale/fallback="en_GB" locale/locale_filter_mode=0 locale/country_short_name={ diff --git a/game/src/Autoload/Settings/ControlsGlobal.gd b/game/src/Autoload/Settings/ControlsGlobal.gd new file mode 100644 index 00000000..f046c1bf --- /dev/null +++ b/game/src/Autoload/Settings/ControlsGlobal.gd @@ -0,0 +1,36 @@ +@tool +extends Node + +var actions: Dictionary[StringName, Keychain.InputAction] = {} +var groups: Dictionary[StringName, Keychain.InputGroup] = {} + +func _ready() -> void: + actions = { + # Map Group + &"map_north": Keychain.InputAction.new("Move North", "Map", true), + &"map_east": Keychain.InputAction.new("Move East", "Map", true), + &"map_south": Keychain.InputAction.new("Move South", "Map", true), + &"map_west": Keychain.InputAction.new("Move West", "Map", true), + &"map_zoom_in": Keychain.InputAction.new("Zoom In", "Map", true), + &"map_zoom_out": Keychain.InputAction.new("Zoom Out", "Map", true), + &"map_drag": Keychain.InputAction.new("Mouse Drag", "Map", true), + &"map_click": Keychain.InputAction.new("Mouse Click", "Map", true), + &"map_right_click": Keychain.InputAction.new("Mouse Right Click", "Map", true), + # Time Group + &"time_pause": Keychain.InputAction.new("Pause", "Time", true), + &"time_speed_increase": Keychain.InputAction.new("Speed Increase", "Time", true), + &"time_speed_decrease": Keychain.InputAction.new("Speed Decrease", "Time", true), + # UI Group + &"menu_pause": Keychain.InputAction.new("Open Pause Menu", "UI", true), + } + + groups = { + &"Map": Keychain.InputGroup.new("", false), + &"Time": Keychain.InputGroup.new("", false), + &"UI": Keychain.InputGroup.new("", false), + &"Hotkeys": Keychain.InputGroup.new(&"UI") + } + + if Engine.is_editor_hint(): return + Keychain.actions = actions + Keychain.groups = groups diff --git a/game/src/Autoload/Settings/ControlsGlobal.gd.uid b/game/src/Autoload/Settings/ControlsGlobal.gd.uid new file mode 100644 index 00000000..a422c7bf --- /dev/null +++ b/game/src/Autoload/Settings/ControlsGlobal.gd.uid @@ -0,0 +1 @@ +uid://u4g1f1gemv7i diff --git a/game/src/Autoload/Settings/GameSettings.gd b/game/src/Autoload/Settings/GameSettings.gd index b1d2e291..9eadd60a 100644 --- a/game/src/Autoload/Settings/GameSettings.gd +++ b/game/src/Autoload/Settings/GameSettings.gd @@ -1,3 +1,4 @@ +@tool extends "res://addons/kenyoni/app_settings/app_settings.gd" enum SaveGameFormat { @@ -5,8 +6,8 @@ enum SaveGameFormat { TEXT } const SAVE_GAME_FORMAT_DISPLAY_NAMES: PackedStringArray = [ - "OPTIONS_GENERAL_BINARY", - "OPTIONS_GENERAL_TEXT" + "Binary", + "Text" ] enum AutoSaveInterval { @@ -17,11 +18,11 @@ enum AutoSaveInterval { NEVER } const AUTO_SAVE_INTERVAL_DISPLAY_NAMES: PackedStringArray = [ - "OPTIONS_GENERAL_AUTOSAVE_MONTHLY", - "OPTIONS_GENERAL_AUTOSAVE_BIMONTHLY", - "OPTIONS_GENERAL_AUTOSAVE_YEARLY", - "OPTIONS_GENERAL_AUTOSAVE_BIYEARLY", - "OPTIONS_GENERAL_AUTOSAVE_NEVER" + "Monthly", + "Bi-Monthly", + "Yearly", + "Bi-Yearly", + "Never" ] enum RefreshRate { @@ -45,7 +46,7 @@ const REFRESH_RATE_DISPLAY_NAMES: PackedStringArray = [ "90hz", "120hz", "144hz", - "365hz", + "365hz", "Unlimited" ] @@ -57,11 +58,11 @@ enum GraphicsDetail { CUSTOM } const GRAPHICS_DETAIL_DISPLAY_NAMES: PackedStringArray = [ - "OPTIONS_VIDEO_QUALITY_LOW", - "OPTIONS_VIDEO_QUALITY_MEDIUM", - "OPTIONS_VIDEO_QUALITY_HIGH", - "OPTIONS_VIDEO_QUALITY_ULTRA", - "OPTIONS_VIDEO_QUALITY_CUSTOM" + "Low", + "Medium", + "High", + "Ultra", + "Custom" ] const RESOLUTIONS: Array[Vector2i] = [ @@ -77,12 +78,12 @@ const RESOLUTIONS: Array[Vector2i] = [ Vector2i(800, 600) ] const RESOLUTION_DISPLAY_NAMES: PackedStringArray = [ - "3840x2160", - "2560x1080", - "1920x1080", + "3840x2160 (4K)", + "2560x1080 (UW1080p)", + "1920x1080 (1080p)", "1366x768", "1536x864", - "1280x720", + "1280x720 (720p, Default)", "1440x900", "1600x900", "1024x600", @@ -95,9 +96,9 @@ const SCREEN_MODES: PackedInt32Array = [ DisplayServer.WINDOW_MODE_WINDOWED ] const SCREEN_MODES_DISPLAY_NAMES: PackedStringArray = [ - "OPTIONS_VIDEO_FULLSCREEN", - "OPTIONS_VIDEO_BORDERLESS", - "OPTIONS_VIDEO_WINDOWED" + "Fullscreen", + "Borderless", + "Windowed" ] const SETTINGS_FILE := "user://settings.cfg" @@ -121,16 +122,14 @@ const AUDIO_MUSIC_START_PLAY := &"audio/music_start_play" const INTERNAL_WINDOW_WIDTH = &"display/window/size/viewport_width" const INTERNAL_WINDOW_HEIGHT = &"display/window/size/viewport_height" -var video_revert_group := RevertGroup.new("OPTIONS_VIDEO_REVERT_DIALOG_TITLE", "OPTIONS_VIDEO_REVERT_DIALOG_TEXT") +var video_revert_group := RevertGroup.new("Keep Video Changes?", "Reverting changes in {time} seconds...") func _init() -> void: - Localisation.initialize() # General Settings self.add_setting(Setting.new(GENERAL_SAVE_GAME_FORMAT, SaveGameFormat.BINARY) .set_description("The type of format to save.") .set_staged() .set_validate_fn(_enum_validate) - .add_meta(&"display_name", "OPTIONS_GENERAL_SAVEFORMAT") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_ENUM) .add_meta(&"values", SaveGameFormat.values()) @@ -139,7 +138,7 @@ func _init() -> void: .set_description("The ingame interval to auto-save by.") .set_staged() .set_validate_fn(_enum_validate) - .add_meta(&"display_name", "OPTIONS_GENERAL_AUTOSAVE") + .add_meta(&"display_name", "Auto-Save Interval") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_ENUM) .add_meta(&"values", AutoSaveInterval.values()) @@ -167,14 +166,12 @@ func _init() -> void: .add_meta(&"hint", PROPERTY_HINT_ENUM) .add_meta(&"values", RESOLUTIONS) .add_meta(&"display_values", RESOLUTION_DISPLAY_NAMES) - .add_meta(&"translate_value_function", _resolution_translate_value) .add_meta(&"no_default", true) .add_meta(&"revert_group", video_revert_group)) self.add_setting(Setting.new(VIDEO_GUI_SCALING_FACTOR, 1) .set_description("The scaling factor for the game's GUI.") .set_staged() .set_apply_fn(_gui_scaling_factor_apply) - .add_meta(&"display_name", "OPTIONS_VIDEO_GUI_SCALE") .add_meta(&"type", TYPE_FLOAT) .add_meta(&"hint", PROPERTY_HINT_RANGE) .add_meta(&"max", 2) @@ -190,12 +187,11 @@ func _init() -> void: .add_meta(&"revert_group", video_revert_group)) self.add_setting(Setting.new(VIDEO_MONITOR_SELECTION, 0) .set_description("The monitor to display the game to.") - .set_validate_fn(_enum_validate) - .set_apply_fn(_refresh_rate_apply) + .set_apply_fn(_monitor_selection_apply) .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_ENUM) - .add_meta(&"values", range(DisplayServer.get_screen_count())) - .add_meta(&"display_values", _get_monitor_display_names()) + .add_meta(&"values", range(1, DisplayServer.get_screen_count() + 1)) + .add_meta(&"display_template", "Display {value}") .add_meta(&"revert_group", video_revert_group)) self.add_setting(Setting.new(VIDEO_REFRESH_RATE, RefreshRate.VSYNC) .set_description("The refresh for the game.") @@ -210,7 +206,6 @@ func _init() -> void: .set_description("Graphical detail level of the game.") .set_staged() .set_validate_fn(_enum_validate) - .add_meta(&"display_name", "OPTIONS_VIDEO_QUALITY") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_ENUM) .add_meta(&"values", GraphicsDetail.values()) @@ -221,26 +216,24 @@ func _init() -> void: .set_description("Game's Master volume.") .set_apply_fn(_volume_apply.bind(AudioServer.get_bus_index(&"Master"))) .set_validate_fn(_volume_validate) - .add_meta(&"display_name", "MASTER_BUS") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_RANGE)) self.add_setting(Setting.new(AUDIO_MUSIC_VOLUME, 100) .set_description("Game's Music volume.") .set_apply_fn(_volume_apply.bind(AudioServer.get_bus_index(&"MUSIC_BUS"))) .set_validate_fn(_volume_validate) - .add_meta(&"display_name", "MUSIC_BUS") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_RANGE)) self.add_setting(Setting.new(AUDIO_SFX_VOLUME, 100) .set_description("Game's Sound Effects volume.") .set_apply_fn(_volume_apply.bind(AudioServer.get_bus_index(&"SFX_BUS"))) .set_validate_fn(_volume_validate) - .add_meta(&"display_name", "SFX_BUS") + .add_meta(&"display_name", "SFX Volume") .add_meta(&"type", TYPE_INT) .add_meta(&"hint", PROPERTY_HINT_RANGE)) self.add_setting(Setting.new(AUDIO_MUSIC_START_PLAY, true) .set_description("Whether to start the game with music already playing.") - .add_meta(&"display_name", "OPTIONS_SOUND_EXPLODE_EARS") + .add_meta(&"display_name", "Auto-Start Music") .add_meta(&"type", TYPE_BOOL)) self.add_setting(Setting.new(INTERNAL_WINDOW_WIDTH, ProjectSettings.get_setting(INTERNAL_WINDOW_WIDTH)) @@ -248,6 +241,8 @@ func _init() -> void: self.add_setting(Setting.new(INTERNAL_WINDOW_HEIGHT, ProjectSettings.get_setting(INTERNAL_WINDOW_HEIGHT)) .set_internal()) + if Engine.is_editor_hint(): return + self.load() self.apply_all() @@ -292,7 +287,7 @@ func _get_loaded_locales() -> PackedStringArray: func _get_loaded_locale_names() -> PackedStringArray: var locales_country_rename : Dictionary = ProjectSettings.get_setting("internationalization/locale/country_short_name", {}) - + var result: PackedStringArray = [] for locale: String in _get_loaded_locales(): var locale_name := TranslationServer.get_locale_name(locale) @@ -319,21 +314,6 @@ func _resolution_apply(stg: Setting) -> void: _set_window_override(window.size) window.content_scale_size = Vector2i(0,0) -func _resolution_translate_value(stg: Setting, value: Variant, _display_value: String) -> String: - var resolution := value as Vector2i - var format_dict := { - "width": resolution.x, - "height": resolution.y - } - format_dict["name"] = tr("OPTIONS_VIDEO_RESOLUTION_{width}x{height}".format(format_dict)) - if format_dict["name"].begins_with("OPTIONS"): format_dict["name"] = "" - var result := "OPTIONS_VIDEO_RESOLUTION_DIMS" - if format_dict["name"]: result += "_NAMED" - if resolution == stg.default_value(): result += "_DEFAULT" - format_dict["width"] = Localisation.tr_number(resolution.x) - format_dict["height"] = Localisation.tr_number(resolution.y) - return tr(result).format(format_dict) - func _gui_scaling_factor_apply(stg: Setting) -> void: if not is_inside_tree(): return get_tree().root.content_scale_factor = stg.value() @@ -351,6 +331,10 @@ func _screen_mode_apply(stg: Setting) -> void: window.mode = stg.value() _set_window_override(window.size) +func _monitor_selection_apply(stg: Setting) -> void: + if not is_inside_tree(): return + get_window().current_screen = stg.value() - 1 + func _refresh_rate_apply(stg: Setting) -> void: var refresh_rate := stg.value() as RefreshRate match refresh_rate: @@ -368,12 +352,6 @@ func _refresh_rate_apply(stg: Setting) -> void: RefreshRate._365HZ: Engine.max_fps = 365 RefreshRate.UNLIMITED: Engine.max_fps = 0 -func _get_monitor_display_names() -> PackedStringArray: - var result: PackedStringArray = [] - for index: int in range(DisplayServer.get_screen_count()): - result.append("Display " + str(index + 1)) - return result - func _volume_apply(stg: Setting, bus_index: int) -> void: const RATIO_FOR_LINEAR : float = 100 AudioServer.set_bus_volume_db(bus_index, linear_to_db(stg.value() / RATIO_FOR_LINEAR)) diff --git a/game/src/Autoload/Settings/ModSettings.gd b/game/src/Autoload/Settings/ModSettings.gd index 24ba7ca5..7f929f6d 100644 --- a/game/src/Autoload/Settings/ModSettings.gd +++ b/game/src/Autoload/Settings/ModSettings.gd @@ -1,3 +1,4 @@ +@tool extends "res://addons/kenyoni/app_settings/app_settings.gd" const SETTINGS_FILE: String = "user://mods.cfg" @@ -8,11 +9,14 @@ func _init() -> void: self.add_setting(Setting.new(MODS_LOAD_LIST, PackedStringArray()) .set_validate_fn(_load_list_validate) .add_meta(&"type", TYPE_PACKED_STRING_ARRAY)) + + if Engine.is_editor_hint(): return self.load() self.apply_all() func _notification(what: int) -> void: + if Engine.is_editor_hint(): return if what != NOTIFICATION_WM_CLOSE_REQUEST: return save() diff --git a/game/src/Autoload/Settings/Vic2Settings.gd b/game/src/Autoload/Settings/Vic2Settings.gd index 35441006..0baddcb7 100644 --- a/game/src/Autoload/Settings/Vic2Settings.gd +++ b/game/src/Autoload/Settings/Vic2Settings.gd @@ -1,3 +1,4 @@ +@tool extends "res://addons/kenyoni/app_settings/app_settings.gd" const LEGACY_SETTINGS_FILES : PackedStringArray = [] @@ -19,6 +20,8 @@ func _init() -> void: .add_meta(&"hint", PROPERTY_HINT_DIR) .add_meta(&"legacy_paths", BASE_DEFINES_LEGACY_PATHS)) + if Engine.is_editor_hint(): return + self.load() self.apply_all() @@ -30,9 +33,9 @@ func _init() -> void: _base_path_find_dialog.file_mode = FileDialog.FILE_MODE_OPEN_DIR _base_path_find_dialog.access = FileDialog.ACCESS_FILESYSTEM _base_path_find_dialog.show_hidden_files = true - _base_path_find_dialog.title = "VIC2_DIR_DIALOG_TITLE" - _base_path_find_dialog.cancel_button_text = "VIC2_DIR_DIALOG_CANCEL" - _base_path_find_dialog.ok_button_text = "VIC2_DIR_DIALOG_SELECT" + _base_path_find_dialog.title = "Select your Victoria 2 Game Directory" + _base_path_find_dialog.cancel_button_text = "Cancel" + _base_path_find_dialog.ok_button_text = "Select" _base_path_find_dialog.size = Vector2i(935, 175) _base_path_find_dialog.disable_3d = true _base_path_find_dialog.process_mode = Node.PROCESS_MODE_WHEN_PAUSED @@ -99,7 +102,14 @@ func _base_defines_path_validate(_stg: Setting, val: Variant) -> bool: return (val as String).is_absolute_path() and DirAccess.dir_exists_absolute(val) func _show_alert() -> void: - OS.alert(tr("ERROR_ASSET_PATH_NOT_FOUND_MESSAGE"), tr("ERROR_ASSET_PATH_NOT_FOUND")) + OS.alert( + tr("Failed to find Victoria II"), + tr( + "OpenVic couldn't find a copy of Victoria II installed on your computer! " + + "If you do have Victoria II installed, please specify the path to your " + + "game directory with the \"search-path\" command line option." + ) + ) func _on_base_path_find_dialog_failed() -> void: get_window().mode = Window.MODE_WINDOWED diff --git a/game/src/Systems/Startup/GameStart.gd b/game/src/Systems/Startup/GameStart.gd index 1d93ab95..20fba769 100644 --- a/game/src/Systems/Startup/GameStart.gd +++ b/game/src/Systems/Startup/GameStart.gd @@ -11,32 +11,6 @@ func _enter_tree() -> void: return action_name.begins_with("button_") and action_name.ends_with("_hotkey") func _ready() -> void: - Keychain.actions = { - # Map Group - &"map_north": Keychain.InputAction.new("Move North", "Map", true), - &"map_east": Keychain.InputAction.new("Move East", "Map", true), - &"map_south": Keychain.InputAction.new("Move South", "Map", true), - &"map_west": Keychain.InputAction.new("Move West", "Map", true), - &"map_zoom_in": Keychain.InputAction.new("Zoom In", "Map", true), - &"map_zoom_out": Keychain.InputAction.new("Zoom Out", "Map", true), - &"map_drag": Keychain.InputAction.new("Mouse Drag", "Map", true), - &"map_click": Keychain.InputAction.new("Mouse Click", "Map", true), - &"map_right_click": Keychain.InputAction.new("Mouse Right Click", "Map", true), - # Time Group - &"time_pause": Keychain.InputAction.new("Pause", "Time", true), - &"time_speed_increase": Keychain.InputAction.new("Speed Increase", "Time", true), - &"time_speed_decrease": Keychain.InputAction.new("Speed Decrease", "Time", true), - # UI Group - &"menu_pause": Keychain.InputAction.new("Open Pause Menu", "UI", true), - } - - Keychain.groups = { - "Map": Keychain.InputGroup.new("", false), - "Time": Keychain.InputGroup.new("", false), - "UI": Keychain.InputGroup.new("", false), - "Hotkeys": Keychain.InputGroup.new("UI") - } - if ArgumentParser.get_option_value(&"help"): # For some reason this doesn't get freed properly # Godot will always quit before it frees the active StreamPlayback resource diff --git a/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.gd b/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.gd index cc63a51a..1540bf67 100644 --- a/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.gd +++ b/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.gd @@ -51,7 +51,7 @@ var _id_to_tag : Array[StringName] = [] # Requirements # * FS-8 func _build_save_list() -> void: - game_select_save_tab.add_tab("GAMELOBBY_SELECT_ALL") + game_select_save_tab.add_tab("All") for save_name : StringName in SaveManager._save_dictionary: var save : SaveResource = SaveManager._save_dictionary[save_name] var save_node := _create_save_node(save) @@ -100,8 +100,8 @@ func _on_start_button_pressed() -> void: datetime["second"] ] if SaveManager.current_save == null and SaveManager.current_session_tag in _id_to_tag: - session_tag_dialog.dialog_text = tr("GAMELOBBY_SESSIONTAG_DIALOG_TEXT").format({ "session_tag": SaveManager.current_session_tag }) - session_tag_dialog.title = tr("GAMELOBBY_SESSIONTAG_DIALOG_TITLE").format({ "session_tag": SaveManager.current_session_tag }) + session_tag_dialog.dialog_text = tr("Are you want to override {session_tag} as a previous session?").format({ "session_tag": SaveManager.current_session_tag }) + session_tag_dialog.title = tr("Override {session_tag}").format({ "session_tag": SaveManager.current_session_tag }) session_tag_dialog.popup_centered() else: _on_session_tag_dialog_confirmed() @@ -134,8 +134,8 @@ func _on_session_tag_dialog_confirmed() -> void: var _requested_node_to_delete : Control func _on_save_node_delete_requested(node : Control) -> void: _requested_node_to_delete = node - delete_dialog.dialog_text = tr("GAMELOBBY_DELETE_DIALOG_TEXT").format({ "file_name": _requested_node_to_delete.resource.save_name }) - delete_dialog.title = tr("GAMELOBBY_DELETE_DIALOG_TITLE").format({ "file_name": _requested_node_to_delete.resource.save_name }) + delete_dialog.dialog_text = tr("Are you sure you want to delete {file_name}?").format({ "file_name": _requested_node_to_delete.resource.save_name }) + delete_dialog.title = tr("Delete {file_name}").format({ "file_name": _requested_node_to_delete.resource.save_name }) delete_dialog.popup_centered() var _start_date_index : int = -1 diff --git a/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn b/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn index 5434de2e..1c8dccce 100644 --- a/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn +++ b/game/src/UI/GameMenu/LobbyMenu/LobbyMenu.tscn @@ -57,7 +57,7 @@ layout_mode = 2 layout_mode = 2 current_tab = 0 tab_count = 1 -tab_0/title = "GAMELOBBY_SELECT_ALL" +tab_0/title = "All" [node name="GameSelectSaveList" type="VBoxContainer" parent="GameSelectPanel/VBoxContainer/GameSelectScroll/GameSelectList" unique_id=1241879143] layout_mode = 2 @@ -67,9 +67,6 @@ size_flags_vertical = 3 visible = false layout_mode = 2 size_flags_vertical = 3 -item_count = 2 -item_0/text = "1836" -item_1/text = "1863" [node name="Spacer" type="Control" parent="GameSelectPanel/VBoxContainer" unique_id=1625932854] custom_minimum_size = Vector2(0, 150) @@ -82,7 +79,7 @@ editor_description = "UI-37" layout_mode = 2 shortcut = SubResource("Shortcut_is4jx") shortcut_feedback = false -text = "GAMELOBBY_BACK" +text = "Back" [node name="Spacer2" type="Control" parent="GameSelectPanel/VBoxContainer" unique_id=1175264078] custom_minimum_size = Vector2(0, 33) @@ -109,7 +106,7 @@ mouse_filter = 2 [node name="SelectedCountryNameLabel" type="Label" parent="GameStartPanel/VBoxContainer" unique_id=757439158] layout_mode = 2 -text = "France" +text = "Unknown Country" horizontal_alignment = 1 [node name="Spacer2" type="Control" parent="GameStartPanel/VBoxContainer" unique_id=1584711331] @@ -120,13 +117,13 @@ mouse_filter = 2 [node name="SessionTagEdit" type="LineEdit" parent="GameStartPanel/VBoxContainer" unique_id=1347795370] layout_mode = 2 -placeholder_text = "GAMELOBBY_SESSION_TAG" +placeholder_text = "Session Tag" [node name="StartButton" type="Button" parent="GameStartPanel/VBoxContainer" unique_id=1211575243] editor_description = "UI-43" layout_mode = 2 disabled = true -text = "GAMELOBBY_START" +text = "Start Game" [node name="Spacer3" type="Control" parent="GameStartPanel/VBoxContainer" unique_id=1983118213] custom_minimum_size = Vector2(0, 33) @@ -135,17 +132,13 @@ mouse_filter = 2 [node name="SessionTagDialog" type="ConfirmationDialog" parent="." unique_id=18612915] disable_3d = true -title = "GAMELOBBY_SESSIONTAG_DIALOG_TITLE" -ok_button_text = "DIALOG_OK" -dialog_text = "GAMELOBBY_SESSIONTAG_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +title = "Override {session_tag}" +dialog_text = "Are you want to override {session_tag} as a previous session?" [node name="DeleteDialog" type="ConfirmationDialog" parent="." unique_id=1444958079] disable_3d = true -title = "GAMELOBBY_DELETE_DIALOG_TITLE" -ok_button_text = "DIALOG_OK" -dialog_text = "GAMELOBBY_DELETE_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +title = "Delete {file_name}" +dialog_text = "Are you sure you want to delete {file_name}?" [node name="MapView" parent="." unique_id=1287637233 instance=ExtResource("4_y8n6u")] diff --git a/game/src/UI/GameMenu/MainMenu/MainMenu.tscn b/game/src/UI/GameMenu/MainMenu/MainMenu.tscn index 4ba3e144..487b3de8 100644 --- a/game/src/UI/GameMenu/MainMenu/MainMenu.tscn +++ b/game/src/UI/GameMenu/MainMenu/MainMenu.tscn @@ -60,7 +60,7 @@ focus_neighbor_right = NodePath("../ContinueButton") focus_next = NodePath("../ContinueButton") focus_previous = NodePath("../ExitButton") theme_type_variation = &"TitleButton" -text = "MAINMENU_NEW_GAME" +text = "New Game" clip_text = true [node name="ContinueButton" type="Button" parent="MenuPanel/MenuList/ButtonListMargin/ButtonList" unique_id=555029268] @@ -72,7 +72,7 @@ focus_next = NodePath("../MultiplayerButton") focus_previous = NodePath("../NewGameButton") theme_type_variation = &"TitleButton" disabled = true -text = "MAINMENU_CONTINUE" +text = "Continue" clip_text = true [node name="MultiplayerButton" type="Button" parent="MenuPanel/MenuList/ButtonListMargin/ButtonList" unique_id=1085497212] @@ -84,7 +84,7 @@ focus_neighbor_right = NodePath("../OptionsButton") focus_next = NodePath("../OptionsButton") focus_previous = NodePath("../ContinueButton") theme_type_variation = &"TitleButton" -text = "MAINMENU_MULTIPLAYER" +text = "Multiplayer" clip_text = true [node name="OptionsButton" type="Button" parent="MenuPanel/MenuList/ButtonListMargin/ButtonList" unique_id=1917354155] @@ -96,7 +96,7 @@ focus_neighbor_right = NodePath("../CreditsButton") focus_next = NodePath("../CreditsButton") focus_previous = NodePath("../MultiplayerButton") theme_type_variation = &"TitleButton" -text = "MAINMENU_OPTIONS" +text = "Options" clip_text = true [node name="CreditsButton" type="Button" parent="MenuPanel/MenuList/ButtonListMargin/ButtonList" unique_id=1623923207] @@ -108,7 +108,7 @@ focus_neighbor_right = NodePath("../ExitButton") focus_next = NodePath("../ExitButton") focus_previous = NodePath("../OptionsButton") theme_type_variation = &"TitleButton" -text = "MAINMENU_CREDITS" +text = "Credits" clip_text = true [node name="ExitButton" type="Button" parent="MenuPanel/MenuList/ButtonListMargin/ButtonList" unique_id=488636852] @@ -120,7 +120,7 @@ focus_neighbor_right = NodePath("../NewGameButton") focus_next = NodePath("../NewGameButton") focus_previous = NodePath("../OptionsButton") theme_type_variation = &"TitleButton" -text = "MAINMENU_EXIT" +text = "Exit" clip_text = true [node name="BottomSpace" type="Control" parent="MenuPanel/MenuList" unique_id=2012956161] diff --git a/game/src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd b/game/src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd index 16d5cfdf..f2c118c9 100644 --- a/game/src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd +++ b/game/src/UI/GameMenu/OptionMenu/KeychainShortcutEdit.gd @@ -16,7 +16,7 @@ func _add_hotkey(action : StringName, events : Array[InputEvent]) -> void: .replace("Modo de mapa de ", "")\ .replace("Modo mapa de ", "")\ .replace("Modo mapa ", "") - display_name = tr("Mapmode %s") % display_name.capitalize() + display_name = tr("Mapmode {name}").format({ "name": display_name.capitalize() }) Keychain.actions[action].display_name = display_name Keychain.selected_profile.bindings[action] = events diff --git a/game/src/UI/GameMenu/OptionMenu/OptionsMenu.gd b/game/src/UI/GameMenu/OptionMenu/OptionsMenu.gd index a96fbdc8..8862b45d 100644 --- a/game/src/UI/GameMenu/OptionMenu/OptionsMenu.gd +++ b/game/src/UI/GameMenu/OptionMenu/OptionsMenu.gd @@ -27,7 +27,7 @@ func _ready() -> void: # * UI-11 # * UIFUN-17 var back_button := Button.new() - back_button.text = "OPTIONS_BACK" + back_button.text = "X" back_button.pressed.connect(_on_back_button_pressed) button_list.add_child(back_button) @@ -39,8 +39,7 @@ func _setup_settings() -> void: _iterate_settings_sections(Vic2Settings) _tab_container.move_child(_tab_container.get_child(0), 3) - _tab_container.set_tab_title(2, "OPTIONS_SOUND") - _tab_container.set_tab_title(3, "OPTIONS_CONTROLS") + _tab_container.set_tab_title(3, "Controls") _tab_container.current_tab = 0 func _iterate_settings_sections(app_setting: AppSettings) -> void: @@ -63,7 +62,7 @@ func _setup_settings_section(app_setting: AppSettings, section_index: int, secti container.name = section.capitalize().validate_node_name() container.section_key = section _tab_container.add_child(container) - _tab_container.set_tab_title(section_index + 1, "OPTIONS_" + section.to_upper()) + _tab_container.set_tab_title(section_index + 1, section.capitalize()) # all settings in section without a sub section for setting: AppSettings.Setting in app_setting.get_section(section, 1): diff --git a/game/src/UI/GameMenu/OptionMenu/SettingsContainer.gd b/game/src/UI/GameMenu/OptionMenu/SettingsContainer.gd index bc230228..40822080 100644 --- a/game/src/UI/GameMenu/OptionMenu/SettingsContainer.gd +++ b/game/src/UI/GameMenu/OptionMenu/SettingsContainer.gd @@ -117,9 +117,9 @@ class SettingLabel extends Label: setting = stg text = setting.get_meta( &"display_name", - "OPTIONS_" + setting.key().replace("/", "_").to_upper()) + setting.key().get_slice("/", setting.key().get_slice_count("/") - 1).capitalize()) tooltip_text = setting.description() - custom_minimum_size = Vector2(145, 0) + custom_minimum_size = Vector2(150, 0) autowrap_mode = TextServer.AUTOWRAP_WORD_SMART mouse_filter = Control.MOUSE_FILTER_PASS set_meta(&"setting_key", setting.key()) @@ -162,31 +162,18 @@ class EnumOptionButton extends OptionButton: static func create_button(stg: GameSettings.Setting) -> Control: var values: Array[Variant] = stg.get_meta(&"values", []) - var display_values: Array[String] = [] - display_values.assign(stg.get_meta(&"display_values", [])) - if values.size() != display_values.size(): - push_error("Setting %s has mismatched values and display_values size.".format(stg.key())) - return PlaceholderLabel.new(stg) + if not stg.has_meta(&"display_template"): + var display_values: PackedStringArray = stg.get_meta(&"display_values", PackedStringArray()) + if values.size() != display_values.size(): + push_error("Setting %s has mismatched values and display_values size.".format(stg.key())) + return PlaceholderLabel.new(stg) return EnumOptionButton.new(stg) func _init(stg: GameSettings.Setting) -> void: setting = stg - var values: Array[Variant] = setting.get_meta(&"values", []) - var display_values: Array[String] = [] - display_values.assign(setting.get_meta(&"display_values", [])) - var translate_function : Callable = setting.get_meta( - &"translate_value_function", - func(_s, _v, display_value: String) -> String: return display_value) - set_meta(&"setting_key", setting.key()) size_flags_horizontal = Control.SIZE_EXPAND_FILL - var sel_idx: int = 0 - for idx: int in range(len(values)): - var translated_display : String = translate_function.call(setting, values[idx], display_values[idx]) - add_item(translated_display) - if setting.staged_or_value() == values[idx]: - sel_idx = idx - update(sel_idx) + _update_items() item_selected.connect(func(idx: int) -> void: setting.set_value(setting.get_meta(&"values")[idx]) ) @@ -199,6 +186,32 @@ class EnumOptionButton extends OptionButton: else: select(index) + func _notification(what: int) -> void: + if what != NOTIFICATION_TRANSLATION_CHANGED: return + if not setting.has_meta(&"display_template"): return + _update_items() + + func _update_items() -> void: + clear() + var values: Array[Variant] = setting.get_meta(&"values", []) + var display_values: PackedStringArray = _get_display_values() + var sel_idx: int = 0 + for idx: int in range(len(values)): + var translated_display : String = display_values[idx] + add_item(translated_display) + if setting.staged_or_value() == values[idx]: sel_idx = idx + update(sel_idx) + + func _get_display_values() -> PackedStringArray: + if not setting.has_meta(&"display_template"): + return setting.get_meta(&"display_values", PackedStringArray()) + + var result := PackedStringArray() + var template: String = setting.get_meta(&"display_template") + for value in setting.get_meta(&"values", []): + result.append(tr(template).format({ "value": value })) + return result + class RangeSlider extends HBoxContainer: var setting: GameSettings.Setting var _slider := HSlider.new() @@ -311,8 +324,8 @@ class RevertDialog extends ConfirmationDialog: func _init(revert_group : GameSettings.RevertGroup) -> void: _revert_group = revert_group title = _revert_group.title - cancel_button_text = "DIALOG_CANCEL" - ok_button_text = "DIALOG_OK" + cancel_button_text = "Cancel" + ok_button_text = "Ok" disable_3d = true size = Vector2i(730, 100) confirmed.connect(_on_confirmed) diff --git a/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd b/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd index 4bbe5c7e..5edb297b 100644 --- a/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd +++ b/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.gd @@ -9,15 +9,15 @@ var _commit_label : Button @export var _checksum_label : Button -var _checksum : String = "????" +var _checksum : String = "Unknown Checksum" # REQUIREMENTS: # * SS-104, SS-105, SS-106, SS-107 # * UIFUN-97, UIFUN-297, UIFUN-299 func _ready() -> void: - _version_label.text = tr("MAIMENU_LATEST_RELEASE_NAME").format({ "release_name": GitInfo.release_name }) + _version_label.text = tr("Latest Release Name: {release_name}").format({ "release_name": GitInfo.release_name }) _version_label.tooltip_text = GitInfo.tag - _commit_label.text = tr("MAIMENU_COMMIT").format({ "short_hash": GitInfo.short_hash }) + _commit_label.text = tr("Commit: {short_hash}").format({ "short_hash": GitInfo.short_hash }) _commit_label.tooltip_text = GitInfo.commit_hash # UI-111 _checksum = Checksum.get_checksum_text() @@ -29,8 +29,8 @@ func _notification(what : int) -> void: _update_checksum_label_text() func _update_checksum_label_text() -> void: - _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM_TOOLTIP").format({ "checksum": _checksum }) - _checksum_label.text = tr("MAINMENU_CHECKSUM").format({ "short_checksum": _checksum.substr(0, 4) }) + _checksum_label.tooltip_text = tr("Checksum {checksum}").format({ "checksum": _checksum }) + _checksum_label.text = tr("Checksum: {short_checksum}").format({ "short_checksum": _checksum.substr(0, 4) }) func _on_version_label_pressed() -> void: DisplayServer.clipboard_set(GitInfo.tag) diff --git a/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn b/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn index 001472ab..24a3dfcf 100644 --- a/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn +++ b/game/src/UI/GameMenu/ReleaseInfoBox/ReleaseInfoBox.tscn @@ -22,7 +22,7 @@ _checksum_label = NodePath("ChecksumButton") [node name="GameInfoButton" type="Button" parent="." unique_id=180827051] layout_mode = 2 theme_type_variation = &"GameInfoButton" -text = "MAINMENU_GAME_INFO" +text = "Game Info" flat = true [node name="VSeparator" type="VSeparator" parent="." unique_id=570681538] @@ -31,10 +31,10 @@ layout_mode = 2 [node name="VersionButton" type="Button" parent="." unique_id=133473529] editor_description = "UI-869, UI-870" layout_mode = 2 -tooltip_text = "VERSION_MISSING" +tooltip_text = "Release Missing" focus_mode = 0 theme_type_variation = &"VersionLabel" -text = "VERSION_MISSING" +text = "Tag Missing" flat = true alignment = 0 @@ -44,9 +44,10 @@ layout_mode = 2 [node name="CommitButton" type="Button" parent="." unique_id=1491923438] editor_description = "UI-871, UI-872" layout_mode = 2 +tooltip_text = "Commit Missing" focus_mode = 0 theme_type_variation = &"CommitLabel" -text = "????????" +text = "Short Commit Missing" flat = true alignment = 0 @@ -56,10 +57,10 @@ layout_mode = 2 [node name="ChecksumButton" type="Button" parent="." unique_id=89477046] editor_description = "UI-111" layout_mode = 2 -tooltip_text = "CHECKSUM_MISSING" +tooltip_text = "Checksum Missing" focus_mode = 0 theme_type_variation = &"ChecksumLabel" -text = "(????)" +text = "Short Checksum Missing" flat = true alignment = 0 diff --git a/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd b/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd index a1351cb6..3d270f61 100644 --- a/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd +++ b/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.gd @@ -27,8 +27,8 @@ func filter_for_tag(tag : StringName) -> void: # Requirements # * UIFUN-78 func show_for_load() -> void: - _label.text = "SAVELOADMENU_LOAD_TITLE" - _save_load_button.text = "SAVELOADMENU_LOAD_BUTTON" + _label.text = "Load Menu" + _save_load_button.text = "Load" _save_line_edit.editable = false is_save_menu = false show() @@ -36,14 +36,14 @@ func show_for_load() -> void: # Requirements # * UIFUN-77 func show_for_save() -> void: - _label.text = "SAVELOADMENU_SAVE_TITLE" - _save_load_button.text = "SAVELOADMENU_SAVE_BUTTON" + _label.text = "Save Menu" + _save_load_button.text = "Save" _save_line_edit.editable = true is_save_menu = true show() func _build_save_list() -> void: - _tag_selection_tab.add_tab("SAVELOADMENU_TABSELECTIONTABBAR_ALL") + _tag_selection_tab.add_tab("All") for save_name : StringName in SaveManager._save_dictionary: var save : SaveResource = SaveManager._save_dictionary[save_name] var save_node := _create_save_node(save) @@ -85,8 +85,8 @@ var _submitted_text : String = "" func _on_save_line_edit_text_submitted(new_text) -> void: _submitted_text = new_text if SaveManager.has_save(new_text): - _overwrite_dialog.dialog_text = tr("SAVELOADMENU_OVERWRITE_DIALOG_TEXT").format({ "file_name": _submitted_text }) - _overwrite_dialog.title = tr("SAVELOADMENU_OVERWRITE_DIALOG_TITLE").format({ "file_name": _submitted_text }) + _overwrite_dialog.dialog_text = tr("Are you want to overwrite {file_name}?").format({ "file_name": _submitted_text }) + _overwrite_dialog.title = tr("Overwrite {file_name}").format({ "file_name": _submitted_text }) _overwrite_dialog.popup_centered() return _on_overwrite_dialog_confirmed() @@ -98,8 +98,8 @@ func _on_save_load_button_pressed() -> void: var _requested_node_to_delete : Control func _on_save_node_delete_requested(node : Control) -> void: _requested_node_to_delete = node - _delete_dialog.dialog_text = tr("SAVELOADMENU_DELETE_DIALOG_TEXT").format({ "file_name": _requested_node_to_delete.resource.save_name }) - _delete_dialog.title = tr("SAVELOADMENU_DELETE_DIALOG_TITLE").format({ "file_name": _requested_node_to_delete.resource.save_name }) + _delete_dialog.dialog_text = tr("Are you sure you want to delete {file_name}?").format({ "file_name": _requested_node_to_delete.resource.save_name }) + _delete_dialog.title = tr("Delete {file_name}").format({ "file_name": _requested_node_to_delete.resource.save_name }) _delete_dialog.popup_centered() # REQUIREMENTS: diff --git a/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn b/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn index b2728642..420df883 100644 --- a/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn +++ b/game/src/UI/GameMenu/SaveLoadMenu/SaveLoadMenu.tscn @@ -45,7 +45,7 @@ alignment = 2 [node name="SaveLoadLabel" type="Label" parent="SaveLoadPanel/SaveLoadList/TitleBarList" unique_id=664891856] layout_mode = 2 size_flags_horizontal = 6 -text = "SAVELOADMENU_SAVE_TITLE" +text = "Save Menu" [node name="CloseButton" type="Button" parent="SaveLoadPanel/SaveLoadList/TitleBarList" unique_id=1849136111] editor_description = "UI-87, UI-94" @@ -57,14 +57,14 @@ layout_mode = 2 [node name="TagSelectionLabel" type="Label" parent="SaveLoadPanel/SaveLoadList/TagSelectionList" unique_id=1194915598] layout_mode = 2 -text = "SAVELOADMENU_SESSION" +text = "Session:" [node name="TagSelectionTabBar" type="TabBar" parent="SaveLoadPanel/SaveLoadList/TagSelectionList" unique_id=114034506] layout_mode = 2 size_flags_horizontal = 3 current_tab = 0 tab_count = 1 -tab_0/title = "SAVELOADMENU_TABSELECTIONTABBAR_ALL" +tab_0/title = "All" [node name="SaveLoadScroll" type="ScrollContainer" parent="SaveLoadPanel/SaveLoadList" unique_id=999219138] editor_description = "UI-83, UI-90" @@ -86,21 +86,17 @@ layout_mode = 2 size_flags_horizontal = 4 shortcut = SubResource("Shortcut_o1f2l") shortcut_feedback = false -text = "SAVELOADMENU_SAVE_BUTTON" +text = "Save" [node name="DeleteDialog" type="ConfirmationDialog" parent="." unique_id=214640647] disable_3d = true -title = "SAVELOADMENU_DELETE_DIALOG_TITLE" -ok_button_text = "DIALOG_OK" -dialog_text = "SAVELOADMENU_DELETE_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +title = "Delete {file_name}" +dialog_text = "Are you sure you want to delete {file_name}?" [node name="OverwriteDialog" type="ConfirmationDialog" parent="." unique_id=180565257] disable_3d = true -title = "SAVELOADMENU_OVERWRITE_DIALOG_TITLE" -ok_button_text = "DIALOG_OK" -dialog_text = "SAVELOADMENU_OVERWRITE_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +title = "Overwrite {file_name}" +dialog_text = "Are you want to overwrite {file_name}?" [connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"] [connection signal="pressed" from="SaveLoadPanel/SaveLoadList/TitleBarList/CloseButton" to="." method="_on_close_button_pressed"] diff --git a/game/src/UI/Session/PauseMenu/PauseMenu.gd b/game/src/UI/Session/PauseMenu/PauseMenu.gd index 680ce45b..b6118b75 100644 --- a/game/src/UI/Session/PauseMenu/PauseMenu.gd +++ b/game/src/UI/Session/PauseMenu/PauseMenu.gd @@ -15,8 +15,8 @@ signal load_button_pressed signal options_button_pressed func _ready() -> void: - _main_menu_save_button = _main_menu_dialog.add_button("DIALOG_SAVE_AND_RESIGN", true, &"save_and_main_menu") - _quit_save_button = _quit_dialog.add_button("DIALOG_SAVE_AND_QUIT", true, &"save_and_quit") + _main_menu_save_button = _main_menu_dialog.add_button("Save and Resign", true, &"save_and_main_menu") + _quit_save_button = _quit_dialog.add_button("Save and Quit", true, &"save_and_quit") # Necessary to center the save buttons and preserve the reference to the separator elements var dialog_hbox : HBoxContainer = _main_menu_dialog.get_child(2, true) diff --git a/game/src/UI/Session/PauseMenu/PauseMenu.tscn b/game/src/UI/Session/PauseMenu/PauseMenu.tscn index b0f5327c..0f7b8fd6 100644 --- a/game/src/UI/Session/PauseMenu/PauseMenu.tscn +++ b/game/src/UI/Session/PauseMenu/PauseMenu.tscn @@ -29,31 +29,31 @@ layout_mode = 2 editor_description = "UI-69" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_SAVE" +text = "Save Game" [node name="LoadButton" type="Button" parent="ButtonListMargin/ButtonList" unique_id=805586651] editor_description = "UI-70" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_LOAD" +text = "Load Game" [node name="OptionsButton" type="Button" parent="ButtonListMargin/ButtonList" unique_id=342275540] editor_description = "UI-10" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_OPTIONS" +text = "Options" [node name="MainMenuButton" type="Button" parent="ButtonListMargin/ButtonList" unique_id=619425452] editor_description = "UI-71" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_MAINMENU" +text = "Resign To Menu" [node name="QuitButton" type="Button" parent="ButtonListMargin/ButtonList" unique_id=1503267683] editor_description = "UI-72" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_QUIT" +text = "Quit Game" [node name="CloseSeparator" type="HSeparator" parent="ButtonListMargin/ButtonList" unique_id=1227771272] layout_mode = 2 @@ -63,22 +63,18 @@ theme_type_variation = &"SessionSeparator" editor_description = "SS-64, UI-80, UIFUN-79" layout_mode = 2 theme_type_variation = &"SessionButton" -text = "GAMESESSIONMENU_CLOSE" +text = "Close" [node name="MainMenuDialog" type="ConfirmationDialog" parent="." unique_id=739307228] disable_3d = true -title = "GAMESESSIONMENU_MAINMENU_DIALOG_TITLE" +title = "Resign Game" size = Vector2i(384, 100) -ok_button_text = "DIALOG_OK" -dialog_text = "GAMESESSIONMENU_MAINMENU_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +dialog_text = "Are you sure you want to resign and return to the main menu?" [node name="QuitDialog" type="ConfirmationDialog" parent="." unique_id=2097588504] disable_3d = true -title = "GAMESESSIONMENU_QUIT_DIALOG_TITLE" -ok_button_text = "DIALOG_OK" -dialog_text = "GAMESESSIONMENU_QUIT_DIALOG_TEXT" -cancel_button_text = "DIALOG_CANCEL" +title = "Quit Game" +dialog_text = "Are you sure you want to quit to desktop?" [connection signal="pressed" from="ButtonListMargin/ButtonList/SaveButton" to="." method="_on_save_button_pressed"] [connection signal="pressed" from="ButtonListMargin/ButtonList/LoadButton" to="." method="_on_load_button_pressed"]