Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpSelectable.cpp
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | private: | ||||
float m_FadeBaselineAlpha; | float m_FadeBaselineAlpha; | ||||
/// Delta between target and baseline alpha. Constant during a single fade. Can be positive or negative. | /// Delta between target and baseline alpha. Constant during a single fade. Can be positive or negative. | ||||
float m_FadeDeltaAlpha; | float m_FadeDeltaAlpha; | ||||
/// Linear time progress of the fade, between 0 and m_FadeDuration. | /// Linear time progress of the fade, between 0 and m_FadeDuration. | ||||
float m_FadeProgress; | float m_FadeProgress; | ||||
/// Total duration of a single fade, in seconds. Assumed constant for now; feel free to change this into | /// Total duration of a single fade, in seconds. Assumed constant for now; feel free to change this into | ||||
/// a member variable if you need to adjust it per component. | /// a member variable if you need to adjust it per component. | ||||
static const double FADE_DURATION; | static const float FADE_DURATION; | ||||
static const char* TEXTUREBASEPATH; | static const char* TEXTUREBASEPATH; | ||||
}; | }; | ||||
const double CCmpSelectable::FADE_DURATION = 0.3; | const float CCmpSelectable::FADE_DURATION = 0.3f; | ||||
const char* CCmpSelectable::TEXTUREBASEPATH = "art/textures/selection/"; | const char* CCmpSelectable::TEXTUREBASEPATH = "art/textures/selection/"; | ||||
void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global)) | void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global)) | ||||
{ | { | ||||
switch (msg.GetType()) | switch (msg.GetType()) | ||||
{ | { | ||||
case MT_Interpolate: | case MT_Interpolate: | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 331 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator