Switching to hardcoded callback functions. Selection tools are working with callbacks
This commit is contained in:
parent
109fd96b67
commit
eac8610456
17 changed files with 486 additions and 429 deletions
|
|
@ -16,11 +16,14 @@ class RectSelectTool : public DrawingProgramToolBase {
|
|||
virtual void draw(SkCanvas* canvas, const DrawData& drawData) override;
|
||||
virtual void switch_tool(DrawingProgramToolType newTool) override;
|
||||
virtual bool prevent_undo_or_redo() override;
|
||||
virtual void input_key_callback(const InputManager::KeyCallbackArgs& key) override;
|
||||
virtual void input_mouse_button_on_canvas_callback(const InputManager::MouseButtonCallbackArgs& button) override;
|
||||
virtual void input_mouse_motion_callback(const InputManager::MouseMotionCallbackArgs& motion) override;
|
||||
private:
|
||||
struct RectSelectControls {
|
||||
int selectionMode = 0;
|
||||
bool isSelecting = false;
|
||||
CoordSpaceHelper coords;
|
||||
Vector2f selectStartAt;
|
||||
std::array<Vector2f, 4> newT;
|
||||
Vector2f selectEndAt;
|
||||
} controls;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue