From 203639380dbaa022988a2469c8eebae716f4cde2 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 24 Sep 2016 11:47:23 +0100 Subject: [PATCH] Added mouse functions to doc/api.md --- doc/api.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/api.md b/doc/api.md index 5d8c4b6..51d1c7e 100644 --- a/doc/api.md +++ b/doc/api.md @@ -6,6 +6,7 @@ * [love.graphics](#lovegraphics) * [love.timer](#lovetimer) * [love.keyboard](#lovekeyboard) +* [love.mouse](#lovemouse) ##### [Objects](#objects-1) * [Image](#image) @@ -179,6 +180,21 @@ callbacks are called. Returns true if the key of the given scancode is currently down. +### love.mouse +##### love.mouse.getPosition() +Returns 2 values: the current horizontal and vertical position of the mouse. + +##### love.mouse.getX() +Returns the horizontal position of the mouse. + +##### love.mouse.getY() +Returns the vertical position of the mouse. + +##### love.mouse.isDown(button, ...) +Returns true if any of the given mouse buttons are currently pressed. `button` +should be the value `1` (left), `2` (right) or `3` (middle). + + ## Objects ### Image A loaded image or canvas which can be drawn.