class

Egui::Canvas::Interaction

Inherits Reference < Object

Per-frame interaction report. Positions are in CANVAS pixels (already divided by the zoom scale), nil when the pointer is off the canvas.

Constructors

new(response : Egui::Response, pointer_px : Egui::Pos2 | Nil, dragging : Bool, drag_button : Symbol | Nil, drag_start_px : Egui::Pos2 | Nil, drag_started : Bool, drag_stopped : Bool, click_px : Egui::Pos2 | Nil, secondary_click_px : Egui::Pos2 | Nil, double_click_px : Egui::Pos2 | Nil)
Source

Instance methods

click_px

Completed clicks this frame (press+release inside the canvas).

Source
clicked_button

The button a click completed with (nil when no click this frame): :primary / :secondary.

Source
double_click_px
Source
drag_button

Which button a running drag started with (:primary draws with the fg color in Paint, :secondary with the bg color).

Source
drag_start_px
Source
drag_started?
Source
drag_stopped?
Source
dragging?
Source
pointer_px
Source
response
Source
secondary_click_px
Source