Property definitions

sdl2 $ SDLMouseButtonEvent :: defaultinit
# Mouse button event
#
# This could as well be an abstract class. All instances of `SDLMouseButtonEvent`
# is either a `SDLMouseButtonUpEvent` or a `SDLMouseButtonDownEvent`.
extern class SDLMouseButtonEvent
	super SDLMouseEvent

	# Index of the button
	#
	# ~~~raw
	# 1 -> left button
	# 2 -> center button
	# 3 -> right button
	# ~~~
	fun button: Int `{ return self->button.button; `}

	# Is the button currently pressed down?
	fun pressed: Bool `{ return self->button.state == SDL_PRESSED; `}

	# Number of clicks (1 or 2)
	fun clicks: Int `{ return self->button.clicks; `}

	redef fun x `{ return self->button.x; `}

	redef fun y `{ return self->button.y; `}
end
lib/sdl2/events.nit:197,1--222,3