-
Notifications
You must be signed in to change notification settings - Fork 0
Adding a New Theme
rsouth edited this page Sep 5, 2020
·
1 revision
a.k.a implementing a new Renderer
const enum class Theme {
Default, Sketchy, MyFunkyTheme
};
if ("MyFunkyTheme" == theme_name) {
theme = RenderingUtils::Theme::MyFunkyTheme;
}
Create your class, inheriting Renderer
, and implement Renderer's pure virtual functions
class MyFunkyThemeRenderer : public Renderer
and add your renderer to RendererFactory
.
See DefaultRenderer
and SketchyRenderer
for examples.
In Sequencer.cpp
:
theme_selector->addItem("MyFunkyTheme");
That's it!
Re-usable methods e.g. calculations should be in RenderingUtils
where possible.
🍒