feat(Grid): add customizable background_color property (#50)
- Added sf::Color background_color member with default dark gray - Python property getter/setter for background_color - Animation support for individual color components (r/g/b/a) - Replaces hardcoded clear color in render method - Test demonstrates color changes and property access Closes #50
This commit is contained in:
parent
4b2ad0ff18
commit
ff7cf25806
20 changed files with 104 additions and 4 deletions
|
|
@ -51,6 +51,9 @@ public:
|
|||
std::vector<UIGridPoint> points;
|
||||
std::shared_ptr<std::list<std::shared_ptr<UIEntity>>> entities;
|
||||
|
||||
// Background rendering
|
||||
sf::Color background_color;
|
||||
|
||||
// Property system for animations
|
||||
bool setProperty(const std::string& name, float value) override;
|
||||
bool setProperty(const std::string& name, const sf::Vector2f& value) override;
|
||||
|
|
@ -70,6 +73,8 @@ public:
|
|||
static PyObject* get_float_member(PyUIGridObject* self, void* closure);
|
||||
static int set_float_member(PyUIGridObject* self, PyObject* value, void* closure);
|
||||
static PyObject* get_texture(PyUIGridObject* self, void* closure);
|
||||
static PyObject* get_background_color(PyUIGridObject* self, void* closure);
|
||||
static int set_background_color(PyUIGridObject* self, PyObject* value, void* closure);
|
||||
static PyObject* py_at(PyUIGridObject* self, PyObject* args, PyObject* kwds);
|
||||
static PyMethodDef methods[];
|
||||
static PyGetSetDef getsetters[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue