Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
[Question] Widget states are confusing
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
Hi,
The current description of the widget states is a bit confusing:
```
enum nk_widget_states {
NK_WIDGET_STATE_MODIFIED = NK_FLAG(1),
NK_WIDGET_STATE_INACTIVE = NK_FLAG(2), /* widget is neither active nor hovered */
NK_WIDGET_STATE_ENTERED = NK_FLAG(3), /* widget has been hovered on the current frame */
NK_WIDGET_STATE_HOVER = NK_FLAG(4), /* widget is being hovered */
NK_WIDGET_STATE_ACTIVED = NK_FLAG(5),/* widget is currently activated */
NK_WIDGET_STATE_LEFT = NK_FLAG(6), /* widget is from this frame on not hovered anymore */
NK_WIDGET_STATE_HOVERED = NK_WIDGET_STATE_HOVER|NK_WIDGET_STATE_MODIFIED, /* widget is being hovered */
NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /* widget is currently activated */
};
```
NK_WIDGET_STATE_ACTIVED and NK_WIDGET_STATE_ACTIVE have the same comment description. What is the difference between these two states?
NK_WIDGET_STATE_HOVER and NK_WIDGET_STATE_HOVERED also have the same comment description. What is the difference between these two states?
The name NK_WIDGET_STATE_ACTIVED looks misspelled. Should it not be NK_WIDGET_STATE_ACTIVATED?
Thanks!
Contributor guide
Research direction
Locate the nk_widget_states enum in Nuklear's C header and read how each state is used. Determine the distinctions between ACTIVED/ACTIVE and HOVER/HOVERED, and confirm whether ACTIVED should be renamed; done means the comments and naming accurately document the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100