Rangi42 / tilemap-studio

A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
https://hax.iimarckus.org/topic/7691/
Other
395 stars 32 forks source link

Availability of fltk themes? #82

Closed TheGrandSinnovia closed 1 month ago

TheGrandSinnovia commented 9 months ago

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 commented 1 month ago

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