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

ImGuiFileDialog to replace portable-file-dialogs #420

Closed
wants to merge 3 commits into from
Closed

ImGuiFileDialog to replace portable-file-dialogs #420

wants to merge 3 commits into from

Conversation

mlauss2
Copy link
Contributor

@mlauss2 mlauss2 commented Jul 13, 2024

So here's a first stab at implementing ImGuiFileDialog (https://github.com/aiekick/ImGuiFileDialog) to generate the file/directory selection dialogs.
Applies on top of PR #418 (which updates ImGui to 1.90.9) / this PR comes with #418 included since I used it as development base, and the Dialog needs at least ImGui-1.90.5

The Dialog uses std::filesystem, which means a compiler with c++17 support is required.

At the moment it looks like this:
tfe-imguidialog

It can be resized, I've for now chosen minimum size of 640x480px (image above), any smaller and
interacting with it becomes tedious, I found myself first resizing it every time it opened.
I'll look into having Icons instead of [File]/[Dir] and maybe different colors for files and dirs.

Tested on Windows and Linux, including the Editor (but that might still have bugs).
While this is no big deal for windows, on linux this again reduces external dependencies (external dialog app), and tfe+editor fully work without any desktop environment.

mlauss2 added 2 commits July 9, 2024 11:55
Update ImGUI to 1.90.9
Fix up all ImGUI interface changes
Add the diff for the custom TFE widgets to contrib/
Add a GLAD-generated opengl loader to the OpenGL renderbackend, to
remove the dependency on external GLEW.

This should not be noticeable on Windows, but is beneficial on Linux
for several reasons:
- at build time, no system opengl libraries and headers are required.
- TFE does no longer have any built-in OpenGL or windowing system
  dependecy, just SDL2.
- at run time, OpenGL is loaded by the system SDL, which also handles
  all the ugly windowing system (X11/Wayland/KMS/...) and platform
  (Linux/BSD/...) stuff.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
@mlauss2
Copy link
Contributor Author

mlauss2 commented Jul 13, 2024

Added Icons and a bit of coloring:
tfe_filedlg2

A file dialog based completely on ImGUI:
https://github.com/aiekick/ImGuiFileDialog

to replace the portable-file-dialogs and give these
dialogs the same look as the rest of the TFE Ui.

Need to raise minimum C++ standard to C++17 since this relies
on std::filesystem.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
@luciusDXL
Copy link
Owner

I remember trying this in the past and not liking it as much, but the extra dependencies on Linux is a good point and it is more consistent in terms of UI.

@mlauss2
Copy link
Contributor Author

mlauss2 commented Jul 15, 2024

yeah it's not the prettiest interface but outside of the editor you're probably going to use it only once, on initial setup. My main motivation was to get tfe running on my kodi box which doesn't have any windowing system (i.e. runs directly on the DRM framebuffer) and now all including the editor is usable.

@mlauss2 mlauss2 closed this Jul 22, 2024
@mlauss2 mlauss2 deleted the noglew2-imguifiledialog branch July 22, 2024 17:40
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.

2 participants