From 326b69290836ba6fd3d11d9281da93906e9f57c5 Mon Sep 17 00:00:00 2001 From: John McCardle Date: Thu, 30 Oct 2025 12:22:00 -0400 Subject: [PATCH] feat: convert PyDrawable properties to documentation macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All Drawable properties (click, z_index, visible, opacity) now use MCRF_PROPERTY with enhanced descriptions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/PyDrawable.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/PyDrawable.cpp b/src/PyDrawable.cpp index 8e59dbe..2fe0e93 100644 --- a/src/PyDrawable.cpp +++ b/src/PyDrawable.cpp @@ -99,14 +99,26 @@ static int PyDrawable_set_opacity(PyDrawableObject* self, PyObject* value, void* // GetSetDef array for properties static PyGetSetDef PyDrawable_getsetters[] = { - {"click", (getter)PyDrawable_get_click, (setter)PyDrawable_set_click, - "Callable executed when object is clicked", NULL}, + {"click", (getter)PyDrawable_get_click, (setter)PyDrawable_set_click, + MCRF_PROPERTY(click, + "Callable executed when object is clicked. " + "Function receives (x, y) coordinates of click." + ), NULL}, {"z_index", (getter)PyDrawable_get_z_index, (setter)PyDrawable_set_z_index, - "Z-order for rendering (lower values rendered first)", NULL}, + MCRF_PROPERTY(z_index, + "Z-order for rendering (lower values rendered first). " + "Automatically triggers scene resort when changed." + ), NULL}, {"visible", (getter)PyDrawable_get_visible, (setter)PyDrawable_set_visible, - "Whether the object is visible", NULL}, + MCRF_PROPERTY(visible, + "Whether the object is visible (bool). " + "Invisible objects are not rendered or clickable." + ), NULL}, {"opacity", (getter)PyDrawable_get_opacity, (setter)PyDrawable_set_opacity, - "Opacity level (0.0 = transparent, 1.0 = opaque)", NULL}, + MCRF_PROPERTY(opacity, + "Opacity level (0.0 = transparent, 1.0 = opaque). " + "Automatically clamped to valid range [0.0, 1.0]." + ), NULL}, {NULL} // Sentinel };