11 enum ANIMATION_PROCESS { ANIM_PROCESS_NONE = 0, ANIM_PROCESS_NORMAL, ANIM_PROCESS_REVERSE };
12 enum ANIMATION_STATE { ANIM_STATE_NONE = 0, ANIM_STATE_DELAYED, ANIM_STATE_IN_PROCESS, ANIM_STATE_APPLIED };
20 #include "interfaces/info/InfoBool.h" 21 #include "utils/ColorUtils.h" 22 #include "utils/Geometry.h" 23 #include "utils/TransformMatrix.h" 31 ANIM_TYPE_UNFOCUS = -3,
33 ANIM_TYPE_WINDOW_CLOSE,
35 ANIM_TYPE_WINDOW_OPEN,
48 EFFECT_TYPE_FADE_DIFFUSE,
56 CAnimEffect(
const TiXmlElement *node, EFFECT_TYPE effect);
57 CAnimEffect(
unsigned int delay,
unsigned int length, EFFECT_TYPE effect);
63 void Calculate(
unsigned int time,
const CPoint ¢er);
64 void ApplyState(ANIMATION_STATE state,
const CPoint ¢er);
66 unsigned int GetDelay()
const {
return m_delay; }
67 unsigned int GetLength()
const {
return m_delay + m_length; }
69 EFFECT_TYPE GetType()
const {
return m_effect; }
71 static std::shared_ptr<Tweener> GetTweener(
const TiXmlElement *pAnimationNode);
77 virtual void ApplyEffect(
float offset,
const CPoint ¢er)=0;
80 unsigned int m_length;
83 std::shared_ptr<Tweener> m_pTweener;
89 CFadeEffect(
const TiXmlElement* node,
bool reverseDefaults, EFFECT_TYPE effect);
90 CFadeEffect(
float start,
float end,
unsigned int delay,
unsigned int length);
92 UTILS::COLOR::Color end,
97 void ApplyEffect(
float offset,
const CPoint ¢er)
override;
111 void ApplyEffect(
float offset,
const CPoint ¢er)
override;
125 void ApplyEffect(
float offset,
const CPoint ¢er)
override;
140 void ApplyEffect(
float offset,
const CPoint ¢er)
override;
161 static CAnimation CreateFader(
float start,
float end,
unsigned int delay,
unsigned int length, ANIMATION_TYPE type = ANIM_TYPE_NONE);
163 void Create(
const TiXmlElement *node,
const CRect &rect,
int context);
165 void Animate(
unsigned int time,
bool startAnim);
166 void ResetAnimation();
167 void ApplyAnimation();
170 RenderAnimation(matrix,
CPoint());
173 void QueueAnimation(ANIMATION_PROCESS process);
175 inline bool IsReversible()
const {
return m_reversible; }
176 inline ANIMATION_TYPE GetType()
const {
return m_type; }
177 inline ANIMATION_STATE GetState()
const {
return m_currentState; }
178 inline ANIMATION_PROCESS GetProcess()
const {
return m_currentProcess; }
179 inline ANIMATION_PROCESS GetQueuedProcess()
const {
return m_queuedProcess; }
181 bool CheckCondition();
183 void SetInitialCondition();
186 void Calculate(
const CPoint &point);
187 void AddEffect(
const std::string &type,
const TiXmlElement *node,
const CRect &rect);
189 enum ANIM_REPEAT { ANIM_REPEAT_NONE = 0, ANIM_REPEAT_PULSE, ANIM_REPEAT_LOOP };
192 ANIMATION_TYPE m_type;
194 INFO::InfoPtr m_condition;
197 ANIM_REPEAT m_repeatAnim;
198 bool m_lastCondition;
201 ANIMATION_PROCESS m_queuedProcess;
202 ANIMATION_PROCESS m_currentProcess;
203 ANIMATION_STATE m_currentState;
206 unsigned int m_start;
207 unsigned int m_length;
208 unsigned int m_delay;
209 unsigned int m_amount;
211 std::vector<CAnimEffect *> m_effects;
224 CScroller(
unsigned int duration = 200, std::shared_ptr<Tweener> tweener = std::shared_ptr<Tweener>());
233 void ScrollTo(
float endPos);
244 bool Update(
unsigned int time);
250 void SetValue(
float scrollValue) { m_scrollValue = scrollValue; }
252 bool IsScrolling()
const {
return m_delta != 0; }
253 bool IsScrollingUp()
const {
return m_delta < 0; }
254 bool IsScrollingDown()
const {
return m_delta > 0; }
256 unsigned int GetDuration()
const {
return m_duration; }
259 float Tween(
float progress);
263 float m_startPosition;
264 bool m_hasResumePoint;
265 unsigned int m_startTime;
267 unsigned int m_duration;
268 std::shared_ptr<Tweener> m_pTweener;
Definition: GUIListItem.h:30
Definition: VisibleEffect.h:151
Definition: VisibleEffect.h:41
Definition: ColorUtils.h:59
Definition: VisibleEffect.h:119
Definition: VisibleEffect.h:134
Definition: VisibleEffect.h:86
Definition: VisibleEffect.h:105