From 0da933a0146a0689546b21231e14f2dfc2bc14e8 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 23 Feb 2022 23:36:37 +0100 Subject: Switched to use ContentBundle's GetText --- Stars45/CmpSelectDlg.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'Stars45/CmpSelectDlg.cpp') diff --git a/Stars45/CmpSelectDlg.cpp b/Stars45/CmpSelectDlg.cpp index 47ce573..4e21257 100644 --- a/Stars45/CmpSelectDlg.cpp +++ b/Stars45/CmpSelectDlg.cpp @@ -23,6 +23,7 @@ #include "Player.h" #include "Game.h" +#include "ContentBundle.h" #include "DataLoader.h" #include "Button.h" #include "ListBox.h" @@ -54,7 +55,7 @@ selected_mission(-1), show_saved(false), loading(false), loaded(false), hproc(0) { stars = Starshatter::GetInstance(); - select_msg = Game::GetInstance()->GetText("CmpSelectDlg.select_msg"); + select_msg = ContentBundle::GetInstance()->GetText("CmpSelectDlg.select_msg"); Init(def); } @@ -139,7 +140,7 @@ CmpSelectDlg::ExecFrame() campaign->Name() + Text("\n\n") + Text("") + - Game::GetInstance()->GetText("CmpSelectDlg.scenario") + + ContentBundle::GetInstance()->GetText("CmpSelectDlg.scenario") + Text("\n\t") + campaign->Description()); } @@ -156,15 +157,15 @@ CmpSelectDlg::ExecFrame() campaign->Name() + Text("\n\n") + Text("") + - Game::GetInstance()->GetText("CmpSelectDlg.scenario") + + ContentBundle::GetInstance()->GetText("CmpSelectDlg.scenario") + Text("\n\t") + campaign->Description() + Text("\n\n") + - Game::GetInstance()->GetText("CmpSelectDlg.campaign-time") + + ContentBundle::GetInstance()->GetText("CmpSelectDlg.campaign-time") + Text("\n\t") + time_buf + Text("\n\n") + - Game::GetInstance()->GetText("CmpSelectDlg.assignment") + + ContentBundle::GetInstance()->GetText("CmpSelectDlg.assignment") + Text("\n\t"); if (campaign->GetPlayerGroup()) @@ -173,7 +174,7 @@ CmpSelectDlg::ExecFrame() desc += "n/a"; desc += Text("\n\n") + - Game::GetInstance()->GetText("CmpSelectDlg.team-score") + + ContentBundle::GetInstance()->GetText("CmpSelectDlg.team-score") + Text("\n\t") + score_buf; @@ -208,7 +209,7 @@ CmpSelectDlg::ShowNewCampaigns() AutoThreadSync a(sync); if (loading && description) { - description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); + description->SetText(ContentBundle::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -285,7 +286,7 @@ CmpSelectDlg::ShowSavedCampaigns() AutoThreadSync a(sync); if (loading && description) { - description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); + description->SetText(ContentBundle::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -334,7 +335,7 @@ CmpSelectDlg::OnCampaignSelect(AWEvent* event) AutoThreadSync a(sync); if (loading) { - description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); + description->SetText(ContentBundle::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -455,9 +456,9 @@ CmpSelectDlg::OnDelete(AWEvent* event) ConfirmDlg* confirm = manager->GetConfirmDlg(); if (confirm) { char msg[256]; - sprintf_s(msg, Game::GetInstance()->GetText("CmpSelectDlg.are-you-sure"), load_file.data()); + sprintf_s(msg, ContentBundle::GetInstance()->GetText("CmpSelectDlg.are-you-sure"), load_file.data()); confirm->SetMessage(msg); - confirm->SetTitle(Game::GetInstance()->GetText("CmpSelectDlg.confirm")); + confirm->SetTitle(ContentBundle::GetInstance()->GetText("CmpSelectDlg.confirm")); manager->ShowConfirmDlg(); } @@ -533,7 +534,7 @@ CmpSelectDlg::StartLoadProc() loaded = false; if (description) - description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.loading")); + description->SetText(ContentBundle::GetInstance()->GetText("CmpSelectDlg.loading")); DWORD thread_id = 0; hproc = CreateThread(0, 4096, CmpSelectDlgLoadProc, (LPVOID) this, 0, &thread_id); -- cgit v1.1