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 EnterState(app::Application &ctrl, SDL_Surface *screen);
31 virtual void ExitState(app::Application &ctrl, SDL_Surface *screen);
32 virtual void ResumeState(app::Application &ctrl, SDL_Surface *screen);
33 virtual void PauseState(app::Application &ctrl, SDL_Surface *screen);
35 virtual void Resize(int width, int height);
37 virtual void HandleEvents(const app::Input &);
38 virtual void UpdateWorld(float deltaT);
39 virtual void Render(SDL_Surface *);
42 void UpdateBlinds(int width, int height);
43 Uint8 GetAlpha() const;
46 app::Timer<Uint32> timer;
47 app::Application *ctrl;
63 #endif /* GRAPHICS_COLORFADE_H_ */