Panorama Direct Positioning

Alright so I'm a bit confused about this. My native resolution is 1920x1080 ( 16:10 ) and I'm using direct position (flow-children: none , by default).

I set position: 960px 540px 0px. Eg to position something in the center. This works. When i change resolution to 640x480 ( 4:3 ), then the ui system is adjusting my co ordinates, in the debugger its as if its scaled them down to fit the new resolution. Now this is fine for me, although would be nice to know how to turn that off, the problem is when i am working in 640x480 resolution, i can't use window co ordinates anymore so it becomes very hard to 'visualise' what i'm doing, if not impossible.

I also wonder how it decides for the clients how to interpret the positions which i set in the css file, does it interpret them for which ever is there native resolution, or always 1920x1080 and scale down? Perhaps i should ignore the resolution and focus it down to aspect ratio. My question is, which resolution is the mapping of the pixels specified in css file referring to? Its quite important for me, because the mod i'm making is depending on absolute screen co ordinates.


  • Posts: 16

    2 weeks later i've found the solution.

    Both x and y must be scaled with (current_height / 1080 ). So.

    Newx = x * (resolution_height / 1080) Newy = y * (resolution_height / 1080)

    Hope it helps anyone out there struggling