Skip to content

Add text filter search to GuiListbox#2819

Open
oznogon wants to merge 3 commits intodaid:masterfrom
oznogon:search-fields
Open

Add text filter search to GuiListbox#2819
oznogon wants to merge 3 commits intodaid:masterfrom
oznogon:search-fields

Conversation

@oznogon
Copy link
Copy Markdown
Contributor

@oznogon oznogon commented Mar 29, 2026

  • Add GuiListbox::addSearch() function to add a text filter search field to the top of a GuiListbox. This field behaves the same as the filter field on GuiObjectCreationView, displaying only entries where the entered string is a substring match.
    • Replace the GuiObjectCreationView filter with this GuiListbox filter.
  • Implement text filter search callback override to allow defining custom search behavior, for instance to filter all ScienceDatabase entries on DatabaseView. Default behavior is a simple filter match on the associated Listbox's contents that populates an entry list with the matching entries.
    • Implement a text filter search on DatabaseView using a custom callback.
Screencast_20260328_214105.webm

oznogon added 3 commits March 28, 2026 21:35
- Add GuiListbox::addSearch() function to add a text filter search
  field to the top of a GuiListbox. This field behaves the same as
  the filter field on GuiObjectCreationView, displaying only entries
  where the entered string is a substring match.
- Implement text filter search callback override to allow defining
  custom search behavior, for instance to filter all ScienceDatabase
  entries on DatabaseView. Default behavior is a simple filter match
  on the associated Listbox's contents that populates an entry list
  with the matching entries.
Replace the bespoke text filter search with GuiListbox's.
Implement DatabaseView text filter search using GuiListbox's filter
and a custom callback that searches all ScienceDatabase entry names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant