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

XInterface.moSlider


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
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
//==============================================================================
//	Menu Option component for GUISliders
//
//	Created by Ron Prestenback
//	© 2003, Epic Games, Inc.  All Rights Reserved
//==============================================================================
class moSlider extends GUIMenuOption;

var(Option) float              MaxValue, MinValue, Value;
var(Option) bool               bIntSlider;
var(Option) string             SliderStyleName, SliderCaptionStyleName, SliderBarStyleName;
var(Option) noexport editconst GUISlider    MySlider;

function InitComponent(GUIController InController, GUIComponent InOwner)
{
    Super.InitComponent(InController, InOwner);

    SetReadOnly(bValueReadOnly);
}

function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
    if (GUISlider(NewComp) != None)
    {
        MySlider = GUISlider(NewComp);
        MySlider.MinValue = MinValue;
        MySlider.MaxValue = MaxValue;
        MySlider.bIntSlider = bIntSlider;
        MySlider.StyleName = SliderStyleName;
        MySlider.CaptionStyleName = SliderCaptionStyleName;
        MySlider.BarStyleName = SliderBarStyleName;
    }
    Super.InternalOnCreateComponent(NewComp, Sender);
}

function SetComponentValue(coerce string NewValue, optional bool bNoChange)
{
    if ( bNoChange )
        bIgnoreChange = True;

    SetValue(NewValue);

    bIgnoreChange = False;
}

function string GetComponentValue()
{
    return string(GetValue());
}

function Adjust(float Amount)
{
    if (MySlider != None)
        MySlider.Adjust(Amount);
}

function SetValue(coerce float NewV)
{
    if (MySlider != None)
        Value = MySlider.SetValue(NewV);
}

function float GetValue()
{
    if (MySlider != None)
        return MySlider.Value;

    return 0.0;
}

function Setup(coerce float MinV, coerce float MaxV, optional bool bInt)
{
    MinValue = MinV;
    MaxValue = MaxV;
    bIntSlider = bInt;

    if (MySlider != None)
    {
        MySlider.MinValue = MinValue;
        MySlider.MaxValue = MaxValue;
        MySlider.bIntSlider = bIntSlider;
    }
}

function InternalOnChange(GUIComponent Sender)
{
    Value = MySlider.Value;
    Super.InternalOnChange(Sender);
}

function SetReadOnly(bool b)
{
    Super.SetReadOnly(b);
    MySlider.SetReadOnly(b);
}

defaultproperties
{
     SliderStyleName="SliderKnob"
     SliderCaptionStyleName="SliderCaption"
     SliderBarStyleName="SliderBar"
     ComponentClassName="XInterface.GUISlider"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:30:40.000 - Creation time: Wed 7/2/2007 19:16:44.656 - Created with UnCodeX