Usage of 'display_density_scale'
Posted: Wed Dec 18, 2024 12:23 pm
Hi,
in 1.1, I'm used to adjust (GUI) coordinates like this:
I'm a little bit confused with the new (2.0) attribute 'display_density_scale' and its documentation. Is it meant to be used like this?
I'm concerned about two use-cases for seamless integration:
- providing width and height for a frame/flow control
- rendering objects on a surface
As I do not (yet) have access to a high-density display for testing/evaluating, I'm wondering if anybody has some experience with this...
TIA, chexx
in 1.1, I'm used to adjust (GUI) coordinates like this:
Code: Select all
local scale = player.display_scale
-- get/calculate some x/y
local pos = {x * scale, y * scale}
Code: Select all
local scale = player.display_scale
local density_scale = player.display_density_scale
-- get/calculate some x/y
local pos = {x * scale * density_scale, y * scale * density_scale}
- providing width and height for a frame/flow control
- rendering objects on a surface
As I do not (yet) have access to a high-density display for testing/evaluating, I'm wondering if anybody has some experience with this...
TIA, chexx