26 #ifndef _TGUI_ANIMATED_BUTTON_INCLUDED_
27 #define _TGUI_ANIMATED_BUTTON_INCLUDED_
46 AnimatedButton(
const AnimatedButton& copy);
52 virtual ~AnimatedButton();
58 AnimatedButton& operator= (
const AnimatedButton& right);
64 virtual void initialize();
70 virtual AnimatedButton* clone();
88 virtual bool load(
const std::string& pathname);
100 virtual void setSize(
float width,
float height);
106 virtual Vector2u getSize()
const;
112 virtual Vector2f getScaledSize()
const;
120 virtual std::string getLoadedPathname()
const;
126 virtual void setText(
const sf::String& text);
132 virtual sf::String getText()
const;
141 virtual void setTextFont(
const sf::Font& font);
147 virtual const sf::Font* getTextFont();
153 virtual void setTextColor(
const sf::Color& color);
159 virtual const sf::Color& getTextColor()
const;
167 virtual void setTextSize(
unsigned int size);
173 virtual unsigned int getTextSize()
const;
182 virtual void setFrame(
unsigned int frame);
189 virtual bool mouseOnObject(
float x,
float y);
190 virtual void leftMousePressed(
float x,
float y);
191 virtual void leftMouseReleased(
float x,
float y);
192 virtual void mouseMoved(
float x,
float y);
193 virtual void keyPressed(sf::Keyboard::Key key);
194 virtual void objectFocused();
195 virtual void mouseNotOnObject();
196 virtual void mouseNoLongerDown();
205 virtual unsigned int getLoadingID(
const std::string& property);
211 virtual void update();
218 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
228 std::vector<sf::Texture*> m_TexturesNormal;
229 std::vector<sf::Texture*> m_TexturesMouseHover;
230 std::vector<sf::Texture*> m_TexturesMouseDown;
231 std::vector<sf::Texture*> m_TexturesFocused;
234 std::vector<sf::Sprite> m_SpritesNormal;
235 std::vector<sf::Sprite> m_SpritesMouseHover;
236 std::vector<sf::Sprite> m_SpritesMouseDown;
237 std::vector<sf::Sprite> m_SpritesFocused;
240 std::vector<int> m_DurationsNormal;
241 std::vector<int> m_DurationsMouseHover;
242 std::vector<int> m_DurationsMouseDown;
243 std::vector<int> m_DurationsFocused;
246 std::string m_LoadedPathname;
249 bool m_SeparateHoverImage;
255 unsigned int m_TextSize;
258 unsigned int m_CurrentFrame;
266 #endif //_TGUI_ANIMATED_BUTTON_INCLUDED_
The parent struct for every object.
Definition: Objects.hpp:36
Parent object for all objects that need to access the internal clock of the window.
Definition: Objects.hpp:338