Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
// ============================================================================ // JBGUIPanelConfigAvenger (formerly JBGUIPanelConfigBerserker) // Copyright 2003 by Christophe "Crokx" Cros <crokx@beyondunreal.com> // $Id: JBGUIPanelConfigAvenger.uc,v 1.3 2004/05/23 12:43:57 tarquin Exp $ // // Options for the Avenger add-on. // ============================================================================ class JBGUIPanelConfigAvenger extends JBGUIPanelConfig; //============================================================================= // Constants //============================================================================= const CONTROL_COMBO_TIME_MULT = 0; const CONTROL_COMBO_TIME_MAX = 1; const CONTROL_COMBO_POWERUP = 2; // ============================================================================ // Variables // ============================================================================ var JBGUIComponentTrackbar SliderTimeMultiplier; var JBGUIComponentTrackbar SliderTimeMax; var moComboBox ComboBoxPowerType; var localized string SecondsText; var localized string ComboBoxText[5]; var private bool bInitialized; // used to prevent saving config during initialization // ============================================================================ // InitComponent // // Create the windows components. // ============================================================================ function InitComponent(GUIController MyController, GUIComponent MyOwner) { //local Object TestClass; local int i; Super.InitComponent(MyController, MyOwner); // Berserk Time Multiplier SliderTimeMultiplier = JBGUIComponentTrackbar(Controls[CONTROL_COMBO_TIME_MULT]); // Max Berserk Time SliderTimeMax = JBGUIComponentTrackbar(Controls[CONTROL_COMBO_TIME_MAX]); // combo box ComboBoxPowerType = moComboBox(Controls[CONTROL_COMBO_POWERUP]); for( i=0; i<ArrayCount(ComboBoxText) ; i++) ComboBoxPowerType.AddItem(ComboBoxText[i]); LoadINISettings(); // class list: xPlayer.defaults.ComboNameList /* foreach AllObjects(class'Object', TestClass) { if( Class(TestClass) != None ) { if( ClassIsChildOf( Class(TestClass), class'Combo')) { log("JB AVENGER: got"@string(TestClass.name)); } // execute something here // WON'T WORK: these classes are not loaded! } } */ } // ============================================================================ // SaveINISettings // // Called when the user changes any component value. // ============================================================================ function SaveINISettings(GUIComponent Sender) { if ( !bInitialized ) return; class'JBAddonAvenger'.default.PowerTimeMultiplier = int(SliderTimeMultiplier.GetValue()); class'JBAddonAvenger'.default.PowerTimeMaximum = int(SliderTimeMax.GetValue()); class'JBAddonAvenger'.default.PowerComboIndex = ComboBoxPowerType.GetIndex(); class'JBAddonAvenger'.static.StaticSaveConfig(); } //============================================================================= // LoadINISettings // // Loads the values of all config GUI controls. //============================================================================= function LoadINISettings() { bInitialized = False; SliderTimeMultiplier.SetValue(class'JBAddonAvenger'.default.PowerTimeMultiplier); SliderTimeMax.SetValue(class'JBAddonAvenger'.default.PowerTimeMaximum); ComboBoxPowerType.SetIndex(class'JBAddonAvenger'.default.PowerComboIndex); bInitialized = True; } // ============================================================================ // ResetConfiguration // // When you click on Reset button. // ============================================================================ function ResetConfiguration() { class'JBAddonAvenger'.static.ResetConfiguration(); LoadINISettings(); } // ============================================================================ // Default properties // ============================================================================ /* from xPLayer: ComboNameList(0)="XGame.ComboSpeed" ComboNameList(1)="XGame.ComboBerserk" ComboNameList(2)="XGame.ComboDefensive" ComboNameList(3)="XGame.ComboInvis" */ defaultproperties { SecondsText = "seconds" Begin Object Class=JBGUIComponentTrackbar Name=BerserkTimeMultiplierEditSlider WinTop =0.0 // row 1 WinLeft =0.0 WinHeight =0.1 WinWidth =1.0 CaptionWidth = -1; SliderWidth = 0.34; EditBoxWidth = 0.18; Caption="Avenger time multiplier" Hint="Percentage of remaining arena time." MinValue=1 MaxValue=200 bIntegerOnly=True OnChange=SaveINISettings End Object Controls(0)=JBGUIComponentTrackbar'BerserkTimeMultiplierEditSlider' Begin Object Class=JBGUIComponentTrackbar Name=BerserkTimeMaxEditSlider WinTop =0.2 // row 2 WinLeft =0.0 WinHeight =0.1 WinWidth =1.0 CaptionWidth = -1; SliderWidth = 0.34; EditBoxWidth = 0.18; Caption="Maximum avenger time" Hint="Maximum seconds of avenger time." MinValue=10 MaxValue=60 bIntegerOnly=True OnChange=SaveINISettings End Object Controls(1)=JBGUIComponentTrackbar'BerserkTimeMaxEditSlider' Begin Object class=moComboBox Name=PowerUpTypeComboBox WinTop = 0.4; // row 3 WinLeft = 0.0; WinWidth = 1.0; WinHeight = 0.1; CaptionWidth = 0.48; Caption="Avenger power" Hint="The power-up the arena winner gets." bHeightFromComponent = False; OnChange=SaveINISettings End Object Controls(2)=moComboBox'PowerUpTypeComboBox' ComboBoxText(0)="Speed" ComboBoxText(1)="Berserk" ComboBoxText(2)="Booster" ComboBoxText(3)="Invisible" ComboBoxText(4)="Random" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |