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

Availability of fltk themes? #82

Closed
TheGrandSinnovia opened this issue Feb 27, 2024 · 1 comment
Closed

Availability of fltk themes? #82

TheGrandSinnovia opened this issue Feb 27, 2024 · 1 comment

Comments

@TheGrandSinnovia
Copy link

Hello!!!

I came across this software when reading about asm for the gameboy in gbdev!!! It is absolutely fantastic!!! I then came across it again when I was researching on good frameworks to make guis in C++ and learned about fltk. Apparently fltk works great and is super light. The default themes seem a bit oldschool though. I see that you too use fltk, but your application looks modern and beautiful. Is there a simple way for a begginner c++ programmer to include the themes you created and use them in their project or plans to do it in the future? I believe someone started to port the work to be able to use it with rust, but no c++ yet.

Thanks in advance for making such cool software available!!!

@TheGrandSinnovia
Copy link
Author

TheGrandSinnovia commented Sep 30, 2024

I have managed to use the themes by using themes.h themes.cpp utils.h utils.cpp (I removed brushed metal since I wont be using it) I ended up taking these files from the Polished Map project, which was made by the same author of this project. I simply have to call OS::use_dark_theme(); (for example, if I want to use dark theme). I now realize this was not the best question since the themes are already defined in specific files. Thank you for your work!!!! (For example I can simply make a call at the beggining of my main file like so):

`
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>

#include "themes.h"

void button_cb(Fl_Widget* widget, void*) {
Fl_Button* btn = (Fl_Button*)widget;
btn->label("Clicked!");
}

int main(int argc, char **argv) {
OS::use_dark_theme();
Fl_Window *window = new Fl_Window(340,180);
Fl_Button *button = new Fl_Button(100, 40, 140, 100, "Click Me!");
button->callback(button_cb);
window->end();
window->show(argc, argv);
return Fl::run();
}
`
Screenshot_20241001_000813

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

No branches or pull requests

1 participant