Skip to content

Commit

Permalink
Clear drag_state if dragging_cancelled (#22)
Browse files Browse the repository at this point in the history
Clear drag_state on release if drag_cancelled
  • Loading branch information
Trevortni committed Jul 10, 2021
1 parent 141620d commit da4c35b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions in/cursor.script
Expand Up @@ -169,6 +169,8 @@ function update(self, dt)
if self.state.dragging then
clear_drag_state(self)
trigger_event(self, self.state.pressed_id, self.state.pressed_group, self.action, cursor.DRAG_END)
elseif self.state.dragging_cancelled then
clear_drag_state(self)
elseif self.state.pressed_id == self.state.over_id then
trigger_event(self, self.state.pressed_id, self.state.pressed_group, self.action, cursor.CLICKED)
end
Expand Down

0 comments on commit da4c35b

Please sign in to comment.