Jump to content

screen resolution


Chaos

Recommended Posts

Posted

hey,

i'm trying to set dx Rectangle for all screen resolution and this script it's working perfect in the corner

but when i change the positions 84 and 48 (trying to move it) won't be set for all all screen resolution any help ?

sWidth, sHeight = guiGetScreenSize() -- Getting the screen size 
function draw()  
dxDrawRectangle(sWidth-84,sHeight-48,78.0,33.0,tocolor(0,0,0,150),false) 
  
end 
addEventHandler("onClientRender", root, draw) 
  

Posted

2. Divide each of the DX text's position values by the screen size manually (remembering the resolution is 1024x768):

Left position value is 684, 684/1024 = 0.668

Top position value is 731, 731/768 = 0.952

Right position values is 732, 732/1024 = 0.715

Bottom position value is 766, 766/768 = 0.997

You may want to use a calculator to help you count.

See the bolded text.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...