King12 Posted September 29, 2014 Share Posted September 29, 2014 I've made my dx window with guieditor, but it doesn't fit any resolutions since mine is 1920x1080 addEventHandler("onClientRender", root, function () dxDrawImage(1766, 0, 154, 1080, "images/background.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(1795, 925, 106, 100, "images/settings.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(1795, 143, 106, 100, "images/menu.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(1795, 522, 106, 111, "images/player.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("The time is:", 1760, 21, 1931, 52, tocolor(0, 0, 0, 255), 0.80, "bankgothic", "center", "top", false, false, true, true, false) dxDrawText("The time is:", 1759, 20, 1930, 51, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "top", false, false, true, true, false) dxDrawText(timenow or "Updating..", 1759, 51, 1930, 82, tocolor(255, 255, 255, 255), 0.80, "bankgothic", "center", "top", false, false, true, true, false) end ) Link to comment
Saml1er Posted September 29, 2014 Share Posted September 29, 2014 local sx,sy=guiGetScreenSize() local ax,ay = 1024,760 -- your screen resolution x and y, mine is 1024, 760 dxDrawImage(sx*(1795/ax),sy*( 522/ay),sx*( 106/ax),sy*( 111/ay), "images/player.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("The time is:", sx*(1760/ax),sy*( 21/ay),sx*( 1931/ax),sy*( 52/ay), tocolor(0, 0, 0, 255), sx*(0.80/ax), "bankgothic", "center", "top", false, false, true, true, false) A tip from me: Go to google.com and look for "How to google?" Link to comment
King12 Posted September 29, 2014 Author Share Posted September 29, 2014 Actually I googled it already, but I was to lazy to test everysingle code. Thanks a lot! 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