Skip to content

Add preset search window - #139

Draft
kblaschke wants to merge 6 commits into
projectM-visualizer:masterfrom
kblaschke:add-preset-search-window
Draft

kblaschke wants to merge 6 commits into
projectM-visualizer:masterfrom
kblaschke:add-preset-search-window

Conversation

@kblaschke

Copy link
Copy Markdown
Member

This PR adds a preset search window/popup to the application, similar to the preset menu which was available in projectMSDL releases which were part of projectM up to version 3.1.12 (e.g. before 4.0 and the SDL app rewrite).

The search window can be brought up via the m key (for "menu") as in earlier versions. When opened, it'll scroll to the currently-displayed preset centered and selected in the list, and an empty search bar on top. The text input field can be used to enter search phrases to filter the list. Each word (separated by spaces) in the input field is searched individually within the preset name, in any order, and all individual words must appear in the preset title. No character filtering or minimum text length is applied, so search for $ and other special characters can be entered as well.

Compared with previous versions, the new search window provides the following enhancements and new features:

  • Full Unicode/UTF-8 support for preset titles and searching (Note: on Windows, Unicode filenames are currently bugged, as the libprojectM playlist library doesn't convert filenames properly between UTF-8 and UTF-16).
  • Multi-word matching, allowing to enter parts of the preset name in any order.
  • Smoother list scrolling, keeping the currently selected preset centered when using the keyboard to navigate.
  • When changing the filter phrase, the list tries to keep the same preset selected as long as it's still part of the list, or moved to one nearby if not.
  • The currently-displayed preset is automatically selected in the list, allowing to quickly switch presets nearby the current one.
  • The window can be moved, resized and the list navigated using the mouse. A double-click also switches to the selected preset. The window position will be remembered across restarts.

The implementation is basically done, but still have to resolve some nasty ImGui/SDL key buffer/state issues when opening the window.

For now, the wrapper class still uses the projectM playlist library under the hood. Once the playlist editor and advanced playback features are implemented, all logic (path traversal, sorting, playback logic) will move to this application, no longer needing the projectM playlist library.
@kblaschke kblaschke self-assigned this Oct 5, 2026
@kblaschke kblaschke added the enhancement New feature or request label Oct 5, 2026
@kblaschke kblaschke linked an issue Oct 5, 2026 that may be closed by this pull request
2 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Returning Preset Search functionality

1 participant