RobLoach / RobLoach/nuklear_console

list_view: add optional multi-select mode

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement widget
Dominant language
C
Stars
22
Forks
4
Avg merge
4m
Merged PRs (30d)
2

Description

list_view supports a single selected index (nk_console_list_view_set_selected, #254). There is no way to select multiple items, which limits use cases like bulk file ops or settings that apply to a subset of a list.

Suggested Implementation

  • Add nk_console_list_view_set_multi_select(widget, nk_bool enabled).
  • When enabled, maintain a nk_bool* selected mask alongside the existing selected int.
  • Pressing A toggles the focused item in the mask; existing single-select behavior unchanged.
  • Add nk_console_list_view_is_selected(widget, int index) accessor.

QA

Multi-select enabled: pressing A on items 0, 2, 4 marks all three. Single-select still returns one index via the existing getter.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from nk_console_list_view_set_selected and the list_view input handling, then trace how the existing selected index is stored and changed when A is pressed. Add the multi-select toggle and nk_console_list_view_is_selected accessor described in the issue. Done means items 0, 2, and 4 remain selected after toggling, while single-select still exposes one index through the existing getter.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.