Jump to content

Spawn Panel GUI Redesign


GerardWay

Recommended Posts

Hey, so I'm trying to redesign the GUI on a Spawn Panel, and I've used the GUI Editor to move around different parts of the old GUI, however, I have a problem.

In the original GUI, there are lines like

guiCreateWindow(0.0117,0.4284,0.3418,0.5443,"Spawn Selection",true) 

Which show numbers mainly based in decimals, as opposed to the output from the GUI Editor, which is like

GUIEditor.window[1] = guiCreateWindow(839, 0, 527, 763, "Spawn Selection", false) 

Therefore, whenever I replace the original numbers in the script with the numbers generated by the GUIEditor output, the GUI fails to appear or isn't drawn properly, how can I fix this?

Link to comment

Put "True" at end of GUIEditor line like this:

GUIEditor.window[1] = guiCreateWindow(839, 0, 527, 763, "Spawn Selection", true) 

This means that now "Relative" is changed to "True" which means that GUI pos should lie between 0 and 1, otherwise it is "False" which makes GUI pos depends on client's screen size. Check detailed explanation from Wiki:

relative: This is whether sizes and positioning are relative. If this is true, then all x,y,width,height floats must be between 0 and 1, representing sizes/positions as a fraction of the screen size. If false, then the size and co-ordinates are based on client's resolution, accessible using guiGetScreenSize. 

Link to comment

I don't recommend absoulte position at all. Relative is ok, but the best is guiGetScreenSize method. You can go on wiki, this feature can be done on GUI's. Just set the GUI's Position Code to center.

How?

1. Right click on gui

2. Click on set position code

3. Go to Presets and select Center

4. CliCk done

Link to comment

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...