Problem
nk_console_knob_data (nuklear_console_knob.h:11-12) has two customization fields:
typedef struct nk_console_knob_data {
nk_console_property_data property; /* Inherited from property */
enum nk_heading zero_direction;
float dead_zone_degrees;
} nk_console_knob_data;
They are hardcoded to NK_DOWN / 60.0f at creation and consumed by the render path in nuklear_console_property.h:209,213, but there is no public API to read or change them — grep shows only internal use. This is inconsistent with sibling widgets that expose accessors for their data fields (button: nk_console_button_get/set_symbol, nk_console_button_get/set_image; image: nk_console_image_get/set_color).
Suggested Implementation
Add to nuklear_console_knob.h, following the button/image accessor pattern (NULL-safe, Doxygen-commented):
NK_API enum nk_heading nk_console_knob_get_zero_direction(nk_console* knob);
NK_API void nk_console_knob_set_zero_direction(nk_console* knob, enum nk_heading zero_direction);
NK_API float nk_console_knob_get_dead_zone_degrees(nk_console* knob);
NK_API void nk_console_knob_set_dead_zone_degrees(nk_console* knob, float dead_zone_degrees);
Guard against NULL widget/data and wrong widget type, as the existing accessors do.
QA
Context
Problem
nk_console_knob_data(nuklear_console_knob.h:11-12) has two customization fields:They are hardcoded to
NK_DOWN/60.0fat creation and consumed by the render path innuklear_console_property.h:209,213, but there is no public API to read or change them — grep shows only internal use. This is inconsistent with sibling widgets that expose accessors for their data fields (button:nk_console_button_get/set_symbol,nk_console_button_get/set_image; image:nk_console_image_get/set_color).Suggested Implementation
Add to
nuklear_console_knob.h, following the button/image accessor pattern (NULL-safe, Doxygen-commented):Guard against NULL widget/data and wrong widget type, as the existing accessors do.
QA
test/nuklear_console_test.c: defaults areNK_DOWN/60.0f; set/get round-trips; NULL widget doesn't crash.Context
nuklear_console_button.h/nuklear_console_image.h.