FlyingSpoon Posted March 6, 2016 Share Posted March 6, 2016 Hey there, I am using the basic way to set for all screens - local sx,sy = guiGetScreenSize() local px,py = 1024,760 local x,y = (sx/px), (sy/py) GUIEditor.staticimage[2] = guiCreateStaticImage(x*300, y*250, x*420, y*240, "img/login.png", false) It works great on my screen, but for others it comes out weird. Any way I can fix this? When I try with his resolution 1600x900 it comes out weird on my screen. Any solutions? Link to comment
SpecT Posted March 6, 2016 Share Posted March 6, 2016 As I can see you used guieditor. Why didn't you set the position to relative (from the right click menu) ? Link to comment
stevensalvaro Posted March 7, 2016 Share Posted March 7, 2016 If you want gui / dx fit to the screen , Just use your guiGetScreenSize , Example: local width,height = guiGetScreenSize() guiCreateStaticImage(0,0,width,height,"[File_Path]",false) It's will make the gui fit to the screen Link to comment
ArminFx Posted March 10, 2016 Share Posted March 10, 2016 Hey there,I am using the basic way to set for all screens - local sx,sy = guiGetScreenSize() local px,py = 1024,760 local x,y = (sx/px), (sy/py) GUIEditor.staticimage[2] = guiCreateStaticImage(x*300, y*250, x*420, y*240, "img/login.png", false) It works great on my screen, but for others it comes out weird. Any way I can fix this? When I try with his resolution 1600x900 it comes out weird on my screen. Any solutions? Test: local px,py = 1360,768 Link to comment
GTX Posted March 11, 2016 Share Posted March 11, 2016 Variables px and py must be your resolution. Link to comment
stevensalvaro Posted March 11, 2016 Share Posted March 11, 2016 Why people still using px , py , it's "guiGetScreenSize()" on the script .. , it's will automaticlly get screen size Link to comment
GTX Posted March 12, 2016 Share Posted March 12, 2016 Why people still using px , py , it's "guiGetScreenSize()" on the script .. , it's will automaticlly get screen size They're all used to calculate position (even px and py) to fit all screens based on wiki: https://wiki.multitheftauto.com/wiki/Gu ... esolutions It's just reversed formula, the result is the same. 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