26 #ifndef _TGUI_BUTTON_INCLUDED_
27 #define _TGUI_BUTTON_INCLUDED_
46 Button(
const Button& copy);
58 Button& operator= (
const Button& right);
64 virtual void initialize();
70 virtual Button* clone();
85 virtual bool load(
const std::string& pathname);
94 virtual void setSize(
float width,
float height);
100 virtual Vector2u getSize()
const;
106 virtual Vector2f getScaledSize()
const;
114 virtual std::string getLoadedPathname()
const;
120 virtual void setText(
const sf::String& text);
126 virtual sf::String getText()
const;
135 virtual void setTextFont(
const sf::Font& font);
141 virtual const sf::Font* getTextFont()
const;
147 virtual void setTextColor(
const sf::Color& color);
153 virtual const sf::Color& getTextColor()
const;
161 virtual void setTextSize(
unsigned int size);
167 virtual unsigned int getTextSize()
const;
174 virtual bool mouseOnObject(
float x,
float y);
175 virtual void leftMousePressed(
float x,
float y);
176 virtual void leftMouseReleased(
float x,
float y);
177 virtual void mouseMoved(
float x,
float y);
178 virtual void keyPressed(sf::Keyboard::Key key);
179 virtual void objectFocused();
190 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
200 sf::Texture* m_TextureNormal_L;
201 sf::Texture* m_TextureMouseHover_L;
202 sf::Texture* m_TextureMouseDown_L;
203 sf::Texture* m_TextureFocused_L;
205 sf::Texture* m_TextureNormal_M;
206 sf::Texture* m_TextureMouseHover_M;
207 sf::Texture* m_TextureMouseDown_M;
208 sf::Texture* m_TextureFocused_M;
210 sf::Texture* m_TextureNormal_R;
211 sf::Texture* m_TextureMouseHover_R;
212 sf::Texture* m_TextureMouseDown_R;
213 sf::Texture* m_TextureFocused_R;
216 sf::Sprite m_SpriteNormal_L;
217 sf::Sprite m_SpriteMouseHover_L;
218 sf::Sprite m_SpriteMouseDown_L;
219 sf::Sprite m_SpriteFocused_L;
221 sf::Sprite m_SpriteNormal_M;
222 sf::Sprite m_SpriteMouseHover_M;
223 sf::Sprite m_SpriteMouseDown_M;
224 sf::Sprite m_SpriteFocused_M;
226 sf::Sprite m_SpriteNormal_R;
227 sf::Sprite m_SpriteMouseHover_R;
228 sf::Sprite m_SpriteMouseDown_R;
229 sf::Sprite m_SpriteFocused_R;
232 std::string m_LoadedPathname;
239 bool m_SeparateHoverImage;
245 unsigned int m_TextSize;
256 #endif //_TGUI_BUTTON_INCLUDED_
Movable Panel with title bar.
Definition: ChildWindow.hpp:36
The parent struct for every object.
Definition: Objects.hpp:36