Guys, could you help me adjust the draw to all screen resolutions, or explain on the fingers how it should work, I use the.
But it still does not work.
local x, y = math.max (ScrW () * 0.66, 800) method, math.max ( ScrH () * 0.8, 600)
Here is my code that does not adapt.
draw.RoundedBox( 0, x*0.04, y*0.04, 355, 150, Color( 0, 0, 0, 125) )-- background
draw.RoundedBox( 0, x*0.04,y*0.04, 355, 30, Color( 0, 0, 0, 180 ) )-- background Законы города
draw.RoundedBox( 0, x*0.04,y*0.29, 355, 1, defaultcolor)
draw.RoundedBox( 0, x*0.46,y*0.04, 1, 151, defaultcolor)
draw.RoundedBox( 0, x*0.04,y*0.04, 1, 151, defaultcolor)
draw.RoundedBox( 0, x*0.04,y*0.04, 355, 1, defaultcolor)
draw.RoundedBox( 0, x*0.04,y*0.09, 355, 3, defaultcolor)
draw.DrawText( "Законы города", "open_sans_25b", x* 0.043, y * 0.045, defaultcolor, TEXT_ALIGN_LEFT )
draw.DrawNonParsedText(text, "open_sans_19b", x* 0.0437, y * 0.1, Color(0, 0, 0, 170), 0)
draw.DrawNonParsedText(text, "open_sans_19b", x* 0.0437, y * 0.1, Color(0, 0, 0, 100), 0)
draw.DrawNonParsedText(text, "open_sans_19b", x* 0.0437, y * 0.1, colour.white, 0)
Please explain how this should work properly.
...ok why do you even do all those math operations * 0.0437 or * 0.04?? Thats super useless, for you, and for the pc that calculates that. Fitting a HUD or whatever on every resolution if super simple if you understand how to use + and -
https://www.youtube.com/watch?v=UK-9ZRpBkLs
Sorry, you need to Log In to post a reply to this thread.