From e0d95a1135a20ba999298cc22fd3de8f5a9a9b7c Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 1 Feb 2020 22:40:14 +0100 Subject: [PATCH] include/Spectre/Input/Mouse.h: add getPositionAbs() to the interface. --- include/Spectre/Input/Mouse.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/Spectre/Input/Mouse.h b/include/Spectre/Input/Mouse.h index a560426..8d62feb 100644 --- a/include/Spectre/Input/Mouse.h +++ b/include/Spectre/Input/Mouse.h @@ -24,10 +24,13 @@ public : public : virtual ~Mouse(); - // Get mouse position + // Get the position in relative (focused window) coordinates. + // coordinates are relative to the window's top-left corner. virtual Vector2f getPosition() const = 0; - //virtual Vector2i getPositionAbs() const = 0; + // Get the position in absolute (screen) coordinates. + // 0,0 is located at the screen's top-left corner. + virtual Vector2f getAbsPosition() const = 0; virtual bool isButtonDown(Button button) const = 0;