Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
NK_EDIT_DEACTIVATED not set if clicking on nk_edit previously in draw order
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
by previously drawn I mean the order in which nk_edit_string is called in one frame
if I click on an nk_edit after it in the draw order, it fires
if I click on any other widget type like a button even if previously drawn it fires
however if I click on any other nk_edit previously drawn that frame, I don't get NK_EDIT_DEACTIVATED
I'm currently working round it like this
edstate = nk_edit_string(ctx, NK_EDIT_FIELD | NK_EDIT_SIG_ENTER, mats[i].axisFunc[a],
&mats[i].axisLen[a], MAXaxisLen, nk_filter_ascii);
//if ((edstate & NK_EDIT_COMMITED) || (edstate & NK_EDIT_DEACTIVATED))
if ((edstate & NK_EDIT_COMMITED) || mats[i].lastActive[a] != (edstate & NK_EDIT_ACTIVE))
{
mats[i].axisCommit[a] = true;
}
mats[i].lastActive[a] = edstate & NK_EDIT_ACTIVE;
I have a number of groups ( i ) of three nk_edits in each group, each nk_edit is index with variable a (for axis)
not sure I've described this too well, so added my work round here...
While I'm here, nice library, thanks !
Contributor guide
Research direction
Reproduce the issue with multiple nk_edit_string calls in one frame, including the grouped edits described in the report. Start at the nk_edit_string entry point and trace how NK_EDIT_DEACTIVATED is produced when focus moves between edits. Done means an earlier edit in draw order reports deactivation when another edit is clicked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100