Gallagher Posted January 30, 2014 Share Posted January 30, 2014 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
Gallardo9944 Posted January 30, 2014 Share Posted January 30, 2014 because you're using absolute values. You have to use relative ones, e.g. bX/10, etc, etc, etc Link to comment
Gallagher Posted January 30, 2014 Author Share Posted January 30, 2014 because you're using absolute values. You have to use relative ones, e.g. bX/10, etc, etc, etc how do I do that? Link to comment
Gallardo9944 Posted January 30, 2014 Share Posted January 30, 2014 how do I do that? because you're using absolute values. You have to use relative ones, e.g. bX/10, etc, etc, etc Link to comment
Karuzo Posted January 30, 2014 Share Posted January 30, 2014 dxDrawLine((bX-1540) / 10 , (bY-680) / 10, 60, 350, tocolor(112, 203, 84), 2) Just an exampe. Link to comment
Gallardo9944 Posted January 30, 2014 Share Posted January 30, 2014 KRZO, please, if you don't understand it, don't try to help. It's going to be even worse. Link to comment
Dealman Posted January 30, 2014 Share Posted January 30, 2014 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 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now