diff options
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; } |