Here's the function that's not working (as TextListCtrl). I'll try GuiContextMenuCtrl and see if it works, it should anyways. It's a Drop menu for the Gui based Event Control system.
PHP Code:
function onDropDownMenu( obj ) {
new GuiScrollCtrl("ETDropMenu_Scroll") {
profile = GuiBlueScrollProfile;
showTop();
x = mousescreenx - 8;
y = mousescreeny - 8;
height = (obj == ETControl_TextList1 ? 70 : 140 );
width = 120;
hscrollbar = "alwaysOff";
vscrollbar = "alwaysOff";
new GuiTextListCtrl("ETDropMenu") {
showtop();
profile = GuiBlueTextListProfile;
height = (obj == ETControl_TextList1 ? 70 : 140 );
width = 120;
thiso.catchevent( this.name, "onSelect" , "onDropMenuAction" );
thiso.catchevent( this.name, "onMouseLeave", "onDropDestroy" );
clearrows();
}
}
if ( obj == ETControl_TextList1 ) {
ETDropMenu.addrow( 0, "Run Event" );
ETDropMenu.addrow( -1, "-" );
ETDropMenu.addrow( 1, "Add to favorites" );
ETDropMenu.addrow( 2, "Remove from favorites" );
}
else {
ETDropMenu.addrow( 0, "Set as Winner" );
ETDropMenu.addrow( 1, "Add player to event" );
ETDropMenu.addrow( 2, "Disqualify player" );
ETDropMenu.addrow( -1, "-" );
ETDropMenu.addrow( 3, "Summon Player" );
ETDropMenu.addrow( 4, "Warp to Player" );
ETDropMenu.addrow( 5, "Freeze Player" );
ETDropMenu.addrow( 6, "Unfreeze Player" );
}
ETDropMenu.setselectedrow( -1 );
}