From 863515c4770370d2c187894fba5f546eda11bf23 Mon Sep 17 00:00:00 2001 From: The Wobbler Date: Mon, 25 Mar 2024 17:18:54 +0100 Subject: [PATCH] Pygame Tools aktualisiert --- Pygame-Tools.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Pygame-Tools.md b/Pygame-Tools.md index a2b1961..1fa3054 100644 --- a/Pygame-Tools.md +++ b/Pygame-Tools.md @@ -1,3 +1,19 @@ ### Pygame Tools -The module pg.py contains some Pygame tools. \ No newline at end of file +The module pg.py contains some Pygame tools. + + +#### pg.Hover (class) + Checks if the mouse is hovering over an specified [pygame.Rect()](https://www.pygame.org/docs/ref/rect.html). +``` +Hover(rect) -> Hover +Hover(rect, function) -> Hover +Hover(rect, function, args) -> Hover +``` +    [pg.Hover.check](#check) + +
+
+ +#### check() +  Checks if the mouse is hovering over the rect. When the mouse is hovering over the rect, it returns True. If an additional function is given, it also executes the function.