mirror of
https://github.com/Immediate-Mode-UI/Nuklear.git
synced 2026-11-30 16:48:10 +01:00
Fix(nk_property): property widget not updating 'win->edit.active' state
Other "editable" widgets are updating the its window 'edit.active' state, but not nk_property. SDL3 demo needs this in order to hook SDL_SetTextInput. This patch was initially proposed by https://github.com/rswinkle The only thing I changed in it, was a removal of 'edit.name' update, nk_property is not using the name hash, so there is no reason to set it. Origin: https://github.com/Immediate-Mode-UI/Nuklear/pull/852#issuecomment-3518277340 Co-authored-by: Robert Winkler <rob121618@gmail.com>
This commit is contained in:
co-authored by
Robert Winkler
parent
fcd64f85e5
commit
c4e370b4f0
@@ -29073,6 +29073,7 @@ nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant
|
||||
win->property.name = hash;
|
||||
win->property.select_start = *select_begin;
|
||||
win->property.select_end = *select_end;
|
||||
win->edit.active = nk_true;
|
||||
if (*state == NK_PROPERTY_DRAG) {
|
||||
ctx->input.mouse.grab = nk_true;
|
||||
ctx->input.mouse.grabbed = nk_true;
|
||||
@@ -29088,6 +29089,7 @@ nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant
|
||||
win->property.select_start = 0;
|
||||
win->property.select_end = 0;
|
||||
win->property.active = 0;
|
||||
win->edit.active = nk_false;
|
||||
}
|
||||
}
|
||||
NK_API void
|
||||
@@ -30729,6 +30731,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
|
||||
/// - [y]: Minor version with non-breaking API and library changes
|
||||
/// - [z]: Patch version with no direct changes to the API
|
||||
///
|
||||
/// - 2025/11/08 (4.13.0) - Fix: nk_property not updating 'win->edit.active'
|
||||
/// - 2025/10/08 (4.12.8) - Fix nk_widget_text to use NK_TEXT_ALIGN_LEFT by default,
|
||||
/// instead of silently failing when no x-axis alignment is provided,
|
||||
/// and refactor this function to keep the code style consistent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/// - [y]: Minor version with non-breaking API and library changes
|
||||
/// - [z]: Patch version with no direct changes to the API
|
||||
///
|
||||
/// - 2025/11/08 (4.13.0) - Fix: nk_property not updating 'win->edit.active'
|
||||
/// - 2025/10/08 (4.12.8) - Fix nk_widget_text to use NK_TEXT_ALIGN_LEFT by default,
|
||||
/// instead of silently failing when no x-axis alignment is provided,
|
||||
/// and refactor this function to keep the code style consistent
|
||||
|
||||
@@ -405,6 +405,7 @@ nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant
|
||||
win->property.name = hash;
|
||||
win->property.select_start = *select_begin;
|
||||
win->property.select_end = *select_end;
|
||||
win->edit.active = nk_true;
|
||||
if (*state == NK_PROPERTY_DRAG) {
|
||||
ctx->input.mouse.grab = nk_true;
|
||||
ctx->input.mouse.grabbed = nk_true;
|
||||
@@ -420,6 +421,7 @@ nk_property(struct nk_context *ctx, const char *name, struct nk_property_variant
|
||||
win->property.select_start = 0;
|
||||
win->property.select_end = 0;
|
||||
win->property.active = 0;
|
||||
win->edit.active = nk_false;
|
||||
}
|
||||
}
|
||||
NK_API void
|
||||
|
||||
Reference in New Issue
Block a user