.animate helper: create and start an animation directly on a target. Preferred use pattern; closes #175

This commit is contained in:
John McCardle 2026-01-04 15:32:14 -05:00
commit 9ab618079a
21 changed files with 738 additions and 11 deletions

View file

@ -327,6 +327,24 @@ bool UILine::getProperty(const std::string& name, sf::Vector2f& value) const {
return false;
}
bool UILine::hasProperty(const std::string& name) const {
// Float properties
if (name == "thickness" || name == "x" || name == "y" ||
name == "start_x" || name == "start_y" ||
name == "end_x" || name == "end_y") {
return true;
}
// Color properties
if (name == "color") {
return true;
}
// Vector2f properties
if (name == "start" || name == "end") {
return true;
}
return false;
}
// Python API implementation
PyObject* UILine::get_start(PyUILineObject* self, void* closure) {
auto vec = self->data->getStart();