diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/SwitchPokemonQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/SwitchPokemonQueryObject.vb index f8e80cab2..4b65f78f0 100644 --- a/P3D/Battle/BattleSystemV2/QueryObjects/SwitchPokemonQueryObject.vb +++ b/P3D/Battle/BattleSystemV2/QueryObjects/SwitchPokemonQueryObject.vb @@ -78,7 +78,7 @@ Private Sub UpdateChoose() If Controls.Accept(True, True, True) = True Then If _chooseIndex = 0 Then - Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.GetString("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True} + Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.Translate("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True} AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler SoundManager.PlaySound("select") Core.SetScreen(selScreen) @@ -105,12 +105,12 @@ If _chooseIndex = 0 Then Canvas.DrawRectangle(New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 438, 80, 50), Color.White) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.White) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.White) Else Canvas.DrawRectangle(New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 378, 80, 50), Color.White) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.White) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.White) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.Black) End If End Sub @@ -164,7 +164,7 @@ MyBase.New(QueryTypes.SwitchPokemon) Me.TempScreen = BattleScreen - TransformText(BattleScreen.Trainer.Name & " " & Localization.GetString("battle_main_trainer_sent_out_3") & " " & NewPokemon.GetDisplayName() & Localization.GetString("battle_main_trainer_sent_out_4")) + TransformText(BattleScreen.Trainer.Name & " " & Localization.Translate("battle_main_trainer_sent_out_3") & " " & NewPokemon.GetDisplayName() & Localization.Translate("battle_main_trainer_sent_out_4")) End Sub Dim delay As Single = 3.0F diff --git a/P3D/HelperClasses/Localization.vb b/P3D/HelperClasses/Localization.vb index 050bf8ee1..7f72dd686 100644 --- a/P3D/HelperClasses/Localization.vb +++ b/P3D/HelperClasses/Localization.vb @@ -99,7 +99,7 @@ Public Class Localization End If End If End Sub - Public Shared Function Translate(ByVal tokenInput As String, Optional ByVal type As Type = Nothing, Optional ByVal DefaultValue As String = "") As String + Public Shared Function Translate(ByVal tokenInput As String, Optional ByVal DefaultValue As String = "", Optional ByVal type As Type = Nothing) As String Dim resultToken As Token = Nothing Dim CurrentScreen As String = GetCurrentScreen() tokenInput = tokenInput.ToLower().Replace(" ", "_").Replace("'", "").Replace("p3d.", "").Replace("._", "_") ' Lets format the string before finding it diff --git a/P3D/Overworld/NotificationPopup.vb b/P3D/Overworld/NotificationPopup.vb index 55893e449..2be19f7f8 100644 --- a/P3D/Overworld/NotificationPopup.vb +++ b/P3D/Overworld/NotificationPopup.vb @@ -181,9 +181,9 @@ Public Class NotificationPopup Core.SpriteBatch.DrawString(FontManager.InGameFont, TextHeader.CropStringToWidth(FontManager.InGameFont, CInt(_scale), CInt((_size.Width * (FrameSizeBack / 3) - FrameSizeBack / 3 * 4) * _scale)), New Vector2(TextOffset, CInt(Me._positionY + FrameSizeBack / 3)), Color.Black, 0.0F, Vector2.Zero, CSng(_scale), SpriteEffects.None, 0.0F) End If - Dim InteractText As String = "[" & Localization.GetString("game_notification_dismiss") & "]" + Dim InteractText As String = "[" & Localization.Translate("game_notification_dismiss") & "]" If Me._scriptFile <> "" Then - InteractText = "[" & Localization.GetString("game_notification_accept") & "]" + InteractText = "[" & Localization.Translate("game_notification_accept") & "]" End If Dim InteractOffset As Vector2 = New Vector2(CInt(Core.windowSize.Width - FrameSizeBack / 3 * _scale - FontManager.InGameFont.MeasureString(InteractText).X * _scale / 2), CInt(Me._positionY + _size.Height * (FrameSizeBack / 3) * _scale + 5)) diff --git a/P3D/Overworld/OverworldScreen.vb b/P3D/Overworld/OverworldScreen.vb index a92b3bcbb..9bdc70079 100644 --- a/P3D/Overworld/OverworldScreen.vb +++ b/P3D/Overworld/OverworldScreen.vb @@ -365,16 +365,16 @@ Public Class OverworldScreen Dim d As New Dictionary(Of Buttons, String) If NotificationPopupList.Count > 0 Then - d.Add(Buttons.A, Localization.GetString("game_interaction_notification", "Notification")) + d.Add(Buttons.A, Localization.Translate("game_interaction_notification", "Notification")) Else - d.Add(Buttons.A, Localization.GetString("game_interaction_interact", "Interact")) + d.Add(Buttons.A, Localization.Translate("game_interaction_interact", "Interact")) End If - d.Add(Buttons.X, Localization.GetString("game_interaction_gamemenu", "Game Menu")) + d.Add(Buttons.X, Localization.Translate("game_interaction_gamemenu", "Game Menu")) If Core.Player.HasPokegear = True Then - d.Add(Buttons.Y, Localization.GetString("game_interaction_pokegear", "Pokégear")) + d.Add(Buttons.Y, Localization.Translate("game_interaction_pokegear", "Pokégear")) End If - d.Add(Buttons.Start, Localization.GetString("game_interaction_pausemenu", "Game Menu")) + d.Add(Buttons.Start, Localization.Translate("game_interaction_pausemenu", "Game Menu")) DrawGamePadControls(d) End If diff --git a/P3D/Pokemon/Items/Item.vb b/P3D/Pokemon/Items/Item.vb index b62f3fc13..3ced23d52 100644 --- a/P3D/Pokemon/Items/Item.vb +++ b/P3D/Pokemon/Items/Item.vb @@ -17,7 +17,7 @@ Public MustInherit Class Item Public Function GetDescription() As String If Localization.TokenExists("item_desc_" & GetAttribute().Id) = True Then - Return Localization.GetString("item_desc_" & GetAttribute().Id) + Return Localization.Translate("item_desc_" & GetAttribute().Id) Else Return Me.Description End If @@ -39,7 +39,7 @@ Public MustInherit Class Item Public Overridable ReadOnly Property Name As String Get If Localization.TokenExists("item_name_" & GetAttribute().Id) = True Then - Return Localization.GetString("item_name_" & GetAttribute().Id) + Return Localization.Translate("item_name_" & GetAttribute().Id) Else Return GetAttribute().Name End If diff --git a/P3D/Screens/Battle/BattleGrowStatsScreen.vb b/P3D/Screens/Battle/BattleGrowStatsScreen.vb index 9fe64c82a..571760f53 100644 --- a/P3D/Screens/Battle/BattleGrowStatsScreen.vb +++ b/P3D/Screens/Battle/BattleGrowStatsScreen.vb @@ -46,17 +46,17 @@ Dim OldOffset As Integer = 160 If Delay >= 3.0F Then - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("MaxHP") & ":", New Vector2(p.X + 32, p.Y + 84), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("MaxHP") & ":", New Vector2(p.X + 32, p.Y + 84), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(0).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 84), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Attack") & ":", New Vector2(p.X + 32, p.Y + 124), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("Attack") & ":", New Vector2(p.X + 32, p.Y + 124), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(1).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 124), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Defense") & ":", New Vector2(p.X + 32, p.Y + 164), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("Defense") & ":", New Vector2(p.X + 32, p.Y + 164), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(2).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 164), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Sp_Attack") & ":", New Vector2(p.X + 32, p.Y + 204), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("Sp_Attack") & ":", New Vector2(p.X + 32, p.Y + 204), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(3).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 204), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Sp_Defense") & ":", New Vector2(p.X + 32, p.Y + 244), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("Sp_Defense") & ":", New Vector2(p.X + 32, p.Y + 244), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(4).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 244), Color.Black) - Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Speed") & ":", New Vector2(p.X + 32, p.Y + 284), Color.Black) + Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("Speed") & ":", New Vector2(p.X + 32, p.Y + 284), Color.Black) Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(5).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 284), Color.Black) End If diff --git a/P3D/Screens/MainMenu/NewNewGameScreen.vb b/P3D/Screens/MainMenu/NewNewGameScreen.vb index 1f422b758..d3857674f 100644 --- a/P3D/Screens/MainMenu/NewNewGameScreen.vb +++ b/P3D/Screens/MainMenu/NewNewGameScreen.vb @@ -321,7 +321,7 @@ Next SpriteBatch.DrawString(FontManager.MainFont, _names(_index), New Vector2(CInt(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(_names(_index)).X), CInt(windowSize.Height / 2.0F + 200)), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0F) - SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("global_" & _genders(_index).ToLower(), _genders(_index)), New Vector2(CInt(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(Localization.GetString("global_" & _genders(_index).ToLower(), _genders(_index))).X / 2.0F), CInt(windowSize.Height / 2.0F + 300)), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F) + SpriteBatch.DrawString(FontManager.MainFont, Localization.Translate("global_" & _genders(_index).ToLower(), _genders(_index)), New Vector2(CInt(windowSize.Width / 2.0F - FontManager.MainFont.MeasureString(Localization.Translate("global_" & _genders(_index).ToLower(), _genders(_index))).X / 2.0F), CInt(windowSize.Height / 2.0F + 300)), New Color(255, 255, 255, CInt(255 * _fadeIn)), 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F) End Sub End Class diff --git a/P3D/Screens/MainMenu/PauseScreen.vb b/P3D/Screens/MainMenu/PauseScreen.vb index acdbd7009..f46b74598 100644 --- a/P3D/Screens/MainMenu/PauseScreen.vb +++ b/P3D/Screens/MainMenu/PauseScreen.vb @@ -194,8 +194,8 @@ Private Sub DrawQuit() Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("confirmation")).X / 2) - Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(CInt(pX - 7), CInt(Core.ScreenSize.Height / 7.5) + 110 + 2), Color.Black) - Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(CInt(pX - 10), CInt(Core.ScreenSize.Height / 7.5) + 110), Color.White) + Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.Translate("pause_menu_confirmation"), New Vector2(CInt(pX - 7), CInt(Core.ScreenSize.Height / 7.5) + 110 + 2), Color.Black) + Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.Translate("pause_menu_confirmation"), New Vector2(CInt(pX - 10), CInt(Core.ScreenSize.Height / 7.5) + 110), Color.White) Dim FontColor As Color Dim FontShadow As Color = New Color(0, 0, 0, 0) diff --git a/P3D/Screens/MainMenu/PressStartScreen.vb b/P3D/Screens/MainMenu/PressStartScreen.vb index a511a06f7..881fd4384 100644 --- a/P3D/Screens/MainMenu/PressStartScreen.vb +++ b/P3D/Screens/MainMenu/PressStartScreen.vb @@ -212,16 +212,16 @@ Public Class PressStartScreen Dim text As String = String.Empty If ControllerHandler.IsConnected() Then - text = Localization.Translate("press_first", Me.GetType) & " " & Localization.Translate("press_last", Me.GetType) + text = Localization.Translate("press_first", Nothing, Me.GetType) & " " & Localization.Translate("press_last", Nothing, Me.GetType) Else - text = Localization.Translate("press_first", Me.GetType) & " " & KeyBindings.EnterKey1.ToString().ToUpper & " " & Localization.Translate("press_last", Me.GetType) + text = Localization.Translate("press_first", Nothing, Me.GetType) & " " & KeyBindings.EnterKey1.ToString().ToUpper & " " & Localization.Translate("press_last", Nothing, Me.GetType) End If Dim textSize As Vector2 = FontManager.GameJoltFont.MeasureString(text) GetFontRenderer().DrawString(FontManager.GameJoltFont, text, New Vector2(windowSize.Width / 2.0F - textSize.X / 2.0F, windowSize.Height - textSize.Y - 50), _textColor) If ControllerHandler.IsConnected() Then - SpriteBatch.Draw(TextureManager.GetTexture("GUI\GamePad\xboxControllerButtonA"), New Rectangle(CInt(windowSize.Width / 2 - textSize.X / 2 + FontManager.GameJoltFont.MeasureString(Localization.Translate("press_first", Me.GetType) & " ").X), CInt(windowSize.Height - textSize.Y - 50), 40, 40), Color.White) + SpriteBatch.Draw(TextureManager.GetTexture("GUI\GamePad\xboxControllerButtonA"), New Rectangle(CInt(windowSize.Width / 2 - textSize.X / 2 + FontManager.GameJoltFont.MeasureString(Localization.Translate("press_first", Nothing, Me.GetType) & " ").X), CInt(windowSize.Height - textSize.Y - 50), 40, 40), Color.White) End If End If @@ -672,7 +672,7 @@ Public Class NewMainMenuScreen Select Case _menuIndex Case 0 If _selectedProfile = 1 And Security.FileValidation.IsValid(False) = False Then - _messageBox.Show(Localization.GetString("main_menu_error_filevalidation", "File validation failed!~Redownload the game's files to solve this problem.")) + _messageBox.Show(Localization.Translate("main_menu_error_filevalidation", "File validation failed!~Redownload the game's files to solve this problem.")) Else _MainProfiles(_selectedProfile).SelectProfile() End If @@ -877,12 +877,12 @@ Public Class NewMainMenuScreen Dim errorText As String If tmpProfile.IsGameJolt() Then - errorText = Localization.GetString("main_menu_error_gamejolt_1", "Download failed. Press Accept to try again.") & Environment.NewLine & Environment.NewLine & - Localization.GetString("main_menu_error_gamejolt_2", "If the problem persists, please try again later") & Environment.NewLine & - Localization.GetString("main_menu_error_gamejolt_3", "or contact us in our Discord server:") & Environment.NewLine & Environment.NewLine & - Localization.GetString("main_menu_error_gamejolt_4", "http://www.discord.me/p3d") + errorText = Localization.Translate("main_menu_error_gamejolt_1", "Download failed. Press Accept to try again.") & Environment.NewLine & Environment.NewLine & + Localization.Translate("main_menu_error_gamejolt_2", "If the problem persists, please try again later") & Environment.NewLine & + Localization.Translate("main_menu_error_gamejolt_3", "or contact us in our Discord server:") & Environment.NewLine & Environment.NewLine & + Localization.Translate("main_menu_error_gamejolt_4", "http://www.discord.me/p3d") Else - errorText = Localization.GetString("main_menu_error_gamemode_profile", "The required GameMode does not exist!") + errorText = Localization.Translate("main_menu_error_gamemode_profile", "The required GameMode does not exist!") End If GetFontRenderer().DrawString(FontManager.InGameFont, errorText, New Vector2(displayRect.X + 70, displayRect.Y + 78), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F) @@ -1260,7 +1260,7 @@ Public Class NewMainMenuScreen End If ElseIf _IsOptionsMenuButton Then - Dim text As String = Localization.GetString("main_menu_options", "Options") + Dim text As String = Localization.Translate("main_menu_options", "Options") If alpha >= 250 And CurrentScreen.Identification = Identifications.MainMenuScreen Then FontRenderer.DrawString(FontManager.InGameFont, text, New Vector2(CInt(offset.X + 80 - (FontManager.InGameFont.MeasureString(text).X) / 2 + 2), CInt(offset.Y + 132 - (FontManager.InGameFont.MeasureString(text).Y) / 2 + 2)), New Color(0, 0, 0, alpha)) FontRenderer.DrawString(FontManager.InGameFont, text, New Vector2(CInt(offset.X + 80 - (FontManager.InGameFont.MeasureString(text).X) / 2), CInt(offset.Y + 132 - (FontManager.InGameFont.MeasureString(text).Y) / 2)), New Color(255, 255, 255, alpha)) @@ -1282,14 +1282,14 @@ Public Class NewMainMenuScreen Dim textB As String = "" Select Case _OptionsMenuIndex Case 0 - textA = Localization.GetString("main_menu_options_language", "Language") + textA = Localization.Translate("main_menu_options_language", "Language") Case 1 - textA = Localization.GetString("main_menu_options_audio", "Audio") + textA = Localization.Translate("main_menu_options_audio", "Audio") Case 2 - textA = Localization.GetString("main_menu_options_controls", "Controls") + textA = Localization.Translate("main_menu_options_controls", "Controls") Case 3 - textA = Localization.GetString("main_menu_options_contentpacks_line1", "Content") - textB = Localization.GetString("main_menu_options_contentpacks_line2", "Packs") + textA = Localization.Translate("main_menu_options_contentpacks_line1", "Content") + textB = Localization.Translate("main_menu_options_contentpacks_line2", "Packs") End Select If _OptionsMenuIndex <> 3 Then @@ -1450,7 +1450,7 @@ Public Class NewMainMenuScreen LoadGameJolt() ElseIf IsOptionsMenuButton = False Then Dim messageBox As New UI.MessageBox(CurrentScreen) - messageBox.Show(Localization.GetString("main_menu_error_gamemode_message", "The required GameMode does not exist.~Reaquire the GameMode to play on this profile.").Replace("~", Environment.NewLine)) + messageBox.Show(Localization.Translate("main_menu_error_gamemode_message", "The required GameMode does not exist.~Reaquire the GameMode to play on this profile.").Replace("~", Environment.NewLine)) Else _menuIndex = 2 _selectedProfileTemp = _selectedProfile @@ -1500,8 +1500,8 @@ Public Class GameModeSelectionScreen Public Overrides Sub Draw() PreScreen.Draw() - Dim text As String = Localization.Translate("select_gamemode_1", Me.GetType) & Environment.NewLine & Localization.Translate("select_gamemode_2", Me.GetType) - + Dim text As String = Localization.Translate("select_gamemode_1", Nothing, Me.GetType) & Environment.NewLine & Localization.Translate("select_gamemode_2", Nothing, Me.GetType) + If GameModeSplash IsNot Nothing Then SpriteBatch.Draw(GameModeSplash, windowSize, Color.White) End If @@ -1546,11 +1546,11 @@ Public Class GameModeSelectionScreen Dim dispAuthor As String = GameMode.Author Dim dispContentPath As String = GameMode.ContentPath - tempGameModesDisplay = Localization.GetString("gamemode_menu_name") & ": " & dispName & Environment.NewLine & - Localization.GetString("gamemode_menu_version") & ": " & dispVersion & Environment.NewLine & - Localization.GetString("gamemode_menu_author") & ": " & dispAuthor & Environment.NewLine & - Localization.GetString("gamemode_menu_contentpath") & ": " & dispContentPath & Environment.NewLine & - Localization.GetString("gamemode_menu_description") & ": " & dispDescription + tempGameModesDisplay = Localization.Translate("gamemode_menu_name") & ": " & dispName & Environment.NewLine & + Localization.Translate("gamemode_menu_version") & ": " & dispVersion & Environment.NewLine & + Localization.Translate("gamemode_menu_author") & ": " & dispAuthor & Environment.NewLine & + Localization.Translate("gamemode_menu_contentpath") & ": " & dispContentPath & Environment.NewLine & + Localization.Translate("gamemode_menu_description") & ": " & dispDescription End If tempGameModesDisplay = tempGameModesDisplay.CropStringToWidth(FontManager.InGameFont, 400) diff --git a/P3D/Screens/NewGameScreen.vb b/P3D/Screens/NewGameScreen.vb index 9433c6f65..5e9a21c4d 100644 --- a/P3D/Screens/NewGameScreen.vb +++ b/P3D/Screens/NewGameScreen.vb @@ -110,7 +110,7 @@ Else If Me.Dialogues.Count < 3 Then Me.Dialogues.Clear() - Me.Dialogues.AddRange({Localization.GetString("new_game_intro_1"), Localization.GetString("new_game_intro_2"), Localization.GetString("new_game_intro_3")}) + Me.Dialogues.AddRange({Localization.Translate("new_game_intro_1"), Localization.Translate("new_game_intro_2"), Localization.Translate("new_game_intro_3")}) End If End If End Sub @@ -462,14 +462,14 @@ Select Case True Case WeirdNames.Contains(name.ToLower()) - Return Localization.GetString("new_game_intro_weird_name_1") & name & Localization.GetString("new_game_intro_weird_name_2") + Return Localization.Translate("new_game_intro_weird_name_1") & name & Localization.Translate("new_game_intro_weird_name_2") Case KnownNames.Contains(name.ToLower()) - Return Localization.GetString("new_game_intro_known_name_1") & name & Localization.GetString("new_game_intro_known_name_2") + Return Localization.Translate("new_game_intro_known_name_1") & name & Localization.Translate("new_game_intro_known_name_2") Case OwnNames.Contains(name.ToLower()) - Return Localization.GetString("new_game_intro_same_name_1") & name & Localization.GetString("new_game_intro_same_name_2") + Return Localization.Translate("new_game_intro_same_name_1") & name & Localization.Translate("new_game_intro_same_name_2") End Select - Return Localization.GetString("new_game_intro_name_1") & name & Localization.GetString("new_game_intro_name_2") + Return Localization.Translate("new_game_intro_name_1") & name & Localization.Translate("new_game_intro_name_2") End Function End Class diff --git a/P3D/Screens/NewOptionScreen.vb b/P3D/Screens/NewOptionScreen.vb index 98619957f..c7171ef9b 100644 --- a/P3D/Screens/NewOptionScreen.vb +++ b/P3D/Screens/NewOptionScreen.vb @@ -26,8 +26,8 @@ Private Languages As New List(Of String) Private LanguageNames As New List(Of String) - Private currentLanguage As String = Localization.LanguageSuffix - Private TempLanguage As String = Localization.LanguageSuffix + Private currentLanguage As String = Localization.CurrentLanguage + Private TempLanguage As String = Localization.CurrentLanguage Public Shared languageMenuIndex(3) As Integer Private PackNames As New List(Of String) @@ -403,10 +403,10 @@ Dim s() As String = ContentPackManager.GetContentPackInfo(packName) If s.Length > 0 Then - PInfoVersion = s(0).CropStringToWidth(FontManager.InGameFont, 540 - 16 - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_version")).X)) + PInfoVersion = s(0).CropStringToWidth(FontManager.InGameFont, 540 - 16 - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_version")).X)) End If If s.Length > 1 Then - PInfoAuthor = s(1).CropStringToWidth(FontManager.InGameFont, 540 - 16 - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_by")).X)) + PInfoAuthor = s(1).CropStringToWidth(FontManager.InGameFont, 540 - 16 - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_by")).X)) End If If s.Length > 2 Then PInfoDescription = s(2).CropStringToWidth(FontManager.InGameFont, 540) @@ -427,12 +427,12 @@ Dim CanvasTexture As Texture2D = TextureManager.GetTexture("GUI\Menus\Menu", New Rectangle(0, 0, 48, 48), "") - Canvas.DrawRectangle(New Rectangle(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName).X / 2) - 32, CInt(Core.windowSize.Height / 2 - 144), CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName).X) + 64, 64), New Color(77, 147, 198, CInt(255 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName, New Vector2(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName).X / 2) + 2, CInt(Core.windowSize.Height / 2 - 128 + 2)), New Color(0, 0, 0, CInt(255 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName, New Vector2(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_contentpacks_name") & ": " & PInfoName).X / 2), CInt(Core.windowSize.Height / 2 - 128)), New Color(255, 255, 255, CInt(255 * _interfaceFade * _pageFade))) + Canvas.DrawRectangle(New Rectangle(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName).X / 2) - 32, CInt(Core.windowSize.Height / 2 - 144), CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName).X) + 64, 64), New Color(77, 147, 198, CInt(255 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName, New Vector2(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName).X / 2) + 2, CInt(Core.windowSize.Height / 2 - 128 + 2)), New Color(0, 0, 0, CInt(255 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName, New Vector2(CInt(windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.Translate("option_screen_contentpacks_name") & ": " & PInfoName).X / 2), CInt(Core.windowSize.Height / 2 - 128)), New Color(255, 255, 255, CInt(255 * _interfaceFade * _pageFade))) Canvas.DrawRectangle(New Rectangle(CInt(windowSize.Width / 2) - 278, CInt(Core.windowSize.Height / 2 - 72), 556, 196), New Color(255, 255, 255, CInt(255 * _interfaceFade * _pageFade))) - SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("option_screen_contentpacks_version") & ": " & PInfoVersion & Environment.NewLine & Localization.GetString("option_screen_contentpacks_by") & ": " & PInfoAuthor & Environment.NewLine & Localization.GetString("option_screen_contentpacks_description") & ": " & Environment.NewLine & PInfoDescription.Replace("
", Environment.NewLine).Replace("~", Environment.NewLine), New Vector2(CInt(windowSize.Width / 2) - 278 + 16, CInt(Core.windowSize.Height / 2 - 64)), New Color(0, 0, 0, CInt(255 * _interfaceFade * _pageFade))) + SpriteBatch.DrawString(FontManager.InGameFont, Localization.Translate("option_screen_contentpacks_version") & ": " & PInfoVersion & Environment.NewLine & Localization.Translate("option_screen_contentpacks_by") & ": " & PInfoAuthor & Environment.NewLine & Localization.Translate("option_screen_contentpacks_description") & ": " & Environment.NewLine & PInfoDescription.Replace("
", Environment.NewLine).Replace("~", Environment.NewLine), New Vector2(CInt(windowSize.Width / 2) - 278 + 16, CInt(Core.windowSize.Height / 2 - 64)), New Color(0, 0, 0, CInt(255 * _interfaceFade * _pageFade))) End Sub Private Sub UpdatePackInformationMenu() @@ -897,102 +897,102 @@ Select Case ScreenIndex Case 0 ' Main Options menu. - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90, Delta_Y + 80), 1, 64, Localization.GetString("option_screen_game", "Game"), AddressOf SwitchToGame, 1)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 310, Delta_Y + 80), 1, 64, Localization.GetString("option_screen_graphics", "Graphics"), AddressOf SwitchToGraphics, 2)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530, Delta_Y + 80), 1, 64, Localization.GetString("option_screen_battle", "Battle"), AddressOf SwitchToBattle, 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 200, Delta_Y + 168), 1, 64, Localization.GetString("option_screen_controls", "Controls"), AddressOf SwitchToControls, 4)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 420, Delta_Y + 168), 1, 64, Localization.GetString("option_screen_audio", "Audio"), AddressOf SwitchToAudio, 5)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90, Delta_Y + 80), 1, 64, Localization.Translate("option_screen_game", "Game"), AddressOf SwitchToGame, 1)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 310, Delta_Y + 80), 1, 64, Localization.Translate("option_screen_graphics", "Graphics"), AddressOf SwitchToGraphics, 2)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530, Delta_Y + 80), 1, 64, Localization.Translate("option_screen_battle", "Battle"), AddressOf SwitchToBattle, 3)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 200, Delta_Y + 168), 1, 64, Localization.Translate("option_screen_controls", "Controls"), AddressOf SwitchToControls, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 420, Delta_Y + 168), 1, 64, Localization.Translate("option_screen_audio", "Audio"), AddressOf SwitchToAudio, 5)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.GetString("global_apply", "Apply"), AddressOf Apply, 6)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 286 + 24, Delta_Y + 336), 2, 48, Localization.GetString("option_screen_resetoptions", "Reset Options"), AddressOf Reset, 7)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, Localization.GetString("global_close", "Close"), AddressOf Close, 8)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.Translate("global_apply", "Apply"), AddressOf Apply, 6)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 286 + 24, Delta_Y + 336), 2, 48, Localization.Translate("option_screen_resetoptions", "Reset Options"), AddressOf Reset, 7)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, Localization.Translate("global_close", "Close"), AddressOf Close, 8)) Case 1 ' "Game" from the Options menu. - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.GetString("option_screen_game_textspeed", "Text Speed"), Me.TextSpeed, 1, 3, AddressOf ChangeTextspeed, 1)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.Translate("option_screen_game_textspeed", "Text Speed"), Me.TextSpeed, 1, 3, AddressOf ChangeTextspeed, 1)) If CBool(GameModeManager.GetGameRuleValue("LockDifficulty", "0")) = False Then Dim d As New Dictionary(Of Integer, String) - d.Add(0, Localization.GetString("option_screen_game_difficulty_easy", "Easy")) - d.Add(1, Localization.GetString("option_screen_game_difficulty_hard", "Hard")) - d.Add(2, Localization.GetString("option_screen_game_difficulty_superhard", "Super Hard")) + d.Add(0, Localization.Translate("option_screen_game_difficulty_easy", "Easy")) + d.Add(1, Localization.Translate("option_screen_game_difficulty_hard", "Hard")) + d.Add(2, Localization.Translate("option_screen_game_difficulty_superhard", "Super Hard")) - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 120), 400, Localization.GetString("option_screen_game_difficulty", "Difficulty"), Me.Difficulty, 0, 2, AddressOf ChangeDifficulty, d, 2)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 120), 400, Localization.Translate("option_screen_game_difficulty", "Difficulty"), Me.Difficulty, 0, 2, AddressOf ChangeDifficulty, d, 2)) End If - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 180), 3, 64, Localization.GetString("option_screen_game_viewbobbing", "View Bobbing"), Me.ViewBobbing, AddressOf ToggleBobbing, {Localization.GetString("global_off", "Off"), Localization.GetString("global_on", "On")}.ToList(), 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 4)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 180), 3, 64, Localization.Translate("option_screen_game_viewbobbing", "View Bobbing"), Me.ViewBobbing, AddressOf ToggleBobbing, {Localization.Translate("global_off", "Off"), Localization.Translate("global_on", "On")}.ToList(), 3)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToMain, 4)) Case 2 ' "Graphics" from the Options menu. - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 40), 400, Localization.GetString("option_screen_graphics_fov", "Field of View"), CInt(Me.FOV), 45, 120, AddressOf ChangeFOV, 1)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 40), 400, Localization.Translate("option_screen_graphics_fov", "Field of View"), CInt(Me.FOV), 45, 120, AddressOf ChangeFOV, 1)) Dim d As New Dictionary(Of Integer, String) - d.Add(0, Localization.GetString("option_screen_graphics_renderdistance_tiny", "Tiny")) - d.Add(1, Localization.GetString("option_screen_graphics_renderdistance_small", "Small")) - d.Add(2, Localization.GetString("option_screen_graphics_renderdistance_normal", "Normal")) - d.Add(3, Localization.GetString("option_screen_graphics_renderdistance_far","Far")) - d.Add(4, Localization.GetString("option_screen_graphics_renderdistance_extreme", "Extreme")) - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 100), 400, Localization.GetString("option_screen_graphics_renderdistance", "Render Distance"), Me.RenderDistance, 0, 4, AddressOf ChangeRenderDistance, d, 2)) + d.Add(0, Localization.Translate("option_screen_graphics_renderdistance_tiny", "Tiny")) + d.Add(1, Localization.Translate("option_screen_graphics_renderdistance_small", "Small")) + d.Add(2, Localization.Translate("option_screen_graphics_renderdistance_normal", "Normal")) + d.Add(3, Localization.Translate("option_screen_graphics_renderdistance_far","Far")) + d.Add(4, Localization.Translate("option_screen_graphics_renderdistance_extreme", "Extreme")) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 100), 400, Localization.Translate("option_screen_graphics_renderdistance", "Render Distance"), Me.RenderDistance, 0, 4, AddressOf ChangeRenderDistance, d, 2)) Dim d1 As New Dictionary(Of Integer, String) d1.Add(0, "Off") - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 160), 400, Localization.GetString("option_screen_graphics_offset_mapquality", "Offset Map Quality"), Me.LoadOffsetMaps, 0, 100, AddressOf ChangeOffsetMaps, d1, 3)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 160), 400, Localization.Translate("option_screen_graphics_offset_mapquality", "Offset Map Quality"), Me.LoadOffsetMaps, 0, 100, AddressOf ChangeOffsetMaps, d1, 3)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 220), 3, 64, Localization.GetString("option_screen_graphics_graphics", "Graphics"), CBool(Me.GraphicStyle), AddressOf ToggleGraphicsStyle, {Localization.GetString("option_screen_graphics_graphics_fast", "Fast"), Localization.GetString("option_screen_graphics_graphics_fancy", "Fancy")}.ToList(), 4)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 300), 3, 64, Localization.GetString("option_screen_graphics_multisampling", "Multi Sampling"), Me.PreferMultiSampling, AddressOf ToggleMultiSampling, {"Off", "On"}.ToList(), 5)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 220), 3, 64, Localization.Translate("option_screen_graphics_graphics", "Graphics"), CBool(Me.GraphicStyle), AddressOf ToggleGraphicsStyle, {Localization.Translate("option_screen_graphics_graphics_fast", "Fast"), Localization.Translate("option_screen_graphics_graphics_fancy", "Fancy")}.ToList(), 4)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 300), 3, 64, Localization.Translate("option_screen_graphics_multisampling", "Multi Sampling"), Me.PreferMultiSampling, AddressOf ToggleMultiSampling, {"Off", "On"}.ToList(), 5)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 6)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToMain, 6)) Case 3 ' "Battle" from the Options menu. - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100 + 20, Delta_Y + 100), 2, 64, Localization.GetString("option_screen_battle_3dmodels", "3D Models"), CBool(ShowModels), AddressOf ToggleShowModels, {Localization.GetString("global_off", "Off"), Localization.GetString("global_on", "On")}.ToList(), 1)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 400 + 20, Delta_Y + 100), 2, 64, Localization.GetString("option_screen_battle_animations", "Animations"), CBool(Me.ShowBattleAnimations), AddressOf ToggleAnimations, {Localization.GetString("global_off", "Off"), Localization.GetString("global_on", "On")}.ToList(), 2)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100 + 20, Delta_Y + 200), 2, 64, Localization.GetString("option_screen_battle_battlestyle", "Battle Style"), CBool(Me.BattleStyle), AddressOf ToggleBattleStyle, {Localization.GetString("option_screen_battle_battlestyle_shift", "Shift"), Localization.GetString("option_screen_battle_battlestyle_set", "Set")}.ToList(), 3)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100 + 20, Delta_Y + 100), 2, 64, Localization.Translate("option_screen_battle_3dmodels", "3D Models"), CBool(ShowModels), AddressOf ToggleShowModels, {Localization.Translate("global_off", "Off"), Localization.Translate("global_on", "On")}.ToList(), 1)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 400 + 20, Delta_Y + 100), 2, 64, Localization.Translate("option_screen_battle_animations", "Animations"), CBool(Me.ShowBattleAnimations), AddressOf ToggleAnimations, {Localization.Translate("global_off", "Off"), Localization.Translate("global_on", "On")}.ToList(), 2)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100 + 20, Delta_Y + 200), 2, 64, Localization.Translate("option_screen_battle_battlestyle", "Battle Style"), CBool(Me.BattleStyle), AddressOf ToggleBattleStyle, {Localization.Translate("option_screen_battle_battlestyle_shift", "Shift"), Localization.Translate("option_screen_battle_battlestyle_set", "Set")}.ToList(), 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToMain, 4)) Case 4 ' "Controls" from the Options menu. If PreScreen.Identification = Identifications.MainMenuScreen Then - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 100), 5, 64, Localization.GetString("option_screen_controls_xboxgamepad", "Xbox Gamepad"), Me.GamePadEnabled, AddressOf ToggleXBOX360Controller, {"Disabled", "Enabled"}.ToList(), 1)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 200), 3, 64, Localization.GetString("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 2)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.GetString("global_apply", "Apply"), AddressOf ControlsApply, 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf Close, 4)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 100), 5, 64, Localization.Translate("option_screen_controls_xboxgamepad", "Xbox Gamepad"), Me.GamePadEnabled, AddressOf ToggleXBOX360Controller, {"Disabled", "Enabled"}.ToList(), 1)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 200), 3, 64, Localization.Translate("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 2)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.Translate("global_apply", "Apply"), AddressOf ControlsApply, 3)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf Close, 4)) Else Dim d As New Dictionary(Of Integer, String) - d.Add(1, Localization.GetString("option_screen_controls_cameraspeed_slow", "...Slow...")) - d.Add(12, Localization.GetString("option_screen_controls_cameraspeed_medium", "Standard")) - d.Add(38, Localization.GetString("option_screen_controls_cameraspeed_fast", "Super fast!")) - d.Add(50, Localization.GetString("option_screen_controls_cameraspeed_fastest", "SPEED OF LIGHT!")) - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.GetString("option_screen_controls_cameraspeed", "Camera Speed"), Me.CameraSpeed, 1, 50, AddressOf ChangeCameraSpeed, d, 1)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 120), 5, 64, Localization.GetString("option_screen_controls_xboxgamepad", "Xbox Gamepad"), Me.GamePadEnabled, AddressOf ToggleXBOX360Controller, {"Disabled", "Enabled"}.ToList(), 2)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 200), 5, 64, Localization.GetString("option_screen_controls_running", "Running"), Me.RunMode, AddressOf ToggleRunningToggle, {"Hold", "Toggle"}.ToList(), 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 280), 3, 64, Localization.GetString("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 4)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 5)) + d.Add(1, Localization.Translate("option_screen_controls_cameraspeed_slow", "...Slow...")) + d.Add(12, Localization.Translate("option_screen_controls_cameraspeed_medium", "Standard")) + d.Add(38, Localization.Translate("option_screen_controls_cameraspeed_fast", "Super fast!")) + d.Add(50, Localization.Translate("option_screen_controls_cameraspeed_fastest", "SPEED OF LIGHT!")) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.Translate("option_screen_controls_cameraspeed", "Camera Speed"), Me.CameraSpeed, 1, 50, AddressOf ChangeCameraSpeed, d, 1)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 120), 5, 64, Localization.Translate("option_screen_controls_xboxgamepad", "Xbox Gamepad"), Me.GamePadEnabled, AddressOf ToggleXBOX360Controller, {"Disabled", "Enabled"}.ToList(), 2)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 200), 5, 64, Localization.Translate("option_screen_controls_running", "Running"), Me.RunMode, AddressOf ToggleRunningToggle, {"Hold", "Toggle"}.ToList(), 3)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 280), 3, 64, Localization.Translate("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToMain, 5)) End If Case 5 ' "Audio" from the Options menu. - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.GetString("option_screen_audio_volume_music", "Music Volume"), Me.Music, 0, 100, AddressOf ChangeMusicVolume, 1)) - Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 120), 400, Localization.GetString("option_screen_audio_volume_sfx", "SoundFX Volume"), Me.Sound, 0, 100, AddressOf ChangeSoundVolume, 2)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 200), 1, 64, Localization.GetString("option_screen_audio_muted", "Muted"), CBool(Me.Muted), AddressOf ToggleMute, {"No", "Yes"}.ToList(), 3)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.Translate("option_screen_audio_volume_music", "Music Volume"), Me.Music, 0, 100, AddressOf ChangeMusicVolume, 1)) + Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 120), 400, Localization.Translate("option_screen_audio_volume_sfx", "SoundFX Volume"), Me.Sound, 0, 100, AddressOf ChangeSoundVolume, 2)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 200), 1, 64, Localization.Translate("option_screen_audio_muted", "Muted"), CBool(Me.Muted), AddressOf ToggleMute, {"No", "Yes"}.ToList(), 3)) If PreScreen.Identification = Identifications.MainMenuScreen Then - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_apply", "Apply"), AddressOf AudioApply, 4)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf Close, 5)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_apply", "Apply"), AddressOf AudioApply, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf Close, 5)) Else - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToMain, 4)) End If Case 6 ' "Language" from the Options menu. - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.GetString("global_apply", "Apply"), AddressOf LanguageApply, 1)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf Close, 2)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 1, 48, Localization.Translate("global_apply", "Apply"), AddressOf LanguageApply, 1)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf Close, 2)) Case 7 ' "ContentPacks" from the Options menu. - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 64), 2, 48, Localization.GetString("option_screen_contentpacks_up"), AddressOf ButtonUp, 1)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 120), 2, 48, Localization.GetString("option_screen_contentpacks_down"), AddressOf ButtonDown, 2)) - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 604, Delta_Y + 176), 2, 48, "", isSelectedEnabled, AddressOf PackEnabledToggle, {Localization.GetString("global_enable"), Localization.GetString("global_disable")}.ToList(), 3)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 232), 2, 48, Localization.GetString("option_screen_contentpacks_information"), AddressOf SwitchToPackInformation, 4)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 64), 2, 48, Localization.Translate("option_screen_contentpacks_up"), AddressOf ButtonUp, 1)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 120), 2, 48, Localization.Translate("option_screen_contentpacks_down"), AddressOf ButtonDown, 2)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 604, Delta_Y + 176), 2, 48, "", isSelectedEnabled, AddressOf PackEnabledToggle, {Localization.Translate("global_enable"), Localization.Translate("global_disable")}.ToList(), 3)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 604, Delta_Y + 232), 2, 48, Localization.Translate("option_screen_contentpacks_information"), AddressOf SwitchToPackInformation, 4)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_apply", "Apply"), AddressOf PacksApply, 5)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 310 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf Close, 6)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_apply", "Apply"), AddressOf PacksApply, 5)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 310 + 24, Delta_Y + 327), 1, 48, Localization.Translate("global_back", "Back"), AddressOf Close, 6)) Case 8 ' "Information" from the ContentPacks menu. - Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 2, 48, Localization.GetString("global_enabled"), isSelectedEnabled, AddressOf PackEnabledToggle, {Localization.GetString("global_no"), Localization.GetString("global_yes")}.ToList(), 1)) - Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToContentPacks, 2)) + Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 90 + 24, Delta_Y + 336), 2, 48, Localization.Translate("global_enabled"), isSelectedEnabled, AddressOf PackEnabledToggle, {Localization.Translate("global_no"), Localization.Translate("global_yes")}.ToList(), 1)) + Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, Localization.Translate("global_back", "Back"), AddressOf SwitchToContentPacks, 2)) End Select If ScreenIndex <> 7 Then @@ -1178,11 +1178,6 @@ ButtonPackInformation() End Sub - Private Sub SwitchToLanguage() - Me._nextIndex = 7 - Me._pageClosing = True - End Sub - #End Region #Region "SettingsGraphics" diff --git a/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb b/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb index 2aa798b9b..df27e8ec0 100644 --- a/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb +++ b/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb @@ -12,7 +12,7 @@ Select Case command.ToLower() Case "token" - Dim tokenName As String = Localization.GetString(argument) + Dim tokenName As String = Localization.Translate(argument) Return tokenName Case "button" Dim key As Keys = Nothing