XeRo Posted July 26, 2015 Share Posted July 26, 2015 Hi How to guigetScreenSize ? GUIEditor.staticimage[1] = guiCreateStaticImage(217, 79, 647, 558, "panel.png", false) Link to comment
Dealman Posted July 26, 2015 Share Posted July 26, 2015 What do you mean? Look at guiGetScreenSize for examples on how it works. Link to comment
XeRo Posted July 26, 2015 Author Share Posted July 26, 2015 What do you mean? Look at guiGetScreenSize for examples on how it works. i'm noob sorry please retry edit my code help Link to comment
LabiVila Posted July 26, 2015 Share Posted July 26, 2015 do a: local x,y = guiGetScreenSize () then if your resolution is 1024x768 you do this: 217/1024 = 0.2119140625 79/768 = 0.1028645833333333 647/1024 = 0.6318359375 558/768 = 0.7265625 after you get it done, you go like this: guiCreateStaticImage (x*0.2119140625, y*0.102864583, x*0.6318359375, y*0.7265625, "panel.png", false) you can keep as much decimal numbers as you want, but the more the numbers the better Link to comment
HUNGRY:3 Posted July 26, 2015 Share Posted July 26, 2015 this is my way.. it works for all the reslutions local screenW, screenH = guiGetScreenSize() GUIEditor.staticimage[1] = guiCreateStaticImage((217/1920)*screenW, (79/1080)*screenH, 647, 558, "panel.png", false) Link to comment
XeRo Posted July 26, 2015 Author Share Posted July 26, 2015 (edited) do a: local x,y = guiGetScreenSize () then if your resolution is 1024x768 you do this: 217/1024 = 0.2119140625 79/768 = 0.1028645833333333 647/1024 = 0.6318359375 558/768 = 0.7265625 after you get it done, you go like this: guiCreateStaticImage (x*0.2119140625, y*0.102864583, x*0.6318359375, y*0.7265625, "panel.png", false) you can keep as much decimal numbers as you want, but the more the numbers the better oh Thanks. Help me GUIEditor.staticimage[2] = guiCreateStaticImage(0, 0, 231, 768, "menu.png", false) Edited July 26, 2015 by Guest Link to comment
Gr0x Posted July 26, 2015 Share Posted July 26, 2015 You got 2 advices on how to do it. Do it yourself, so you can learn it. If you can't make it, post what you tried, and I'll help you. Link to comment
XeRo Posted July 26, 2015 Author Share Posted July 26, 2015 You got 2 advices on how to do it. Do it yourself, so you can learn it. If you can't make it, post what you tried, and I'll help you. Oke. Sorry Link to comment
KariiiM Posted July 26, 2015 Share Posted July 26, 2015 Hey, look what i am going to do and try to learn from that First of all you've to get your screen "Resolution" ,if you created the gui in another resolution and tried to do your current resolution ,it won't works as it must be like,and it will shows for you in another place,anyway --put here your resolution, for example if it's 800x600. local screenX =800 --put 800 here local screenY = 600 -- put 600 in screenY local sx, sy = guiGetScreenSize() local x, y = sx/screenX, sy/screenY --Now let's add them in the gui: GUIEditor.staticimage[1] = guiCreateStaticImage(217*x, 79*y, 647*x, 558*y, "panel.png", false) I thinks it's easy to understand and easy way. 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