RobLoach / RobLoach/nuklear_console

textedit: Make input filter configurable per widget

Open Beginner friendly
#245 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

nuklear_console_textedit_text.h:73 has // TODO: textedit_text: Add an option to change the filter. and lines 84 and 105 hard-code nk_filter_ascii. This blocks numeric-only inputs, decimal, hex, or custom Unicode filters in textedit widgets.

Suggested Implementation

Add nk_console_textedit_set_filter(nk_console* widget, nk_plugin_filter filter) mirroring Nuklear's filter callbacks (nk_filter_decimal, nk_filter_float, etc.). Default remains nk_filter_ascii for backwards compatibility.

QA

Test that a textedit configured with nk_filter_decimal rejects letter keys; verify masked mode still works.

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 in nuklear_console_textedit_text.h at lines 73, 84, and 105, then trace how textedit widgets store and apply their filter. Add the configurable filter while preserving nk_filter_ascii as the default, and verify the QA cases: nk_filter_decimal rejects letters and masked mode still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.