1 #ifndef GRAPHICS_COLORFADE_H_
2 #define GRAPHICS_COLORFADE_H_
4 #include "../app/State.h"
5 #include "../app/Timer.h"
15 ColorFade(app::State *slave, Uint32 color, int duration, bool in = false, bool interactive = false);
16 virtual ~ColorFade() { }
19 void SetLeadInTime(int ms) { leadIn = ms; if (ms > 0) leadInDone = false; }
20 void SetLeadOutTime(int ms) { leadOut = ms; }
23 virtual void HandleEvents(const app::Input &);
24 virtual void UpdateWorld(float deltaT);
25 virtual void Render(SDL_Surface *);
28 virtual void OnEnterState(SDL_Surface *screen);
29 virtual void OnExitState(SDL_Surface *screen);
30 virtual void OnResumeState(SDL_Surface *screen);
31 virtual void OnPauseState(SDL_Surface *screen);
33 virtual void OnResize(int width, int height);
36 void UpdateBlinds(int width, int height);
37 Uint8 GetAlpha() const;
40 app::Timer<Uint32> timer;
56 #endif /* GRAPHICS_COLORFADE_H_ */