ruanformigoni / gameimage

Gameimage - FlatImage Game Packer
Apache License 2.0
237 stars 2 forks source link

why use FLTK GUI library? #46

Open Heus-Sueh opened 5 months ago

Heus-Sueh commented 5 months ago

I ask this because the interface is not very pleasing to the eye because it is old, but I understand that one of the reasons was because it is light, but I think the project would benefit from a more modern GUI and since you rewrote a lot of the code in C++ maybe this would be the right time to change, maybe QT which is made in C++, GTK or Iced if you still intend to leave the GUI in Rust

Since you prefer C++, I think it would be better to keep the code in just one language to attract more contributions

ruanformigoni commented 5 months ago

Hi @Heus-Sueh , thanks for the suggestion!

I think the choice of QT or GTK would not be ideal, mainly because it would not be able to keep up to date for long. For example, I could in flatimage support bindings to QT4-6 and GTK2-4 themes, but then QT7 and GTK5 would not present properly anymore, with incorrect theming & mode (light/dark). Iced seems to be pretty new, the documentation for is not as good as fltk's, but it does look pretty good. I use fltk-rs with a fixed look to be consistent and independent of what the host has. In the end, with the logic in place, I can achieve similar looks to QT, GTK or Iced, so currently I do not see it as an improvement over other things the project needs.

About C++ & rust, I do prefer C++, however I see this as a positive thing since many people find it difficult to use C++ and prefer rust, or already know C++ and do not see rust as something advantageous. So this makes possible to both to contribute, since the front-end and the back-end are two separate applications that communicate though json data.

One downside of FLTK, or something that I haven't grasped is that it is not simple to change the GUI elements without redrawing the entire frame, this alone would be a good reason to change as it makes minor changes not as trivial, e.g., select "wine" in the platform frame, you'll notice that for the distribution button to be introduced the entire frame is redrawn (it would segfault sometimes on a partial redraw if I attempted one).

Heus-Sueh commented 5 months ago

Hi @Heus-Sueh , thanks for the suggestion!

I think the choice of QT or GTK would not be ideal, mainly because it would not be able to keep up to date for long. For example, I could in flatimage support bindings to QT4-6 and GTK2-4 themes, but then QT7 and GTK5 would not present properly anymore, with incorrect theming & mode (light/dark). Iced seems to be pretty new, the documentation for is not as good as fltk's, but it does look pretty good. I use fltk-rs with a fixed look to be consistent and independent of what the host has. In the end, with the logic in place, I can achieve similar looks to QT, GTK or Iced, so currently I do not see it as an improvement over other things the project needs.

About C++ & rust, I do prefer C++, however I see this as a positive thing since many people find it difficult to use C++ and prefer rust, or already know C++ and do not see rust as something advantageous. So this makes possible to both to contribute, since the front-end and the back-end are two separate applications that communicate though json data.

One downside of FLTK, or something that I haven't grasped is that it is not simple to change the GUI elements without redrawing the entire frame, this alone would be a good reason to change as it makes minor changes not as trivial, e.g., select "wine" in the platform frame, you'll notice that for the distribution button to be introduced the entire frame is redrawn (it would segfault sometimes on a partial redraw if I attempted one).

with FLTK I am experiencing visual glitches, but it must be because of NVIDIA as always, regarding GTK and QT your argument makes sense, and what do you think of these libraries: imgui-rs and egui?

ruanformigoni commented 5 months ago

I saw that egui has an fltk integration, that may fix the previously mentioned problem. Thanks for this suggestion! I'll consider a rewrite on it or an integration as a temporary fix for some GUI issues.

Blad3forc3 commented 5 months ago

I'm not sure if this is related but i'm using kubuntu with an nivdia card and when i am running gameimage the mouse becomes stuttery definitely not smooth as soon as i close gameimage the mouse is fine. Also any chance the logger windows can use larger fonts? They look tiny and also jaggy

ruanformigoni commented 5 months ago

It probably is nvidia, on intel & amd it works fine.

Also any chance the logger windows can use larger fonts? They look tiny and also jaggy

I'll consider that when modifying the GUI, you can also save the output of the terminal clicking on the button to the right.