Skip to content

Adding a New Theme

rsouth edited this page Sep 5, 2020 · 1 revision

a.k.a implementing a new Renderer

add the Theme to RenderingUtils::Theme

  const enum class Theme {
    Default, Sketchy, MyFunkyTheme
  };

add the Theme to MetaDataParser

  if ("MyFunkyTheme" == theme_name) {
    theme = RenderingUtils::Theme::MyFunkyTheme;
  }

create your rendering class

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.

add the Theme name to Theme Selector

In Sequencer.cpp:

  theme_selector->addItem("MyFunkyTheme");

That's it!

Re-usable methods e.g. calculations should be in RenderingUtils where possible.

🍒