diff options
| author | Amir Rajan <[email protected]> | 2021-01-18 12:08:34 -0600 |
|---|---|---|
| committer | Amir Rajan <[email protected]> | 2021-01-18 12:08:34 -0600 |
| commit | a4b9c048a1d751f5226833bb0c527ba1a8ac5d09 (patch) | |
| tree | 3f2535e7a6272e796d50e7f07c906d4c9eb1b14a /dragon/inputs.rb | |
| parent | a24a71805b1924ae7f80776c736f94575c171d2c (diff) | |
| download | dragonruby-game-toolkit-contrib-a4b9c048a1d751f5226833bb0c527ba1a8ac5d09.tar.gz dragonruby-game-toolkit-contrib-a4b9c048a1d751f5226833bb0c527ba1a8ac5d09.zip | |
Synced with 2.3.
Diffstat (limited to 'dragon/inputs.rb')
| -rw-r--r-- | dragon/inputs.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dragon/inputs.rb b/dragon/inputs.rb index 13cfe06..5d1727b 100644 --- a/dragon/inputs.rb +++ b/dragon/inputs.rb @@ -525,6 +525,10 @@ module GTK point.point_inside_circle? center, radius end + def intersect_rect? other_rect + { x: point.x, y: point.y, w: 0, h: 0 }.intersect_rect? other_rect + end + alias_method :position, :point def clear @@ -583,6 +587,7 @@ module GTK :moved_at, :global_moved_at, :touch_order, + :first_tick_down, :x, :y def initialize @@ -590,6 +595,7 @@ module GTK @moved_at = 0 @global_moved_at = 0 @touch_order = 0 + @first_tick_down = true @x = 0 @y = 0 end |
