Open StrikerMan780 opened 2 months ago
Possibly could accomplish having different color styles by having a pointer to a style for each widget, and apply it to the Nuklear styles when rendering.
Not sure how to have different fonts displayed in the same context though. Have you done this before?
Yes. You can push/pop fonts in Nuklear, (nk_style_push/pop_font)
I've used it in my own menus before. For example, to use different fonts for the title and menu itself. Like so:
(It's meant to mimic the look of the original Terminal Velocity menu, but a bit more streamlined)
Another way is to use nk_style_set_font, which sets it directly, but clears the push/pop stack.
Looks great! Does look like the original. Something like this should allow setting a different font on a per-widget basis, but I'm unsure it's the best design. Also, would love a demonstration of using them in the demos https://github.com/RobLoach/nuklear_console/pull/107
I mean, that would do the trick. Looks good to me, but I'm also no expert so I can't really judge the design.
There's also nk_style_push/pop_style_item, which would let you set style stuff in general per-widget. Dunno how best you'd write an API for that in nuklear_console, but might be something worth considering.
Just wondering if there's a way to set the font for individual widgets in a window, or for a whole window, and if not, is it alright if I request this as a feature?