diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-10 13:53:06 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-08-12 11:13:52 +0200 |
commit | b64e858af397e51c1f1bad95a1747a54a85ab744 (patch) | |
tree | 9ebfee051a86b16906ab850eb75af0d1bc70b98c /plugingui/drumkittab.h | |
parent | 3d218d5991a253f8d6a12db73908bead34d3e2da (diff) |
Add instrument label and highlight of drums.
Diffstat (limited to 'plugingui/drumkittab.h')
-rw-r--r-- | plugingui/drumkittab.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugingui/drumkittab.h b/plugingui/drumkittab.h index 89f37be..cd1d731 100644 --- a/plugingui/drumkittab.h +++ b/plugingui/drumkittab.h @@ -55,12 +55,16 @@ public: void resize(std::size_t width, std::size_t height) override; void buttonEvent(ButtonEvent* buttonEvent) override; void scrollEvent(ScrollEvent* scrollEvent) override; + void mouseLeaveEvent() override; void loadImageFiles(std::string const& image_file, std::string const& map_file); private: - float current_velocity = .5; + float current_velocity{.5}; + std::string current_instrument{""}; + std::unordered_map<Colour, std::string, ColourHasher> colour_to_instrument; + bool shows_overlay{false}; std::unique_ptr<Image> drumkit_image; std::unique_ptr<Image> map_image; @@ -68,6 +72,7 @@ private: int drumkit_image_y; Label velocity_label{this}; + Label instrument_name_label{this}; Settings& settings; // SettingsNotifier& settings_notifier; @@ -75,6 +80,7 @@ private: void triggerAudition(int x, int y); void updateVelocityLabel(); + void updateInstrumentLabel(); }; } // GUI:: |