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
|
|
@ -10,6 +10,15 @@ public:
|
|||
void render(sf::Vector2f, sf::RenderTarget&) override final;
|
||||
PyObjectsEnum derived_type() override final;
|
||||
virtual UIDrawable* click_at(sf::Vector2f point) override final;
|
||||
|
||||
// Property system for animations
|
||||
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 std::string& 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, std::string& value) const override;
|
||||
|
||||
static PyObject* get_float_member(PyUICaptionObject* self, void* closure);
|
||||
static int set_float_member(PyUICaptionObject* self, PyObject* value, void* closure);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue