From bd4c95c28d664808d58f97eadb0e7cc757ae16e8 Mon Sep 17 00:00:00 2001 From: Matheus Cardoso Date: Fri, 4 Jan 2019 11:48:51 -0300 Subject: [PATCH] Fetch main menu strings from game data (#63) --- OpenDiablo2.Scenes/MainMenu.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenDiablo2.Scenes/MainMenu.cs b/OpenDiablo2.Scenes/MainMenu.cs index f7a38a2d..9d417c8f 100644 --- a/OpenDiablo2.Scenes/MainMenu.cs +++ b/OpenDiablo2.Scenes/MainMenu.cs @@ -39,6 +39,7 @@ namespace OpenDiablo2.Scenes public MainMenu( IRenderWindow renderWindow, ISceneManager sceneManager, + ITextDictionary textDictionary, IResourceManager resourceManager, ISoundProvider soundProvider, IMPQProvider mpqProvider, @@ -57,7 +58,7 @@ namespace OpenDiablo2.Scenes diabloLogoRightBlack = renderWindow.LoadSprite(ResourcePaths.Diablo2LogoBlackRight, Palettes.Units, new Point(400, 120)); btnSinglePlayer = createButton(eButtonType.Wide); - btnSinglePlayer.Text = "Single Player".ToUpper(); + btnSinglePlayer.Text = textDictionary.Translate("strStartMenu1"); btnSinglePlayer.Location = new Point(264, 290); btnSinglePlayer.OnActivate = OnSinglePlayerClicked; @@ -67,12 +68,12 @@ namespace OpenDiablo2.Scenes btnWebsite.OnActivate = OnVisitWebsiteClicked; btnExit = createButton(eButtonType.Wide); - btnExit.Text = "Exit Diablo II".ToUpper(); + btnExit.Text = textDictionary.Translate("strexitentiregame"); btnExit.Location = new Point(264, 500); btnExit.OnActivate = OnExitClicked; btnCredits = createButton(eButtonType.Short); - btnCredits.Text = "Credits".ToUpper(); /* TODO: We apparently need a 'half font' option... */ + btnCredits.Text = textDictionary.Translate("strGameCredits"); /* TODO: We apparently need a 'half font' option... */ btnCredits.Location = new Point(264, 470); btnCredits.OnActivate = OnCreditsClicked;