doesn't compile, but UI.h/.cpp code has been divvy'd up.

refs #43 @2h
This commit is contained in:
John McCardle 2024-04-08 22:45:00 -04:00
commit 83a63a3093
18 changed files with 5329 additions and 2910 deletions

22
src/UICaption.cpp Normal file
View 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;
}