Jump to content

Help Resolution..


Blinker.

Recommended Posts

hello , i've been working on how to make a text appear same at all resolutions and didn't get a result

if anyone could help me with that i would appreciate it.

function drawText() 
 local width1 = dxGetTextWidth(hexColorHome..homeName.."("..homeAlivePlayers..") ".."#ffffff "..displayHome, 1, 'default-bold') 
 local width2 = dxGetTextWidth(hexColorVisit..visitName.."("..visitAlivePlayers..") ".."#ffffff "..displayVisit, 1, 'default-bold') 
 width = width1 
 if width < width2 then 
  width = width2 
 end 
 local x = sW - 42 - width 
 dxDrawRectangle(x + 68,(sH/1.85)-50,width - 40,40, tocolor(0,0,0,120)) 
 dxDrawText ( hexColorHome..homeName.."("..homeAlivePlayers..") ".."#ffffff "..displayHome, x + 72, (sH/2.21)+5, x + width, sH, tocolor(255, 102, 1, 255), 1, "default-bold", 'left', 'top', false, false, false, true, true, 0, 0, 0) 
 dxDrawText ( hexColorVisit..visitName.."("..visitAlivePlayers..") ".."#ffffff "..displayVisit, x + 72, (sH/2.05)+5, x + width, sH, tocolor(255, 0, 0, 255), 1, "default-bold", 'left', 'top', false, false, false, true, true, 0, 0, 0) 
end 
addEventHandler("onClientRender", root, drawText) 

well , i tried it on 800x600 it works good, the text is in the rectangle but when i tried a lower or higher resolution i got a trouble the text isn't in the rectangle :?

please help.

thanks in advance

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