diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-16 01:12:49 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-08-12 11:13:52 +0200 |
commit | 1dfdc13bb191321a096ceae605b80bde0d627398 (patch) | |
tree | 8522ea4cdb4642061dcb8c86c4d27bdd1245f152 /plugingui/drumkittab.h | |
parent | 3f259e92bf1a25a8db521a587b6d612e356b22bc (diff) |
Better structures.
Diffstat (limited to 'plugingui/drumkittab.h')
-rw-r--r-- | plugingui/drumkittab.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/plugingui/drumkittab.h b/plugingui/drumkittab.h index 64806fd..1c99e6d 100644 --- a/plugingui/drumkittab.h +++ b/plugingui/drumkittab.h @@ -57,13 +57,29 @@ public: void scrollEvent(ScrollEvent* scrollEvent) override; void mouseLeaveEvent() override; - void loadImageFiles(std::string const& image_file, std::string const& map_file); + void init(std::string const& image_file, std::string const& map_file); private: float current_velocity{.5}; std::string current_instrument{""}; - std::unordered_map<Colour, std::string, ColourHasher> colour_to_instrument; + std::vector<Colour> colours; + std::vector<int> pos_to_colour_index; + std::vector<std::string> to_instrument_name; + + struct ColourInstrumentPair + { + Colour colour; + std::string instrument; + }; + // FIXME: load this from instrument file + std::vector<ColourInstrumentPair> colour_instrument_pairs = { + {Colour(0), "Snare"}, + {Colour(255./255, 15./255, 55./255), "KdrumL"}, + {Colour(154./255, 153./255, 33./255), "HihatClosed"}, + {Colour(248./255, 221./255, 37./255), "Tom4"} + }; + bool shows_overlay{false}; bool shows_instrument_overlay{false}; |