Stevor Posted February 22, 2021 Share Posted February 22, 2021 (edited) hello guys i created draw design it's XD and i use guieditor to create it but when i use guieditor i select in element ( Relative ) to be same scale in all screen's but right now i have problem in size here is an example of my screen, or similar screens ( This is the look I see and want for everyone ) https://prnt.sc/103qjru here example for other size screen ( here the shape is not suitable for the original design ) https://prnt.sc/103qspv How do I solve the problem (even if I have to change the design scheme) Edited February 22, 2021 by Stevor Link to comment
Tekken Posted February 22, 2021 Share Posted February 22, 2021 Here an very good tutorial: :) Link to comment
Stevor Posted February 23, 2021 Author Share Posted February 23, 2021 (edited) 21 hours ago, Tekken said: Here an very good tutorial: Thank you i see it now Does this mean that I will By manually measuring the size of each screen ? how to do with this local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawRectangle(screenW * 0.2787, screenH * 0.2767, screenW * 0.0675, screenH * 0.1189, tocolor(255, 255, 255, 255), false) dxDrawText("Text Here", screenW * 0.2787, screenH * 0.2767, screenW * 0.3463, screenH * 0.3956, tocolor(0, 0, 0, 255), 1.56, "default-bold", "center", "center", false, false, false, false, false) end ) Edited February 23, 2021 by Stevor Link to comment
Hydra Posted February 24, 2021 Share Posted February 24, 2021 For text to be good positioned I use this: local screenW, screenH = guiGetScreenSize() resW = screenW/1600 --(put your resolution here instead of 1600) resH = screenH/900 --(put your resolution here instead of 900) function a() dxDrawText("asd", screenW * 0.2000, screenH * 0.3000, screenW * 0.0350, screenH * 0.0350, tocolor(255, 255, 255, 255), 1.00*resW, "bankgothic", "left", "top", false, false, false, false) end -- I put *resW on the text scale Link to comment
Stevor Posted February 24, 2021 Author Share Posted February 24, 2021 (edited) 3 hours ago, Hydra said: For text to be good positioned I use this: local screenW, screenH = guiGetScreenSize() resW = screenW/1600 --(put your resolution here instead of 1600) resH = screenH/900 --(put your resolution here instead of 900) function a() dxDrawText("asd", screenW * 0.2000, screenH * 0.3000, screenW * 0.0350, screenH * 0.0350, tocolor(255, 255, 255, 255), 1.00*resW, "bankgothic", "left", "top", false, false, false, false) end -- I put *resW on the text scale thx it's work can i do same thing with dxDrawRectangle to be in same Size and Place ? Edited February 24, 2021 by Stevor Link to comment
Hydra Posted February 24, 2021 Share Posted February 24, 2021 1 hour ago, Stevor said: thx it's work can i do same thing with dxDrawRectangle to be in same Size and Place ? Yes it's possible to do that with rectangle too Link to comment
Stevor Posted February 24, 2021 Author Share Posted February 24, 2021 24 minutes ago, Hydra said: Yes it's possible to do that with rectangle too dxDrawRectangle(screenW * 0.2787, screenH * 0.2767, screenW * 0.0675, screenH * 0.1189, tocolor(255, 255, 255, 255), false) this is the Rectangle where i can set resW Link to comment
Stevor Posted February 27, 2021 Author Share Posted February 27, 2021 On 24/02/2021 at 22:15, Hydra said: mostly at x and y dxDrawRectangle(resW * 0.2787, resH * 0.2767, screenW * 0.0675, screenH * 0.1189, tocolor(255, 255, 255, 255), false) like this ? 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