mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Piano: Highlight pressed key in roll widget
This commit is contained in:
parent
0c5497829e
commit
01bff0141e
6 changed files with 25 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "KeysWidget.h"
|
||||
#include "Music.h"
|
||||
#include <LibGUI/ScrollableWidget.h>
|
||||
|
||||
|
@ -37,6 +38,9 @@ class RollWidget final : public GUI::ScrollableWidget {
|
|||
public:
|
||||
virtual ~RollWidget() override;
|
||||
|
||||
const KeysWidget* keys_widget() const { return m_keys_widget; }
|
||||
void set_keys_widget(const KeysWidget* widget) { m_keys_widget = widget; }
|
||||
|
||||
private:
|
||||
explicit RollWidget(TrackManager&);
|
||||
|
||||
|
@ -45,6 +49,7 @@ private:
|
|||
virtual void mousewheel_event(GUI::MouseEvent&) override;
|
||||
|
||||
TrackManager& m_track_manager;
|
||||
const KeysWidget* m_keys_widget;
|
||||
|
||||
int m_roll_width { 0 };
|
||||
int m_num_notes { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue