Blockland Forums > Modification Help
[Tutorial] Making a Gui
<< < (26/30) > >>
Greek2me:
I have a question for right now:

I am editing an existing GUI, the server password gui, and I can't make my button stay with the GUI- its a free button that is just floating there if I change the resolution.

So, my question is, how do I attach a button to an existing gui?

Here is the method I am using to get the button:

--- Code: ---ExampleGUIName.add(
new GuiCheckBoxCtrl()
{
//stuff here- removed for post//
}
);
--- End code ---
Gadgethm:
Parent it.  That will make it act like the parent is the screen, so it will follow the parent.
Greek2me:
But how do I parent it? Do I add Parent = "blah"; to the code?
AGlass0fMilk:

--- Quote from: Greek2me on August 28, 2010, 01:37:57 AM ---But how do I parent it? Do I add Parent = "blah"; to the code?

--- End quote ---
No, instead of guiname.add(newcontrol) do existingparent.add(newcontrol);

Existing parent could be any GUI control anywhere
ZSNO:
If you make a new guide add what an AltCommand does.
Navigation
Message Index
Next page
Previous page

Go to full version