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

GUI2K4.UT2K4LadderVButton


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
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
//==============================================================================
// GUI button for a ladder entry
// Based on XIntaerface.LadderButton
//
// Written by Michiel Hendriks
// (c) 2003, Epic Games, Inc. All Rights Reserved
//==============================================================================

class UT2K4LadderVButton extends UT2K4LadderButton;

#EXEC OBJ LOAD FILE=UCGeneric.utx

function SetState(int Rung)
{
    local string NewStyleName;

    if (MatchInfo == None) 
    {
        Warn("MatchInfo == None");
        return;
    }

    // Set our state based on Rung
    // We Also set our Graphic
    if (Rung < MatchIndex)  // Match out of reach
    {
        //if (MatchInfo.ThumbnailInActive != none) Graphic = MatchInfo.ThumbnailInActive;
        //	else Graphic = Material(DynamicLoadObject("SinglePlayerThumbs."$MatchInfo.LevelName$"_G", class'Material', true));
        if (Graphic == none) Graphic = Material(DynamicLoadObject("SinglePlayerThumbs.Grey", class'Material', true));
        MenuState = MSAT_Disabled;
        NewStyleName="LadderButton";
        if (ProgresBar != none) ProgresBar.Image = PBNormal;
    }
    else
    {
        if (MyMapRecord.ScreenshotRef != "") Graphic = Material(DynamicLoadObject(MyMapRecord.ScreenshotRef, class'Material'));
        else Graphic = Material'UCGeneric.SolidColours.Black';
        MenuState = MSAT_Blurry;

        if (Rung == MatchIndex) NewStyleName="LadderButton";
            else NewStyleName="LadderButtonHi";
        if (ProgresBar != none) ProgresBar.Image = PBActive;
    }
    if (MaterialSequence(Graphic) != none) Graphic = MaterialSequence(Graphic).SequenceItems[0].Material;

    if (!(NewStyleName ~= StyleName))
    {
        StyleName = NewStyleName;
        if (Controller != none) Style = Controller.GetStyle(StyleName, FontScale);
        if (Style == None)
        {
            Log("UT2K4LadderButton.NewStyle IS None");
        }
    }
}

event SetVisibility(bool bIsVisible)
{
    super.SetVisibility(bIsVisible);
    if (ProgresBar != none) ProgresBar.SetVisibility(bIsVisible);
}

defaultproperties
{
     PBNormal=Texture'InterfaceContent.SPMenu.BarVertical'
     PBActive=Texture'InterfaceContent.SPMenu.BarVerticalHi'
     Graphic=Texture'SinglePlayerThumbs.Grey'
     bClientBound=True
     StyleName="LadderButton"
     WinWidth=0.090234
     WinHeight=0.113672
}

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:56.531 - Created with UnCodeX