krutopride.blogg.se

Adjust desktop size and position
Adjust desktop size and position









adjust desktop size and position

You can allow users to choose their preferred window size in the app's settings. In addition, if you want to dynamically set your window size according to the user's desktop resolution and DPI, you can use setMinSize(). You can set min_size and max_size to the same values and force your app window to always load with identical dimensions, or you can set the useDefaultSizeAndLocation to true, when calling the obtainDeclaredWindow() function. You can also do the following when handling window sizes: Set default window sizeĪs the size flag only applies during the first time you open the window, you can force create the new window using the default size/position. While the most commonly used window size would be 1366×768, the optimal size would be 1200×700, which better supports a wider variety of resolutions. While Overwolf is handling the huge variety of user specs and screen resolutions, it's still important to pick the optimal size for your app’s windows. In-game resolution change – Register to the () event to get updated in-game resolution.ĭesktop /out-of-game resolution change – There's no way to detect a change in desktop resolution, you’ll have to check each time your app launches by using getMonitorsList().Ĭorrect planning is critical for your app's development process. In order to detect whether a user has changed their resolution: If your screen is scaled by a DPI factor, you should work with logical sizes, as the regular sizes will wound up being scaled in proportion, while the logical is not DPI aware.

adjust desktop size and position

These fields return the game's reported logical pixel dimensions. The GameInfo object sent by the getRunningGameInfo() function has, in addition to the expected width and height fields, two more properties called logicalWidth and logicalHeight. In addition, it returns also the monitorHandle, which can be used to get the monitor the game runs in. Game resolution can be detected by using (). "Screen resolution", which is the operating system's default desktop resolution, and "game resolution" which is the resolution in which they play their game and can be different from the desktop setting.ĭesktop resolution can be detected by using (). Users have two relevant resolutions to consider: Setting window resolution and position whether it's in-game or in desktop requires you to first get the user's current screen resolution.











Adjust desktop size and position