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 |
class UMenuWeaponPriorityListArea extends UMenuDialogClientWindow; var UWindowWindow PriorityList; var class<UMenuWeaponPriorityListBox> PriorityListClass; var UWindowControlFrame Frame; var UWindowCheckbox AutoSwitchCheck; var localized string AutoSwitchText; var localized string AutoSwitchHelp; function Created() { Super.Created(); DesiredHeight = 200; DesiredWidth = 140; PriorityList = CreateControl(PriorityListClass, 10, 10, 100, 200); Frame = UWindowControlFrame(CreateWindow(class'UWindowControlFrame', 10, 10, 100, 200)); Frame.SetFrame(PriorityList); AutoSwitchCheck = UWindowCheckbox(CreateControl(class'UWindowCheckbox', 10, 120, 100, 1)); AutoSwitchCheck.bChecked = !GetPlayerOwner().bNeverAutoSwitch; AutoSwitchCheck.SetText(AutoSwitchText); AutoSwitchCheck.SetHelpText(AutoSwitchHelp); AutoSwitchCheck.SetFont(F_Normal); AutoSwitchCheck.Align = TA_Left; } function BeforePaint(Canvas C, float MouseX, float MouseY) { local float W; local float X; Super.BeforePaint(C, MouseX, MouseY); W = 130; X = Max((WinWidth - W)/2, 5); Frame.SetSize(W, WinHeight-50); Frame.WinLeft = X; AutoSwitchCheck.SetSize(W, 1); AutoSwitchCheck.WinLeft = X; AutoSwitchCheck.WinTop = WinHeight - 30; } function Notify(UWindowDialogControl C, byte E) { switch (E) { case DE_Change: switch (C) { case AutoSwitchCheck: AutoSwitchChange(); break; } } Super.Notify(C, E); } function AutoSwitchChange() { GetPlayerOwner().bNeverAutoSwitch = !AutoSwitchCheck.bChecked; GetPlayerOwner().NeverSwitchOnPickup(GetPlayerOwner().bNeverAutoSwitch); } function SaveConfigs() { Super.SaveConfigs(); GetPlayerOwner().SaveConfig(); } defaultproperties { PriorityListClass=Class'UMenu.UMenuWeaponPriorityListBox' AutoSwitchText="Auto-Switch Weapons" AutoSwitchHelp="Automatically switch to a higher priority weapon when you pick it up. If unchecked, you must switch to the new weapon manually." } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |