mjau Posted January 4, 2012 Share Posted January 4, 2012 Hello today i was making a DX text for a script but when i tried making it fitting to every resoulotion it didnt do any difference And i can see i did it right since it still shows at the right place in 1024 x 768 wich i calculated it from But when i change resoulorion it moves .. DX code function DX() local sWidth,sHeight = guiGetScreenSize() DXText = dxDrawText(timeleft,sWidth-228,sHeight-597,sWidth-72,sHeight-545,tocolor(0,0,255,255),3.0,"default","left","top",false,false,false) end BTW the eventhandler is in a other part of the script no need for that Link to comment
Evil-Cod3r Posted January 4, 2012 Share Posted January 4, 2012 Way dont you use GuiSetScreenSize() ? Link to comment
mjau Posted January 5, 2012 Author Share Posted January 5, 2012 lolol there is no function named guisetscreensize and why the heck would i need it here ? Link to comment
Cadu12 Posted January 5, 2012 Share Posted January 5, 2012 LOLOLOL! Epic fail. There is no set screen, only it'll returns wight and height. Link to comment
bandi94 Posted January 5, 2012 Share Posted January 5, 2012 it move's bk its not the same i mean 1024-228 pixel and 860-228 pixel i think this is the problem but you can use guiCreateLabel whit bool relative true and then it will don't move Link to comment
Orange Posted January 5, 2012 Share Posted January 5, 2012 local sX, sY = guiGetScreenSize() local mX = 0,22265625 -- 228/1024 local mY = 0,77734375 -- 597/768 local dX = sX * mX local dY = sY * mY function DX() -- Modyfy 72, 545, it should be static on every resolution DXText = dxDrawText(timeleft, dX, dX, 72, 545, tocolor(0,0,255,255), 3.0, "default", "left", "top", false, false, false) end 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