Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to provide an offset the viewport #724

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

viseztrance
Copy link
Contributor

When displaying content like fullscreen games with a very wide or tall aspect ratio it's useful to add a black border to the sides of the screen.

Currently the viewport is hardcoded to always be aligned to the left. These changes allow a custom offset to be provided to the viewport (GL3 Backend).

For actual interaction like hover events etc, the user will need to ensure they're providing the offset the ProcessMouseMove() coords.

When displaying content like fullscreen games with a very wide or tall
aspect ratio it's useful to add a black border to the sides of the
screen.

Currently the viewport is hardecoded to always be aligned to the
left. These changes allow a custom offset to be provided to the
viewport (GL3 Backend).

For actual interaction like hover events etc, the user will need to
ensure they're providing the offset the `ProcessMouseMove()` coords.
@mikke89 mikke89 added enhancement New feature or request backends Platforms and renderers labels Jan 27, 2025
@mikke89 mikke89 merged commit 2197b4f into mikke89:master Jan 27, 2025
32 checks passed
@mikke89
Copy link
Owner

mikke89 commented Jan 27, 2025

Thanks for the PR! This is a nice addition.

@viseztrance viseztrance deleted the add-viewport-offset branch January 27, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backends Platforms and renderers enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants