sapp: Add window position and screen size APIs#1416
Conversation
- Added sapp_set_window_position() to set the window top-left position. - Added sapp_screen_width() and sapp_screen_height() to query screen dimensions. - Win32 implementation uses MonitorFromWindow to return dimensions of the current monitor.
|
Thanks for the effort, I'll keep the PR open for other to use, but will not merge it into the main version. There will eventually be more control over window positioning, but it will likely be implemented alongside multiwindow support (which is more straightforward now with the re-designed sokol begin/end-pass functions. Another way to add missing functionality like this is to either create an 'extension header' which is included after the sokol_app.h implementation (and thus has access to private sokol_app.h functions and state), or create a separate library or helper functions which use the platform specific window handles (e.g. |
|
Thanks for taking a look and the advice! |
|
I created a repo to house my extensions : https://github.com/squk/sokol_utils |
EDIT: Checkout https://github.com/squk/sokol_utils
:)