Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new UI based on Dear ImGui, allow more window settings #76

Merged
merged 44 commits into from
Apr 22, 2024

Conversation

kblaschke
Copy link
Member

Added a whole new UI making use of the awesome Dear ImGui framework. This UI is rendered on top of the projectM output, and thus makes it completely OS-independent, so we don't have to either write OS-specific UIs or pull in huge framework dependencies like Qt or GTK, which would also add a lot more complexity into the application. The UI is also used to display "toast" messages, e.g. when changing the audio input device, to give the user some feedback. ImGui also supports Unicode, and thus works fine with non-latin character sets as well.

In the Help menu, there are links to the projectM Wiki, the source code and our OpenCollective sponsoring page as well. The links will open in the system default browser on Windows, Linux and macOS using the respective platform-specific APIs.

In addition to the new UI, there were a few improvements in configuration handling and some additional settings regarding rendering and window features, e.g. the user can now fully control where and how the window appears on startup, including borderless mode and using adaptive vertical sync of the hardware supports it.

The preset playlist editor and a playlist search feature are still missing, and will follow a bit later. The UI is polished enough though to be ready for general use and testing, so I'll merge the current state to make it more visible to other users/devs.

Use main menu bar as entry point, and notifications to trigger all the various commands, but still handle them in their proper classes, e.g. projectM commands, window commands etc.
Having three configuration files is just too confusing. Users will rarely need to edit the configuration file by hand, so one "projectMSDL.properties" file in the user's app data dir will suffice.
Was just used for initial testing.
Added multiple selection capabilities and different selection modes for files, dirs and both.
Configuration layer handling was totally messed up, still too confusing and hard to manage.

There's now just the user configuration data (via the properties file) which is changed. Any changes made in settings or via key presses are temporary unless the user presses the "Save Settings" button in the settings window.

Any changes made directly inside the settings window will change the window title accordingly to inform the user that the settings weren't saved. The flag is cleared once the user pressed the save button (regardless of success).
Also fixed and improved some windowing stuff. The current window position can now be copied to the settings, so the window should be placed at this exact position on the next startup.
@kblaschke kblaschke added the enhancement New feature or request label Apr 7, 2024
@kblaschke kblaschke self-assigned this Apr 7, 2024
Makes it easier to change the window title later without "forgetting" the window position.
Fail in a "good" manner instead of performing unchecked null pointer dereferences in later API calls.
Would otherwise confuse users until implemented.
@kblaschke
Copy link
Member Author

kblaschke commented Apr 8, 2024

Fixed all build failures I could, but the Windows one is something on GitHub's side, there's an issue with the MSVC build tools they need to fix first. See this thread.

vcpkg will use the vcpkg.json files in the project dirs to do this automatically.
A few fixes to make projectMSDL build on GitHub Actions:
- Added missing "glew" vcpkg dependency (as long as we don't use a proper libprojectM vcpkg port)
- Add developer command line setup action to fix issues with multiple MSVC toolsets getting mixed up
- Enable binary package caching in vcpkg to speed up the build process
@kblaschke
Copy link
Member Author

Found a workaround for the Windows Actions runner issue, added binary caching to the workflow vcpkg config to speed up future builds and also fixed other build issues as well. In retrospect, I should've done this before opening the PR, but well... now it's done.

Should make fonts on macOS smaller, and fonts on Linux highDPI displays larger.
@kblaschke
Copy link
Member Author

Windows build fails again, this time because sourceware.org is apparently down. Builds & runs on Windows though, so I'll merge it.

@kblaschke kblaschke merged commit fc03b87 into projectM-visualizer:master Apr 22, 2024
2 of 3 checks passed
@kblaschke kblaschke deleted the imgui-test branch April 22, 2024 14:29
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.

2 participants