diff options
author | Aki <please@ignore.pl> | 2021-10-03 16:51:12 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2021-10-03 16:51:12 +0200 |
commit | 104248aabf40b692231fccd1adf1a2a494f1589a (patch) | |
tree | 5eee42a18a9688b03b483aff5c2bedffb4fe8a6c /Stars45/MapView.cpp | |
parent | ddd76aa4e1571c8d5965709db5c3cd47a89c9a38 (diff) | |
parent | d2f333bf998691760b8970c2784756d0fa81e820 (diff) | |
download | starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.zip starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.gz starshatter-104248aabf40b692231fccd1adf1a2a494f1589a.tar.bz2 |
Stars45 can now be built under MSYS2/Mingw32
Diffstat (limited to 'Stars45/MapView.cpp')
-rw-r--r-- | Stars45/MapView.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Stars45/MapView.cpp b/Stars45/MapView.cpp index 7c51089..de7c567 100644 --- a/Stars45/MapView.cpp +++ b/Stars45/MapView.cpp @@ -1911,7 +1911,8 @@ MapView::DrawSystem() sprintf_s(resolution, "%s: %s", Game::GetText("MapView.info.Resolution").data(), r_txt); active_window->SetFont(font); - active_window->DrawText(resolution, -1, Rect(4, 4, rect.w-8, 24), DT_SINGLELINE|DT_RIGHT); + Rect text_rect(4, 4, rect.w - 8, 24); + active_window->DrawText(resolution, -1, text_rect, DT_SINGLELINE|DT_RIGHT); } // +--------------------------------------------------------------------+ @@ -2084,7 +2085,8 @@ MapView::DrawRegion() sprintf_s(resolution, "%s: %s", Game::GetText("MapView.info.Resolution").data(), r_txt); active_window->SetFont(font); - active_window->DrawText(resolution, -1, Rect(4, 4, rect.w-8, 24), DT_SINGLELINE|DT_RIGHT); + Rect text_rect(4, 4, rect.w - 8, 24); + active_window->DrawText(resolution, -1, text_rect, DT_SINGLELINE|DT_RIGHT); } // +--------------------------------------------------------------------+ @@ -2822,12 +2824,14 @@ MapView::DrawCombatGroupSystem(CombatGroup* group, Orbital* rgn, int x1, int x2, case CombatGroup::CARRIER_GROUP: case CombatGroup::BATTLE_GROUP: case CombatGroup::DESTROYER_SQUADRON: + { sprintf_s(txt, "%s '%s'", group->GetShortDescription(), group->Name().data()); active_window->SetFont(font); - active_window->DrawText(txt, 0, Rect(x1, y, x2-x1, 12), a); + Rect text_rect(x1, y, x2 - x1, 12); + active_window->DrawText(txt, 0, text_rect, a); y += 10; break; - + } case CombatGroup::BATTALION: case CombatGroup::STATION: case CombatGroup::STARBASE: @@ -2835,12 +2839,13 @@ MapView::DrawCombatGroupSystem(CombatGroup* group, Orbital* rgn, int x1, int x2, case CombatGroup::MINEFIELD: case CombatGroup::BATTERY: case CombatGroup::MISSILE: - + { active_window->SetFont(font); - active_window->DrawText(group->GetShortDescription(), 0, Rect(x1, y, x2-x1, 12), a); + Rect text_rect(x1, y, x2 - x1, 12); + active_window->DrawText(group->GetShortDescription(), 0, text_rect, a); y += 10; break; - + } default: break; } |