mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:27:44 +00:00
Piano: Fix insertion and deletion of notes
On mouse move the pressed button is not present in the event argument which causes the corresponding code to never fire. Instead it now stores the original mouse down event and acts according to that on mouse move.
This commit is contained in:
parent
4ab7216827
commit
815442b2b5
6 changed files with 71 additions and 46 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/SinglyLinkedList.h>
|
||||
#include <AK/Types.h>
|
||||
|
@ -50,6 +51,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Optional<RollNote> note_at(u32 time, u8 pitch) const;
|
||||
void set_note(RollNote note);
|
||||
// May do nothing; that's fine.
|
||||
void remove_note(RollNote note);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue