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); | ||||
m_AlphaMin = msgData.inWorld ? MIN_ALPHA_ALWAYS_VISIBLE : MIN_ALPHA_UNSELECTED; | if (msgData.inWorld && !m_Selected) | ||||
m_Color.a = m_AlphaMin; | m_Color.a = m_AlphaMin = MIN_ALPHA_ALWAYS_VISIBLE; | ||||
} | else if (!msgData.inWorld) | ||||
m_Color.a = m_AlphaMin = MIN_ALPHA_UNSELECTED; | |||||
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