Rust.Community icon indicating copy to clipboard operation
Rust.Community copied to clipboard

Get Player's Screen Resolution/Aspect Ratio

Open jacobcoughenour opened this issue 8 years ago • 2 comments

This is a small request, but could we get a way to retrieve the client's screen resolution or aspect ratio (width/height), maybe even their UI Scale setting? Just having the client's aspect ratio would help in making cleaner CUI interfaces that are consistent and adapt properly across different resolutions and aspect ratios.

Here are some posts from oxidemod.org asking for this: http://oxidemod.org/threads/getting-clients-screen-resolution.18428/ http://oxidemod.org/threads/checking-the-players-resolution.21254/ http://oxidemod.org/threads/adapt-cui-to-resolution.23584/ http://oxidemod.org/threads/getting-users-resolution.19236/

jacobcoughenour avatar Oct 25 '17 17:10 jacobcoughenour

This is a small request, but could we get a way to retrieve the client's screen resolution or aspect ratio (width/height), maybe even their UI Scale setting? Just having the client's aspect ratio would help in making cleaner CUI interfaces that are consistent and adapt properly across different resolutions and aspect ratios.

Here are some posts from oxidemod.org asking for this: http://oxidemod.org/threads/getting-clients-screen-resolution.18428/ http://oxidemod.org/threads/checking-the-players-resolution.21254/ http://oxidemod.org/threads/adapt-cui-to-resolution.23584/ http://oxidemod.org/threads/getting-users-resolution.19236/

Use offsets See what i make with offsets, adaptive https://vk.com/rustycode?w=wall-146090202_365

bazuka5801 avatar Mar 05 '19 19:03 bazuka5801

a little late to the party, but this thread shed some more light on it: https://umod.org/community/rust/39660-proper-cui-documentation

jamesalbert avatar Mar 30 '24 00:03 jamesalbert