Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/CCmpSelectable.cpp
Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | case MT_OwnershipChanged: | ||||
CColor color = cmpPlayer->GetColor(); | CColor color = cmpPlayer->GetColor(); | ||||
SetSelectionHighlight(CColor(color.r, color.g, color.b, m_FadeBaselineAlpha + m_FadeDeltaAlpha), m_Selected); | SetSelectionHighlight(CColor(color.r, color.g, color.b, m_FadeBaselineAlpha + m_FadeDeltaAlpha), m_Selected); | ||||
InvalidateStaticOverlay(); | InvalidateStaticOverlay(); | ||||
break; | break; | ||||
} | } | ||||
case MT_PositionChanged: | case MT_PositionChanged: | ||||
{ | { | ||||
if (!m_AlwaysVisible) | if (m_AlwaysVisible) | ||||
break; | { | ||||
const CMessagePositionChanged& msgData = static_cast<const CMessagePositionChanged&> (msg); | const CMessagePositionChanged& msgData = static_cast<const CMessagePositionChanged&> (msg); | ||||
if (msgData.inWorld && !m_Selected) | if (!msgData.inWorld) | ||||
m_Color.a = m_AlphaMin = MIN_ALPHA_ALWAYS_VISIBLE; | |||||
else if (!msgData.inWorld) | |||||
m_Color.a = m_AlphaMin = MIN_ALPHA_UNSELECTED; | m_Color.a = m_AlphaMin = MIN_ALPHA_UNSELECTED; | ||||
else if (!m_Selected) | |||||
m_Color.a = m_AlphaMin = MIN_ALPHA_ALWAYS_VISIBLE; | |||||
} | |||||
InvalidateStaticOverlay(); | InvalidateStaticOverlay(); | ||||
break; | break; | ||||
} | } | ||||
case MT_TerrainChanged: | case MT_TerrainChanged: | ||||
case MT_WaterChanged: | case MT_WaterChanged: | ||||
InvalidateStaticOverlay(); | InvalidateStaticOverlay(); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 313 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator