Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

GUI2K4.UT2K4Tab_PlayerLoginControlsOnslaught


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
// ====================================================================
// Tab for login/midgame menu that has all the important clickable controls
// This is the Onslaught version (has changes to work with Onslaught map tab)
//
// Written by Matt Oelfke
// (C) 2003, Epic Games, Inc. All Rights Reserved
// ====================================================================

class UT2K4Tab_PlayerLoginControlsOnslaught extends UT2K4Tab_PlayerLoginControls;

function bool ButtonClicked(GUIComponent Sender)
{
    local PlayerController PC;

    PC = PlayerOwner();
    if ( GUITabControl(MenuOwner) != None && GUITabControl(MenuOwner).TabStack.Length > 0 &&
        GUITabControl(MenuOwner).TabStack[0] != None && GUITabControl(MenuOwner).TabStack[0].MyPanel != None )
    {
        if (Sender == i_JoinRed)
        {
            //hack to avoid bug where map is shown twice on listen/standalone games due to the game
            //being paused while in the menus
            if (PC.Level.NetMode != NM_Client && ONSPlayerReplicationInfo(PC.PlayerReplicationInfo) != None)
                ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).ShowMapOnDeath = MAP_Never;

            //Join Red team
            if ( PC != None && (PC.PlayerReplicationInfo == None || PC.PlayerReplicationInfo.Team == None
                 || PC.PlayerReplicationInfo.Team.TeamIndex != 0) )
                PC.ChangeTeam(0);
            GUITabControl(MenuOwner).ActivateTab(GUITabControl(MenuOwner).TabStack[0], true);

            if (PC.Level.NetMode != NM_Client && ONSPlayerReplicationInfo(PC.PlayerReplicationInfo) != None)
                ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).ShowMapOnDeath = ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).default.ShowMapOnDeath;
        }
        else if (Sender == i_JoinBlue)
        {
            //hack to avoid bug where map is shown twice on listen/standalone games due to the game
            //being paused while in the menus
            if (PC.Level.NetMode != NM_Client && ONSPlayerReplicationInfo(PC.PlayerReplicationInfo) != None)
                ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).ShowMapOnDeath = MAP_Never;

            //Join Blue team
            if ( PC != None && (PC.PlayerReplicationInfo == None || PC.PlayerReplicationInfo.Team == None
                 || PC.PlayerReplicationInfo.Team.TeamIndex != 1) )
                PC.ChangeTeam(1);
            GUITabControl(MenuOwner).ActivateTab(GUITabControl(MenuOwner).TabStack[0], true);

            if (PC.Level.NetMode != NM_Client && ONSPlayerReplicationInfo(PC.PlayerReplicationInfo) != None)
                ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).ShowMapOnDeath = ONSPlayerReplicationInfo(PC.PlayerReplicationInfo).default.ShowMapOnDeath;
        }
        else
            return Super.ButtonClicked(Sender);
    }
    else
        return false;

    return true;
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Tue 24/10/2006 17:13:14.000 - Creation time: Wed 7/2/2007 19:16:57.765 - Created with UnCodeX