SkatCh Posted June 11, 2014 Posted June 11, 2014 hi guys please how can i keep the same Gui Dimension , in evry resoultion , because my friend can't see some gui in my server . thank you and i am sorry about my english .
Max+ Posted June 11, 2014 Posted June 11, 2014 [quote name=..&G:..]You can use this... guiGetScreenSize He mean he has a resolution like 800-600 and they have 1366 - 768 who he can the gui work on both of them ,
SkatCh Posted June 11, 2014 Author Posted June 11, 2014 He mean he has a resolution like 800-600 and they have 1366 - 768 who he can the gui work on both of them , yes exactly , i create a Gui in my resolution which is 1366 - 768 , then when my friend login he can't see it in the same place like me .
Den. Posted June 11, 2014 Posted June 11, 2014 Use relative values, and guiGetScreenSize as D&G suggested: local sx, sy = guiGetScreenSize() local width, height = 0.5 * sx, 0.5 * sy local x, y = (0.5 * sx) - width/2, (0.5 * sy) - height/2
..:D&G:.. Posted June 11, 2014 Posted June 11, 2014 As I said, use guiGetScreenSize You will have to play around with the possitions, so you get the right possition of the gui
Moderators Citizen Posted June 11, 2014 Moderators Posted June 11, 2014 No, just use relative positions and sizes for all of your gui elements. What's the difference between relative and absolute ? The absolute positions and sizes are using pixels of the screen. So if you place a gui at position (960;50) and the player has a 800*600 screen display, then the gui will be placed too much on the right, litterally out of the screen. But relative positions and sizes uses percentages of the current screen (0 = 0% , 0.5 = 50% and 1 = 100%). So it doesn't even care of the number of pixels the current screen has. 50% of your screen will be 50% on every other screens. If you are using the guieditor resource (which I recommend), you can tell it to use relative or absolute values, so make sure everything is set on relative values (there are 2 of them, one for the parent (guis that are directly drawn on the screen) and children (guis that has another gui as parent). If you don't want to recreate your entire gui, then drop your code here, tell me what resolution you were using while making it and I'll convert it for you. Regards, Citizen
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