21 #include <SFML/UI/AbstractButton.hpp>
22 #include <SFML/UI/IText.hpp>
51 CheckBox(sf::Texture
const &texture, sf::Texture
const &textureSelected,
bool selected =
false);
64 CheckBox(sf::Texture
const &texture, sf::Texture
const &textureSelected, sf::Font
const& font, sf::String name =
"",
bool selected =
false);
94 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
130 virtual sf::Vector2f
getSize()
const;
137 virtual const sf::String&
getText()
const;
147 virtual void setText(sf::String
const &text);
154 virtual const sf::Font*
getFont()
const;
161 virtual void setFont(sf::Font
const &font);
virtual sf::Vector2f getSize() const
virtual void onClick()
Called when the button is clicked That defines whether the check box is selected or not...
A box which can be checked or not.
virtual void setFontSize(unsigned int size)
Set the font's size of the component.
virtual void draw(sf::RenderTarget &target, sf::RenderStates states) const
Draw the component to the render target.
virtual void setFont(sf::Font const &font)
Sets the font of the component's text.
virtual unsigned int getFontSize() const
virtual const sf::String & getText() const
virtual void setFontColor(sf::Color color)
Sets the color's font of the text.
virtual void setText(sf::String const &text)
Sets the text's string of the component Don't forget to set the font.
virtual sf::Color getFontColor() const
virtual void updateCoord()
Called when the component need update its geometry Inherit when you need to update some sprite...
virtual const sf::Font * getFont() const
CheckBox(bool selected=false)
Creates a Check Box without texture.
An interface that allow component to have a text.
virtual void updateFixed(sf::Time delta)
Update the component with the main loop's frequency Can be useful for animation, or time's needed stu...
void setSelected(bool selected)
Sets if the check box is selected or not.