This command doesnt seem to be working... =\ heres an example that doesnt work for me. It's Briefed up a bit
PHP Code:
new GuiWindowCtrl("QMenu") {
for (temp.i = 0; temp.i < thiso.bags.size(); temp.i++){
new GuiBitmapCtrl("Bag_"@thiso.bags[temp.i]){
new GuiBitmapCtrl("BagIcon_"@thiso.bags[temp.i]) {
}
}
}
new GuiScrollCtrl("ItemsListScroll") {
}
}
GraalControl.addcontrol(QMenu);
}
//Seperate function
with (ItemsListScroll){
for (temp.i = 0; temp.i < makevar("thiso."@type).size(); temp.i++){
new GuiBitmapCtrl("Q_Slot_"@temp.i) {
new GuiShowImgCtrl("Q_Slot_Icon_"@temp.i) {
thiso.catchevent(name,"onMouseDown","onInvenDown")
}
}
}
}
}
//This is where the problem comes in:
function onInvenDown(obj){
GraalControl.addcontrol(obj);
}
//I have tried every different kind of combination. It still stays in the the parent it is in. I even tried:
//with (QMenu) GraalControl.addControl(ItemsListScroll);
//It wont add it to GraalControl. It is like stuck in there =(