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

UMenu.UMenuRaisedButton


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
class UMenuRaisedButton extends UWindowButton;

var int Index;

function Created()
{
    Super.Created();

    TextX = 0;
    TextY = 0;
    Font = F_Normal;
    TextColor.R = 0;
    TextColor.G = 0;
    TextColor.B = 0;
}

function BeforePaint(Canvas C, float X, float Y)
{
    local float W, H;

    Super.BeforePaint(C, X, Y);

    WinHeight = 18;

    TextSize(C, Text, W, H);

    TextY = (WinHeight - H) / 2;

    switch(Align)
    {
    case TA_Left:
        TextX = 3;
        break;
    case TA_Right:
        TextX = WinWidth - W - 3;
        break;
    case TA_Center: 
        TextX = (WinWidth - W) / 2;
        break;
    }
}

function Paint(Canvas C, float X, float Y)
{
    if(bMouseDown)
    {
        DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 1);
    } else if (bDisabled) {
        DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 1);
    } else {
        DrawMiscBevel(C, 0, 0, WinWidth, WinHeight, LookAndFeel.Misc, 0);
    }

    Super.Paint(C, X, Y);
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:27:50.000 - Creation time: za 22-4-2006 13:29:32.562 - Created with UnCodeX