Jump to content

dxDrawLine buggy


Gallagher

Recommended Posts

because it only works in 1280x1024 Resolution

1280x720 and the lines are wrong?

local bX, bY = guiGetScreenSize()  
local lineColor = tocolor(112, 203, 84) 
function drawLinesAcrossScreen() 
    dxDrawLine(bX-1540, bY-680, 60, 350, tocolor(112, 203, 84), 2) 
    dxDrawLine(bX-1520, bY-680, 80, 350, tocolor(112, 0, 84), 2) 
    dxDrawLine(bX-1518, bY-678, 58, 222, tocolor(112, 203, 84), 2) 
  
end 
addEventHandler("onClientRender", root, drawLinesAcrossScreen) 

Link to comment

I'm confused, why are you subtracting 1280 with 1540? That'll be a negative value...

Here's an example of how I make it look the same on all resolutions. Do note that there are more advanced techniques that may yield better results. 50p is probably the guy you'll want to talk with about that :P

dxDrawImage(screenX*(1007/1360), screenY*(5/768), screenX*(150/1360), screenY*(150/768), "Images/Profile.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) 

1360 and 768 being the native resolution. That meaning, the resolution the GUI was designed on.

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