From 0052edae47d1e6ae613497c524719eff5838f52a Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 18 Feb 2022 23:54:30 +0100 Subject: Switched to use GetIntance for Game instead of static methods --- Stars45/CmpSelectDlg.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'Stars45/CmpSelectDlg.cpp') diff --git a/Stars45/CmpSelectDlg.cpp b/Stars45/CmpSelectDlg.cpp index 9f24c02..47ce573 100644 --- a/Stars45/CmpSelectDlg.cpp +++ b/Stars45/CmpSelectDlg.cpp @@ -54,7 +54,7 @@ selected_mission(-1), show_saved(false), loading(false), loaded(false), hproc(0) { stars = Starshatter::GetInstance(); - select_msg = Game::GetText("CmpSelectDlg.select_msg"); + select_msg = Game::GetInstance()->GetText("CmpSelectDlg.select_msg"); Init(def); } @@ -139,7 +139,7 @@ CmpSelectDlg::ExecFrame() campaign->Name() + Text("\n\n") + Text("") + - Game::GetText("CmpSelectDlg.scenario") + + Game::GetInstance()->GetText("CmpSelectDlg.scenario") + Text("\n\t") + campaign->Description()); } @@ -156,15 +156,15 @@ CmpSelectDlg::ExecFrame() campaign->Name() + Text("\n\n") + Text("") + - Game::GetText("CmpSelectDlg.scenario") + + Game::GetInstance()->GetText("CmpSelectDlg.scenario") + Text("\n\t") + campaign->Description() + Text("\n\n") + - Game::GetText("CmpSelectDlg.campaign-time") + + Game::GetInstance()->GetText("CmpSelectDlg.campaign-time") + Text("\n\t") + time_buf + Text("\n\n") + - Game::GetText("CmpSelectDlg.assignment") + + Game::GetInstance()->GetText("CmpSelectDlg.assignment") + Text("\n\t"); if (campaign->GetPlayerGroup()) @@ -173,7 +173,7 @@ CmpSelectDlg::ExecFrame() desc += "n/a"; desc += Text("\n\n") + - Game::GetText("CmpSelectDlg.team-score") + + Game::GetInstance()->GetText("CmpSelectDlg.team-score") + Text("\n\t") + score_buf; @@ -208,7 +208,7 @@ CmpSelectDlg::ShowNewCampaigns() AutoThreadSync a(sync); if (loading && description) { - description->SetText(Game::GetText("CmpSelectDlg.already-loading")); + description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -285,7 +285,7 @@ CmpSelectDlg::ShowSavedCampaigns() AutoThreadSync a(sync); if (loading && description) { - description->SetText(Game::GetText("CmpSelectDlg.already-loading")); + description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -334,7 +334,7 @@ CmpSelectDlg::OnCampaignSelect(AWEvent* event) AutoThreadSync a(sync); if (loading) { - description->SetText(Game::GetText("CmpSelectDlg.already-loading")); + description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.already-loading")); Button::PlaySound(Button::SND_REJECT); return; } @@ -455,9 +455,9 @@ CmpSelectDlg::OnDelete(AWEvent* event) ConfirmDlg* confirm = manager->GetConfirmDlg(); if (confirm) { char msg[256]; - sprintf_s(msg, Game::GetText("CmpSelectDlg.are-you-sure"), load_file.data()); + sprintf_s(msg, Game::GetInstance()->GetText("CmpSelectDlg.are-you-sure"), load_file.data()); confirm->SetMessage(msg); - confirm->SetTitle(Game::GetText("CmpSelectDlg.confirm")); + confirm->SetTitle(Game::GetInstance()->GetText("CmpSelectDlg.confirm")); manager->ShowConfirmDlg(); } @@ -495,7 +495,7 @@ CmpSelectDlg::OnAccept(AWEvent* event) if (btn_new->GetButtonState()) Campaign::GetCampaign()->Load(); else - Game::ResetGameTime(); + Game::GetInstance()->ResetGameTime(); Mouse::Show(false); stars->SetGameMode(Starshatter::CLOD_MODE); @@ -533,7 +533,7 @@ CmpSelectDlg::StartLoadProc() loaded = false; if (description) - description->SetText(Game::GetText("CmpSelectDlg.loading")); + description->SetText(Game::GetInstance()->GetText("CmpSelectDlg.loading")); DWORD thread_id = 0; hproc = CreateThread(0, 4096, CmpSelectDlgLoadProc, (LPVOID) this, 0, &thread_id); -- cgit v1.1