mitsuba-renderer / nanogui

Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL
Other
1.57k stars 196 forks source link

Regarding a custom theme I already have #57

Open ghost opened 4 years ago

ghost commented 4 years ago

Dear team, Up until now, I was using https://github.com/svenevs/nanogui-customization-demo and I had my own custom colors and fonts which I created with https://github.com/svenevs/nanogui-customization-demo/blob/master/python/custom_theme.py

Now, I cant seem to find where exactly do I make these changes in this repository. For instance changing these colors (from the repo I referenced) and the fonts used:

using nanogui::Color;
        mDropShadow                       = Color(0.0f, 0.0f, 0.0f, 0.501960813999176f);
        mTransparent                      = Color(0.0f, 0.0f, 0.0f, 0.0f);
        mBorderDark                       = Color(0.5084147453308105f, 0.5084147453308105f, 0.5084147453308105f, 1.0f);

Many thanks,

ghost commented 4 years ago

OO, so I need to uses bin2c? is that the correct way? m_font_sans_regular_001 = nvgCreateFontMem(ctx, "sans001", (uint8_t *) spectralsc_regular_ttf, roboto_regular_ttf_size, 0);

Thanks,

svenevs commented 4 years ago

Hey sorry things are really hectic I missed the other issue. That repository was a prototype that had too many not well thought out changes required, I won't be able to do this for this fork anytime soon (part of it as you see deals with build system changes which aren't the right direction at this point).

AKA it only works with the fork I have as a submodule, off wjakob/nanogui. Will revisit theme customization at some point but it's not going to happen anytime soon.

For this repo, you can edit the member fields of the theme instance of your widget directly if you want to change colors or font size. Custom fonts, and misc bugs of certain widgets will need to wait. Sorry :(

ghost commented 4 years ago

OK thanks, Meanwhile, I integrated your version with Libtorch. I really hope you are not going to make too many changes ... :)

image