Quote:
Originally Posted by salesman
Just tested on Testbed because I was curious:
PHP Code:
//#CLIENTSIDE
function onCreated() {
// This doesn't work
temp.gui = new GuiWindowCtrl();
temp.gui.width = temp.gui.height = 256;
temp.gui.text = "Test!";
// but it works if you uncomment this line:
//GraalControl.addControl(temp.gui);
}
edit: I thought maybe it didn't work because the GuiControl was just destroyed as soon as the reference to temp.gui was lost (i.e. when onCreated() returns), but it didn't work if I maintained a reference either (such as with this.gui instead of temp.gui).
|
Yeah, that's the same thing I posted. And it makes sense too if you think about it, you can't just make it add to GraalControl by default, because what if you want to add it to another GuiControl rather than GraalControl?