parent
1a7186f745
commit
83a63a3093
18 changed files with 5329 additions and 2910 deletions
22
src/UICaption.cpp
Normal file
22
src/UICaption.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "UICaption.h"
|
||||
|
||||
UIDrawable* UICaption::click_at(sf::Vector2f point)
|
||||
{
|
||||
if (click_callable)
|
||||
{
|
||||
if (text.getGlobalBounds().contains(point)) return this;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void UICaption::render(sf::Vector2f offset)
|
||||
{
|
||||
text.move(offset);
|
||||
Resources::game->getWindow().draw(text);
|
||||
text.move(-offset);
|
||||
}
|
||||
|
||||
PyObjectsEnum UICaption::derived_type()
|
||||
{
|
||||
return PyObjectsEnum::UICAPTION;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue