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

XInterface.LadderButton


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
// XInterface.LadderButton
//
// A button that displays a gfx button with a map picture in it.
// The button is meant to be used by/for singleplayer ladders.
////////////////////////////////////////////////////////////////////

class LadderButton extends GUIGFXButton;

var MatchInfo MatchInfo;
var int MatchIndex;
var int LadderIndex;

function SetState(int Rung)
{
local string NewStyleName;

    if (MatchInfo == None)
        return;

    // Set our state based on Rung
    // We Also set our Graphic
    if (Rung < MatchIndex)  // Match out of reach
    {
        Graphic = Material(DynamicLoadObject("SinglePlayerThumbs."$MatchInfo.LevelName$"_G", class'Material', true));
        MenuState = MSAT_Disabled;
        NewStyleName="LadderButton";
    }
    else
    {
        Graphic = Material(DynamicLoadObject("SinglePlayerThumbs."$MatchInfo.LevelName, class'Material', true));
        MenuState = MSAT_Blurry;
        if (Rung == MatchIndex)
            NewStyleName="LadderButton";
        else
            NewStyleName="LadderButtonHi";
    }

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

defaultproperties
{
    Graphic=Material'SinglePlayerThumbs.Grey'
    Position=ICP_Scaled
    bClientBound=true
    bRepeatClick=false
    StyleName="LadderButton"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:28.000 - Creation time: Do 14.8.2014 09:58:43.561 - Created with UnCodeX