.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

@ -303,6 +303,23 @@ bool UIArc::getProperty(const std::string& name, sf::Vector2f& value) const {
return false;
}
bool UIArc::hasProperty(const std::string& name) const {
// Float properties
if (name == "radius" || name == "start_angle" || name == "end_angle" ||
name == "thickness" || name == "x" || name == "y") {
return true;
}
// Color properties
if (name == "color") {
return true;
}
// Vector2f properties
if (name == "center") {
return true;
}
return false;
}
// Python API implementation
PyObject* UIArc::get_center(PyUIArcObject* self, void* closure) {
auto center = self->data->getCenter();