diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-13 00:08:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-13 00:09:04 +0200 |
commit | 3d50f40396a6b8000fa267d51144cd983c7d4fea (patch) | |
tree | 1e52d44370ebd66386c7cb1cdc9aae7c426e9ce6 /Applications/PaintBrush/EllipseTool.h | |
parent | 58ee75c87a3e207e5d6388d026666211e5954264 (diff) | |
download | serenity-3d50f40396a6b8000fa267d51144cd983c7d4fea.zip |
PaintBrush: Add a "Move" tool for moving layers around :^)
Tool mouse event handlers now receive both a layer-relative mouse event
and the original event. This is needed for the move tool since it moves
the layer and thereby changes the origin of future events every time it
moves.
Diffstat (limited to 'Applications/PaintBrush/EllipseTool.h')
-rw-r--r-- | Applications/PaintBrush/EllipseTool.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/PaintBrush/EllipseTool.h b/Applications/PaintBrush/EllipseTool.h index 3638920bcd..3223404c91 100644 --- a/Applications/PaintBrush/EllipseTool.h +++ b/Applications/PaintBrush/EllipseTool.h @@ -37,9 +37,9 @@ public: EllipseTool(); virtual ~EllipseTool() override; - virtual void on_mousedown(Layer&, GUI::MouseEvent&) override; - virtual void on_mousemove(Layer&, GUI::MouseEvent&) override; - virtual void on_mouseup(Layer&, GUI::MouseEvent&) override; + virtual void on_mousedown(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override; + virtual void on_mousemove(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override; + virtual void on_mouseup(Layer&, GUI::MouseEvent& layer_event, GUI::MouseEvent& original_event) override; virtual void on_contextmenu(GUI::ContextMenuEvent&) override; virtual void on_second_paint(GUI::PaintEvent&) override; virtual void on_keydown(GUI::KeyEvent&) override; |