Jump to content

guiGetScreenSize


#Honda-R

Recommended Posts

Hey, i have problem

i play on 1024 x 768

And heres code

dxDrawText(nick, 272, 212, 479, 241, tocolor(255, 255, 255, 255), 2.00, "default-bold", "left", "top", false, false, false, true, true) 

I put in in GUI

and like i said when i play on 1024 x 768 its fits to gui

but like in 800x600 or others , it dont fits!

How to do it fits on all resolutions.

Link to comment

If your trying to put it in the middle:

     
function mydx() 
    local width,height = 479, 241 
  
    local rx, ry = guiGetScreenSize() 
    local x,y = (rx/2-width/2), (ry/2-height/2) 
  
    dxDrawText(nick, x, y, width, height , tocolor(255, 255, 255, 255), 2.00, "default-bold", "left", "top", false, false, false, true, true) 
-- (rx/2-width/2), (ry/2-height/2) 
end 

You'll have to adjust it until the width and height are pretty exact.

Link to comment

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...