Implement comprehensive animation system (closes #59)
- Add Animation class with 30+ easing functions (linear, ease in/out, quad, cubic, elastic, bounce, etc.) - Add property system to all UI classes for animation support: - UIFrame: position, size, colors (including individual r/g/b/a components) - UICaption: position, size, text, colors - UISprite: position, scale, sprite_number (with sequence support) - UIGrid: position, size, camera center, zoom - UIEntity: position, sprite properties - Create AnimationManager singleton for frame-based updates - Add Python bindings through PyAnimation wrapper - Support for delta animations (relative values) - Fix segfault when running scripts directly (mcrf_module initialization) - Fix headless/windowed mode behavior to respect --headless flag - Animations run purely in C++ without Python callbacks per frame All UI properties are now animatable with smooth interpolation and professional easing curves. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
dd3c64784d
commit
70cf44f8f0
22 changed files with 1873 additions and 6 deletions
|
|
@ -42,6 +42,15 @@ public:
|
|||
static PyGetSetDef getsetters[];
|
||||
static PyObject* repr(PyUIFrameObject* self);
|
||||
static int init(PyUIFrameObject* self, PyObject* args, PyObject* kwds);
|
||||
|
||||
// Animation property system
|
||||
bool setProperty(const std::string& name, float value) override;
|
||||
bool setProperty(const std::string& name, const sf::Color& value) override;
|
||||
bool setProperty(const std::string& name, const sf::Vector2f& value) override;
|
||||
|
||||
bool getProperty(const std::string& name, float& value) const override;
|
||||
bool getProperty(const std::string& name, sf::Color& value) const override;
|
||||
bool getProperty(const std::string& name, sf::Vector2f& value) const override;
|
||||
};
|
||||
|
||||
namespace mcrfpydef {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue