ES-DE/src/components/GuiAnimation.h

34 lines
535 B
C
Raw Normal View History

2012-10-17 17:15:58 +00:00
#ifndef _GUIANIMATION_H_
#define _GUIANIMATION_H_
2013-04-08 16:52:40 +00:00
#include "../Gui.h"
#include "GuiImage.h"
#include <vector>
2012-10-17 17:15:58 +00:00
2013-04-08 16:52:40 +00:00
class GuiAnimation
2012-10-17 17:15:58 +00:00
{
public:
GuiAnimation();
void move(int x, int y, int speed);
void fadeIn(int time);
void fadeOut(int time);
2013-04-08 16:52:40 +00:00
void update(int deltaTime);
void addChild(GuiImage* gui);
2012-10-17 17:15:58 +00:00
private:
2013-04-08 16:52:40 +00:00
unsigned char mOpacity;
std::vector<GuiImage*> mChildren;
2012-10-17 17:15:58 +00:00
void moveChildren(int offsetx, int offsety);
void setChildrenOpacity(unsigned char opacity);
int mFadeRate;
int mMoveX, mMoveY, mMoveSpeed;
};
#endif