From 8765d58b02c9afd00186bae4a0045dff32f7d102 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 26 May 2013 17:47:54 +0200 Subject: Fixed code formatting * moved braces to new lines * fixed some function/variable names * fixed whitespace issues --- src/ui/mainmap.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/ui/mainmap.cpp') diff --git a/src/ui/mainmap.cpp b/src/ui/mainmap.cpp index 1143a77..8c81160 100644 --- a/src/ui/mainmap.cpp +++ b/src/ui/mainmap.cpp @@ -55,7 +55,8 @@ void CMainMap::CreateMap() Math::Point pos, dim; pw = static_cast(m_interface->SearchControl(EVENT_WINDOW1)); - if (pw == nullptr) { + if (pw == nullptr) + { pos.x = 0.0f; pos.y = 0.0f; dim.x = 0.0f; @@ -106,7 +107,8 @@ void CMainMap::FloorColorMap(Gfx::Color floor, Gfx::Color water) return; pm = static_cast(pw->SearchControl(EVENT_OBJECT_MAP)); - if (pm != nullptr) { + if (pm != nullptr) + { pm->SetFloorColor(floor); pm->SetWaterColor(water); } @@ -124,9 +126,12 @@ void CMainMap::ShowMap(bool bShow) if (pw == nullptr) return; - if (bShow) { + if (bShow) + { DimMap(); - } else { + } + else + { pm = static_cast(pw->SearchControl(EVENT_OBJECT_MAP)); if (pm != nullptr) pm->ClearState(STATE_VISIBLE); @@ -164,7 +169,8 @@ void CMainMap::DimMap() pm->SetDim(dim); ps = static_cast(pw->SearchControl(EVENT_OBJECT_MAPZOOM)); - if (ps != nullptr) { + if (ps != nullptr) + { ps->SetState(STATE_VISIBLE, (m_mapMode != 0)); dim.x = SCROLL_WIDTH; @@ -392,3 +398,4 @@ void CMainMap::SetHighlight(CObject* pObj) } + -- cgit v1.2.3-1-g7c22