Skip to content

Add onHover() and notHovered() - #2

Open
elias-pie wants to merge 6 commits into
MrCoachFowler:mainfrom
elias-pie:main
Open

Add onHover() and notHovered()#2
elias-pie wants to merge 6 commits into
MrCoachFowler:mainfrom
elias-pie:main

Conversation

@elias-pie

@elias-pie elias-pie commented Jan 29, 2026

Copy link
Copy Markdown
  • Added onHover() under PageElements.py
    • Default behavior is to pass to prevent log spam, could very much conflict with clicks if something was printed (Log Spam)
  • Added notHovered() under PageElements.py
    • Default behavior is to pass
    • Could be useful with buttons or dynamically sizing elements
  • Added wasHovered() under Window.py
  • Added checkForHover() under Window.py

I am unaware on why the pr is reporting that everything under Examples changed, maybe the signature changed when running git clone?

Currently known issues:

  • If an object is hovered over and the window is unfocused, the program will still report hovered.
  • More of an oversight, window.checkForHover(screen) not in examples

citr0net and others added 5 commits January 28, 2026 17:58
* Added onHover() under PageElements.py
  * Default behavior is to pass to prevent log spam
* Added checkForHover() under Window.py
Unable to test due to Hyprland issues having restricted mouse control, specifically Wayland. Determined focus using pygame.mouse.get_focused()
Added a placeholder method 'notHovered' and modified 'onHover' to pass instead of printing a message.
@elias-pie elias-pie changed the title Add onHover() Add onHover() and notHovered() Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant