Skip to content

Fix ImageMouseCursor position not adapting to scaling.#1278

Merged
benmoran56 merged 2 commits intopyglet:masterfrom
csd4ni3l:csd4ni3l-fix-image-mouse-cursor-scaling
Feb 16, 2025
Merged

Fix ImageMouseCursor position not adapting to scaling.#1278
benmoran56 merged 2 commits intopyglet:masterfrom
csd4ni3l:csd4ni3l-fix-image-mouse-cursor-scaling

Conversation

@csd4ni3l
Copy link
Copy Markdown
Contributor

ImageMouseCursor was not adapting to scaling which meant that the image position was incorrect.. This fixes that issue, by adding a _scaling property to the ImageMouseCursor, which is set by _on_internal_resize and set_mouse_cursor, but defaults to 1.0. The position of the image is then divided by the _scaling value, which makes the image be in the correct place.

- Rename _scaling to scaling
- in _on_internal_scale use -8192 to 8192 instead of -255 to 255
@benmoran56 benmoran56 merged commit 7157524 into pyglet:master Feb 16, 2025
16 checks passed
@csd4ni3l csd4ni3l deleted the csd4ni3l-fix-image-mouse-cursor-scaling branch March 6, 2025 21:03
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.

2 participants