Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
GUI "cards"
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
I'm trying to figure out a decent way to implement "cards", i.e. a collection of widgets representing one item, often in a list of variable number.
It looked like `groups` were my best bet.
But they're supposed to have unique id's, which is not really possible in a variably sized array.
While testing my idea, I have semi-successfully created a proof of concept, using `nk_layout_space_` and `nk_group`. I have a loop that generates three groups per "card", using the same id's each time.
Probably not a great idea.
However, I can't figure out how to colour the background of each card.
AFAICT there is no way to set the background for a group. But anyway, I really want to set the card background, which is not a single group.
I presume I could draw e.g. a rounded rectangle and then draw the other widgets on top, but I've not yet figured out how.
If anyone has suggestions of what features I could look into that would be great.
I imagine this could end up being a custom widget (layout?).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the nk_layout_space_ and nk_group APIs used in the proof of concept, then inspect Nuklear's existing widget and drawing entry points. Determine whether cards require a new widget or layout capability, and define completion around rendering a variable collection of widgets with a distinct background for each card.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100