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

JBAddonOvertimeLockdown.JBGUIPanelConfigOvertimeLockdown


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
// ============================================================================
// JBLocalMessageOvertimeLockdown - original by _Lynx
// Copyright 2006 by Jrubzjeknf <rrvanolst@hotmail.com>
// $Id: JBGUIPanelConfigOvertimeLockdown.uc,v 1.5 2007-03-31 14:55:00 jrubzjeknf Exp $
//
// Addon's GUI.
// ============================================================================


class JBGUIPanelConfigOvertimeLockdown extends JBGUIPanelConfig;


//=============================================================================
// Constants
//=============================================================================

const CONTROL_NO_ARENA_IN_OVERTIME  = 0;
const CONTROL_NO_ESCAPE_IN_OVERTIME = 1;
const CONTROL_LOCKDOWN_DELAY        = 2;


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

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

var automated moCheckbox             ch_NoArenaInOvertime;
var automated moCheckbox             ch_NoEscapeInOvertime;
var automated JBGUIComponentTrackbar tb_LockdownDelay;


// ============================================================================
// InitComponent
//
// Create the windows components.
// ============================================================================

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

  ch_NoArenaInOvertime  = moCheckBox(Controls[CONTROL_NO_ARENA_IN_OVERTIME]);
  ch_NoEscapeInOvertime = moCheckBox(Controls[CONTROL_NO_ESCAPE_IN_OVERTIME]);
  tb_LockdownDelay      = JBGUIComponentTrackbar(Controls[CONTROL_LOCKDOWN_DELAY]);

  LoadINISettings();
}


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

function LoadINISettings()
{
  bInitialized = False;

  ch_NoArenaInOvertime.Checked (class'JBAddonOvertimeLockdown'.default.bNoArenaInOvertime);
  ch_NoEscapeInOvertime.Checked(class'JBAddonOvertimeLockdown'.default.bNoEscapeInOvertime);
  tb_LockdownDelay.SetValue    (class'JBAddonOvertimeLockdown'.default.LockdownDelay);

  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'JBAddonOvertimeLockdown'.default.bNoArenaInOvertime  = ch_NoArenaInOvertime.IsChecked();
  class'JBAddonOvertimeLockdown'.default.bNoEscapeInOvertime = ch_NoEscapeInOvertime.IsChecked();
  class'JBAddonOvertimeLockdown'.default.LockdownDelay       = tb_LockdownDelay.GetValue();

  class'JBAddonOvertimeLockdown'.static.StaticSaveConfig();
}


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

function ResetConfiguration()
{
  class'JBAddonOvertimeLockdown'.static.ResetConfig();

  LoadINISettings();
}


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

defaultproperties
{
  Begin Object Class=moCheckBox Name=NoArenaInOvertimeCheckBox
    CaptionWidth=0.6
    Caption="No arena matches in Overtime"
    Hint="No arena matches will start when the game goes into overtime. Pending matches will be cancelled."
      WinTop   =0.015000
      WinLeft  =0.000000
      WinWidth =1.000000
      WinHeight=0.100000
    TabOrder=0
    OnChange=SaveINISettings
  End Object
  ch_NoArenaInOvertime=moCheckBox'JBaddonOvertimeLockdown.JBGUIPanelConfigOvertimeLockdown.NoArenaInOvertimeCheckBox'

  Begin Object Class=moCheckBox Name=NoEscapeInOvertimeCheckBox
    CaptionWidth=0.6
    Caption="No escapes in Overtime"
    Hint="Players who try to get out of jail during the Lockdown, will be killed."
      WinTop   =0.215000
      WinLeft  =0.000000
      WinWidth =1.000000
      WinHeight=0.100000
    TabOrder=1
    OnChange=SaveINISettings
  End Object
  ch_NoEscapeInOvertime=moCheckBox'JBaddonOvertimeLockdown.JBGUIPanelConfigOvertimeLockdown.NoEscapeInOvertimeCheckBox'

  Begin Object Class=JBGUIComponentTrackbar Name=LockdownDelayTrackBar
    CaptionWidth=-1
    Caption="Lockdown delay"
    Hint="How long normal overtime should last before before the lockdown kicks in."
      WinTop   =0.385000
      WinLeft  =0.000000
      WinWidth =1.000000
      WinHeight=0.100000
    TabOrder=3
    SliderWidth =0.34;
    EditBoxWidth=0.18;
    MinValue=0
    MaxValue=15
    bIntegerOnly=True
    OnChange=SaveINISettings
  End Object
  tb_LockdownDelay = LockdownDelayTrackBar
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sa 31.3.2007 16:57:58.000 - Creation time: Do 14.8.2014 09:58:42.412 - Created with UnCodeX