rott/kf_sources/KFMapVoteV2/Classes/MVCountColumnListBox.uc
2026-07-14 20:27:09 +07:00

42 lines
1.1 KiB
Ucode

// ====================================================================
// Modified by Marco
// ====================================================================
class MVCountColumnListBox extends MapVoteCountMultiColumnListBox;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
DefaultListClass = string(Class'MVCountColumnList');
Super.InitComponent(MyController, MyOwner);
if( PlayerOwner().PlayerReplicationInfo.bAdmin )
ContextMenu.AddItem("Admin Force Map");
}
function InternalOnClick(GUIContextMenu Sender, int Index)
{
if (Sender != None)
{
if ( NotifyContextSelect(Sender, Index) )
return;
switch (Index)
{
case 0:
if( MapVotingPage(MenuOwner) != none )
MapVotingPage(MenuOwner).SendVote(self);
break;
case 1:
Controller.OpenMenu( string(Class'MVMapInfoPage'), MapVoteCountMultiColumnList(List).GetSelectedMapName() );
break;
case 2:
if( KFMapVotingPageX(MenuOwner) != none )
KFMapVotingPageX(MenuOwner).SendAdminSwitch(self);
break;
}
}
}
defaultproperties
{
}