4 * Created on: Oct 7, 2012
8 #ifndef GRAPHICS_COLORFADE_H_
9 #define GRAPHICS_COLORFADE_H_
11 #include "../app/State.h"
12 #include "../app/Timer.h"
22 ColorFade(app::State *slave, Uint32 color, int duration, bool in = false, bool interactive = false);
23 virtual ~ColorFade() { }
26 void SetLeadInTime(int ms) { leadIn = ms; if (ms > 0) leadInDone = false; }
27 void SetLeadOutTime(int ms) { leadOut = ms; }
30 virtual void HandleEvents(const app::Input &);
31 virtual void UpdateWorld(float deltaT);
32 virtual void Render(SDL_Surface *);
35 virtual void OnEnterState(SDL_Surface *screen);
36 virtual void OnExitState(SDL_Surface *screen);
37 virtual void OnResumeState(SDL_Surface *screen);
38 virtual void OnPauseState(SDL_Surface *screen);
40 virtual void OnResize(int width, int height);
43 void UpdateBlinds(int width, int height);
44 Uint8 GetAlpha() const;
47 app::Timer<Uint32> timer;
63 #endif /* GRAPHICS_COLORFADE_H_ */