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

JBAddonLlama.JBGUIPanelConfigLlama


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
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
//=============================================================================
// JBGUIPanelConfigLlama
// Copyright 2003 by Wormbo <wormbo@onlinehome.de>
// $Id: JBGUIPanelConfigLlama.uc,v 1.13 2004/05/31 19:46:51 wormbo Exp $
//
// User interface panel for Llama Hunt configuration.
//=============================================================================


class JBGUIPanelConfigLlama extends JBGUIPanelConfig;


//=============================================================================
// Variables
//=============================================================================

var private bool bInitialized;  // used to prevent executing SaveINISettings() during initialization

var automated GUILabel               RewardLabel;
var automated JBGUIComponentTrackbar RewardAdrenaline;
var automated JBGUIComponentTrackbar RewardHealth;
var automated JBGUIComponentTrackbar RewardShield;
var automated JBGUIComponentTrackbar MaxLlamaDuration;
var automated moCheckbox             LlamaizeOnJailDisconnect;


//=============================================================================
// InitComponent
//
// Loads the configurable values.
//=============================================================================

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
  Super.InitComponent(MyController, MyOwner);
  
  LoadINISettings();
}

//=============================================================================
// LoadINISettings
//
// Loads the values of all config GUI controls.
//=============================================================================

function LoadINISettings()
{
  bInitialized = False;
  RewardAdrenaline.SetValue(class'JBAddonLlama'.default.RewardAdrenaline);
  RewardHealth.SetValue(class'JBAddonLlama'.default.RewardHealth);
  RewardShield.SetValue(class'JBAddonLlama'.default.RewardShield);
  MaxLlamaDuration.SetValue(class'JBAddonLlama'.default.MaximumLlamaDuration);
  LlamaizeOnJailDisconnect.Checked(class'JBAddonLlama'.default.bLlamaizeOnJailDisconnect);
  bInitialized = True;
}


//=============================================================================
// SaveINISettings
//
// Called when a value of a control changed.
// Saves the values of all config GUI controls.
//=============================================================================

function SaveINISettings(GUIComponent Sender)
{
  if ( !bInitialized )
    return;
  
  class'JBAddonLlama'.default.RewardAdrenaline          = RewardAdrenaline.GetValue();
  class'JBAddonLlama'.default.RewardHealth              = RewardHealth.GetValue();
  class'JBAddonLlama'.default.RewardShield              = RewardShield.GetValue();
  class'JBAddonLlama'.default.MaximumLlamaDuration      = MaxLlamaDuration.GetValue();
  class'JBAddonLlama'.default.bLlamaizeOnJailDisconnect = LlamaizeOnJailDisconnect.IsChecked();
  class'JBAddonLlama'.static.StaticSaveConfig();
}


//=============================================================================
// ResetConfiguration
//
// Resets the configurable properties to their default values.
//=============================================================================

function ResetConfiguration()
{
  class'JBAddonLlama'.static.ResetConfig();
  LoadINISettings();
}


//=============================================================================
// Default properties
//=============================================================================

defaultproperties
{
  Begin Object Class=JBGUIComponentTrackbar Name=trkMaximumLlamaDuration
    WinTop    =0.0 // row 1
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    CaptionWidth  = -1;
    SliderWidth   = 0.34;
    EditBoxWidth  = 0.18;
  
    Caption="Llama Hunt duration"
    Hint="Maximum duration of a llama hunt."
    MinValue=10
    MaxValue=120
    bIntegerOnly=True
    OnChange=SaveINISettings
  End Object
  MaxLlamaDuration = trkMaximumLlamaDuration
  
  Begin Object Class=GUILabel Name=LlamaKillRewardLabel
    WinTop    =0.2 // row 2
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    Caption="Rewards for killing a Llama:"
    TextColor = (R=255,G=255,B=255);
  End Object
  RewardLabel = LlamaKillRewardLabel
  
  Begin Object Class=JBGUIComponentTrackbar Name=trkRewardAdrenaline
    WinTop=0.3
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    CaptionWidth  = -1;
    SliderWidth   = 0.34;
    EditBoxWidth  = 0.18;
    LeftIndent    = 0.05

    Caption="Adrenaline"
    Hint="Adrenaline gained for killing a llama."
    MinValue=0
    MaxValue=100
    bIntegerOnly=True
    OnChange=SaveINISettings
  End Object
  RewardAdrenaline = trkRewardAdrenaline
  
  Begin Object Class=JBGUIComponentTrackbar Name=trkRewardHealth
    WinTop=0.45
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    CaptionWidth  = -1;
    SliderWidth   = 0.34;
    EditBoxWidth  = 0.18;
    LeftIndent    = 0.05

    Caption="Health"
    Hint="Health gained for killing a llama."
    MinValue=0
    MaxValue=199
    bIntegerOnly=True
    OnChange=SaveINISettings
  End Object
  RewardHealth = trkRewardHealth
  
  Begin Object Class=JBGUIComponentTrackbar Name=trkRewardShield
    WinTop=0.6
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    CaptionWidth  = -1;
    SliderWidth   = 0.34;
    EditBoxWidth  = 0.18;
    LeftIndent    = 0.05
    
    Caption="Shield"
    Hint="Shield gained for killing a llama."
    MinValue=0
    MaxValue=150
    bIntegerOnly=True
    OnChange=SaveINISettings
  End Object
  RewardShield = trkRewardShield
  
  Begin Object Class=moCheckbox Name=chkLlamaizeOnJailDisconnect
    WinTop    =0.8
    WinLeft   =0.0
    WinHeight =0.1
    WinWidth  =1.0
    Caption="Llamaize players who disconnect in jail"
    Hint="Llamaize players who disconnect while jailed and reconnect to gain freedom."
    OnChange=SaveINISettings
  End Object
  LlamaizeOnJailDisconnect = chkLlamaizeOnJailDisconnect
  
  WinTop=0.330
  WinLeft=0.360
  WinWidth=0.610
  WinHeight=0.600
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mo 31.5.2004 21:46:52.000 - Creation time: Do 14.8.2014 09:58:42.406 - Created with UnCodeX