Jump to content

calculating gui.


Stevenn

Recommended Posts

Posted

Okay so, I've made a gui in guieditor, which fits my resolution (1680x1050) and I thought I had it right calculated but it isn't, if I change toa lower resolution the gui is totally fucked up.

I'm sure I've calculated it right since I used a calculator.

local sWidth,sHeight = guiGetScreenSize() 
  
  
GUIEditor_Window[1] = guiCreateWindow(sWidth-956,sHeight-692,sWidth-1213,sHeight-868,"Login Window",false) 
GUIEditor_Label[1] = guiCreateLabel(22,29,71,22,"Username:",false,GUIEditor_Window[1]) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"center") 
GUIEditor_Label[2] = guiCreateLabel(22,85,70,20,"Password:",false,GUIEditor_Window[1]) 
GUIEditor_Memo[1] = guiCreateMemo(84,77,109,33,"",false,GUIEditor_Window[1]) 
GUIEditor_Memo[2] = guiCreateMemo(86,23,109,33,"",false,GUIEditor_Window[1]) 
GUIEditor_Button[1] = guiCreateButton(99,137,91,36,"Login",false,GUIEditor_Window[1]) 
GUIEditor_Button[2] = guiCreateButton(217,138,91,35,"Forgot my details",false,GUIEditor_Window[1]) 
GUIEditor_Button[3] = guiCreateButton(334,138,91,35,"Register",false,GUIEditor_Window[1]) 
GUIEditor_Label[3] = guiCreateLabel(206,25,221,31,"- Enter your username here.",false,GUIEditor_Window[1]) 
GUIEditor_Label[4] = guiCreateLabel(203,85,221,31,"- Enter your password here.",false,GUIEditor_Window[1]) 

Posted (edited)

You can change all in settings guieditor.

Like save only in relative.

But you need load this code in guieditor.

Edited by Guest
Posted

You can do this way too:

( 956 / 1680 ) * sWidth, ( 692 / 1050 ) * sHeight, ( 1213 / 1680 ) * sWidth, ( 868 / 1050 ) * sHeight 

It ever works for me.

Posted

Run guieditor -> right mouse click -> settings -> Default screen output type: select relative.

right mouse click -> Load code ->( select ) -> ( ok you load ) -> right mouse click -> output code or print code.( select what you want )

it's easy way.

Draken, nope :)

P.S Updated

Posted
Run guieditor -> right mouse click -> settings -> Default screen output type: select relative.

right mouse click -> Load code ->( select ) -> ( ok you load ) -> right mouse click -> output code or print code.( select what you want )

it's easy way.

Draken, nope :)

P.S Updated

Wow, didn't know it was that easy! thanks!

Posted
You can do this way too:
( 956 / 1680 ) * sWidth, ( 692 / 1050 ) * sHeight, ( 1213 / 1680 ) * sWidth, ( 868 / 1050 ) * sHeight 

It ever works for me.

Sorry for bumping, but I found this alot more effective thanks draken!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...