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.