Added AsloEngine 0.9.0 to Repository

This commit is contained in:
Aslan2142 2019-08-29 18:42:28 +02:00
parent d017dd84b3
commit 881e6c70f2
60 changed files with 2648 additions and 0 deletions

View file

@ -0,0 +1,44 @@
#include "headers/text_only_button.hpp"
namespace asloengine
{
TextOnlyButton::TextOnlyButton(sf::String _name, sf::String _text, sf::Font& _font, uint _text_size)
: TextObject(_name, _text, _font, _text_size), GameObject(_name), Clickable(sf::Mouse::Left) {}
TextOnlyButton::~TextOnlyButton() {}
void TextOnlyButton::draw()
{
TextObject::draw();
}
void TextOnlyButton::on_main_property_update()
{
TextObject::on_main_property_update();
update_clickable(text->getGlobalBounds());
}
void TextOnlyButton::on_start()
{
set_clickable(text->getGlobalBounds(), render_window);
}
void TextOnlyButton::on_update(float delta_time)
{
if (clicked_press_and_release())
{
signal_on_clicked();
}
}
}