x3 spaces -> x4 spaces

This commit is contained in:
Shtoyan 2022-01-22 02:17:48 +04:00
parent 63c3907378
commit 9d74b68fb6

View File

@ -1,304 +1,304 @@
class NiceGUISettings extends UT2K4TabPanel; class NiceGUISettings extends UT2K4TabPanel;
// GENERAL WEAPON SETTINGS // GENERAL WEAPON SETTINGS
var automated GUISectionBackground bg_WEAP; var automated GUISectionBackground bg_WEAP;
var automated moCheckBox ch_WeapManagement; var automated moCheckBox ch_WeapManagement;
var automated moCheckBox ch_AltSwitches; var automated moCheckBox ch_AltSwitches;
var automated moCheckBox ch_DispCounters; var automated moCheckBox ch_DispCounters;
var automated moCheckBox ch_DisWeapProgress; var automated moCheckBox ch_DisWeapProgress;
var automated moCheckBox ch_ShowHLMessages; var automated moCheckBox ch_ShowHLMessages;
// WEAPON RELOAD SETTINGS // WEAPON RELOAD SETTINGS
var automated GUISectionBackground bg_RELOAD; var automated GUISectionBackground bg_RELOAD;
var automated moCheckBox ch_CancelFire; var automated moCheckBox ch_CancelFire;
var automated moCheckBox ch_CancelSwitching; var automated moCheckBox ch_CancelSwitching;
var automated moCheckBox ch_CancelNades; var automated moCheckBox ch_CancelNades;
var automated moCheckBox ch_CancelAiming; var automated moCheckBox ch_CancelAiming;
var automated moCheckBox ch_ReloadWontWork; var automated moCheckBox ch_ReloadWontWork;
// RANDOM SETTINGS // RANDOM SETTINGS
var automated GUISectionBackground bg_RANDOM; var automated GUISectionBackground bg_RANDOM;
var automated MoComboBox mo_ZedHPBars; var automated MoComboBox mo_ZedHPBars;
function InitComponent(GUIController MyController, GUIComponent MyOwner) function InitComponent(GUIController MyController, GUIComponent MyOwner)
{ {
super.InitComponent(MyController, MyOwner); super.InitComponent(MyController, MyOwner);
mo_ZedHPBars.AddItem("Big Zeds"); mo_ZedHPBars.AddItem("Big Zeds");
mo_ZedHPBars.AddItem("All Zeds"); mo_ZedHPBars.AddItem("All Zeds");
mo_ZedHPBars.AddItem("Disable"); mo_ZedHPBars.AddItem("Disable");
// GENERAL WEAPON SETTINGS // GENERAL WEAPON SETTINGS
bg_WEAP.ManageComponent(ch_WeapManagement); bg_WEAP.ManageComponent(ch_WeapManagement);
bg_WEAP.ManageComponent(ch_AltSwitches); bg_WEAP.ManageComponent(ch_AltSwitches);
bg_WEAP.ManageComponent(ch_DispCounters); bg_WEAP.ManageComponent(ch_DispCounters);
bg_WEAP.ManageComponent(ch_DisWeapProgress); bg_WEAP.ManageComponent(ch_DisWeapProgress);
bg_WEAP.ManageComponent(ch_ShowHLMessages); bg_WEAP.ManageComponent(ch_ShowHLMessages);
// WEAPON RELOAD SETTINGS // WEAPON RELOAD SETTINGS
bg_RELOAD.ManageComponent(ch_CancelFire); bg_RELOAD.ManageComponent(ch_CancelFire);
bg_RELOAD.ManageComponent(ch_CancelSwitching); bg_RELOAD.ManageComponent(ch_CancelSwitching);
bg_RELOAD.ManageComponent(ch_CancelNades); bg_RELOAD.ManageComponent(ch_CancelNades);
bg_RELOAD.ManageComponent(ch_CancelAiming); bg_RELOAD.ManageComponent(ch_CancelAiming);
bg_RELOAD.ManageComponent(ch_ReloadWontWork); bg_RELOAD.ManageComponent(ch_ReloadWontWork);
// RANDOM SETTINGS // RANDOM SETTINGS
bg_RANDOM.ManageComponent(mo_ZedHPBars); bg_RANDOM.ManageComponent(mo_ZedHPBars);
} }
function InternalOnLoadINI(GUIComponent sender, string s) function InternalOnLoadINI(GUIComponent sender, string s)
{ {
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(PlayerOwner()); nicePlayer = NicePlayerController(PlayerOwner());
if (nicePlayer == none) if (nicePlayer == none)
return; return;
switch(sender) switch(sender)
{ {
case ch_WeapManagement: case ch_WeapManagement:
ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement);
break; break;
case ch_AltSwitches: case ch_AltSwitches:
ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes); ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes);
break; break;
case ch_DispCounters: case ch_DispCounters:
ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters); ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters);
break; break;
case ch_DisWeapProgress: case ch_DisWeapProgress:
ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress); ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress);
break; break;
case ch_ShowHLMessages: case ch_ShowHLMessages:
ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages); ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages);
break; break;
case ch_CancelFire: case ch_CancelFire:
ch_CancelFire.Checked(nicePlayer.bRelCancelByFire); ch_CancelFire.Checked(nicePlayer.bRelCancelByFire);
break; break;
case ch_CancelSwitching: case ch_CancelSwitching:
ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching); ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching);
break; break;
case ch_CancelNades: case ch_CancelNades:
ch_CancelNades.Checked(nicePlayer.bRelCancelByNades); ch_CancelNades.Checked(nicePlayer.bRelCancelByNades);
break; break;
case ch_CancelAiming: case ch_CancelAiming:
ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming); ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming);
break; break;
case ch_ReloadWontWork: case ch_ReloadWontWork:
ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload);
break; break;
case mo_ZedHPBars: case mo_ZedHPBars:
mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle); mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle);
break; break;
} }
} }
function InternalOnChange(GUIComponent Sender) function InternalOnChange(GUIComponent Sender)
{ {
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(PlayerOwner()); nicePlayer = NicePlayerController(PlayerOwner());
if (nicePlayer == none) if (nicePlayer == none)
return; return;
switch(sender) switch(sender)
{ {
case ch_WeapManagement: case ch_WeapManagement:
nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked();
break; break;
case ch_AltSwitches: case ch_AltSwitches:
nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked()); nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked());
break; break;
case ch_DispCounters: case ch_DispCounters:
nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked()); nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked());
break; break;
case ch_DisWeapProgress: case ch_DisWeapProgress:
nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked()); nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked());
break; break;
case ch_ShowHLMessages: case ch_ShowHLMessages:
nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked()); nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked());
break; break;
case ch_CancelFire: case ch_CancelFire:
nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked(); nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked();
break; break;
case ch_CancelSwitching: case ch_CancelSwitching:
nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked(); nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked();
break; break;
case ch_CancelNades: case ch_CancelNades:
nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked(); nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked();
break; break;
case ch_CancelAiming: case ch_CancelAiming:
nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked(); nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked();
break; break;
case ch_ReloadWontWork: case ch_ReloadWontWork:
nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked());
break; break;
case mo_ZedHPBars: case mo_ZedHPBars:
nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex(); nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex();
break; break;
} }
nicePlayer.ClientSaveConfig(); nicePlayer.ClientSaveConfig();
} }
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) // size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// tab order // tab order
defaultproperties defaultproperties
{ {
// GENERAL WEAPON SETTINGS // GENERAL WEAPON SETTINGS
Begin Object Class=GUISectionBackground Name=WEAPBG Begin Object Class=GUISectionBackground Name=WEAPBG
Caption="General weapon settings" Caption="General weapon settings"
WinTop=0.012500 WinTop=0.012500
WinWidth=0.495000 WinWidth=0.495000
WinHeight=0.287500 WinHeight=0.287500
RenderWeight=0.100100 RenderWeight=0.100100
// OnPreDraw=WeaponsBG.InternalPreDraw // OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=WEAPBG.InternalPreDraw OnPreDraw=WEAPBG.InternalPreDraw
End Object End Object
bg_WEAP=WEAPBG bg_WEAP=WEAPBG
Begin Object Class=moCheckBox Name=WeaponManagement Begin Object Class=moCheckBox Name=WeaponManagement
Caption="Nice weapon management" Caption="Nice weapon management"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=WeaponManagement.InternalOnCreateComponent OnCreateComponent=WeaponManagement.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="If checked, NicePack will use it's own system to manage weapon switching" Hint="If checked, NicePack will use it's own system to manage weapon switching"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_WeapManagement=WeaponManagement ch_WeapManagement=WeaponManagement
Begin Object Class=moCheckBox Name=AltSwitches Begin Object Class=moCheckBox Name=AltSwitches
Caption="Alt fire switches modes" Caption="Alt fire switches modes"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=AltSwitches.InternalOnCreateComponent OnCreateComponent=AltSwitches.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_AltSwitches=AltSwitches ch_AltSwitches=AltSwitches
Begin Object Class=moCheckBox Name=DispCounters Begin Object Class=moCheckBox Name=DispCounters
Caption="Display counters" Caption="Display counters"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispCounters.InternalOnCreateComponent OnCreateComponent=DispCounters.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="Toggles display of the various counters used by skills" Hint="Toggles display of the various counters used by skills"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_DispCounters=DispCounters ch_DispCounters=DispCounters
Begin Object Class=moCheckBox Name=DispWeapProgress Begin Object Class=moCheckBox Name=DispWeapProgress
Caption="Display weapon progress" Caption="Display weapon progress"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispWeapProgress.InternalOnCreateComponent OnCreateComponent=DispWeapProgress.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_DisWeapProgress=DispWeapProgress ch_DisWeapProgress=DispWeapProgress
Begin Object Class=moCheckBox Name=ShowHLMessages Begin Object Class=moCheckBox Name=ShowHLMessages
Caption="Show Hardcore Level messages" Caption="Show Hardcore Level messages"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ShowHLMessages.InternalOnCreateComponent OnCreateComponent=ShowHLMessages.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="Enable to be notified each time Hardcore Level is changed" Hint="Enable to be notified each time Hardcore Level is changed"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_ShowHLMessages=ShowHLMessages ch_ShowHLMessages=ShowHLMessages
// WEAPON RELOAD SETTINGS // WEAPON RELOAD SETTINGS
Begin Object Class=GUISectionBackground Name=RELOADBG Begin Object Class=GUISectionBackground Name=RELOADBG
Caption="Weapon reload settings" Caption="Weapon reload settings"
WinTop=0.012500 WinTop=0.012500
WinLeft=0.505000 WinLeft=0.505000
WinWidth=0.495000 WinWidth=0.495000
WinHeight=0.287500 WinHeight=0.287500
RenderWeight=0.100100 RenderWeight=0.100100
// OnPreDraw=WeaponsBG.InternalPreDraw // OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=RELOADBG.InternalPreDraw OnPreDraw=RELOADBG.InternalPreDraw
End Object End Object
bg_RELOAD=RELOADBG bg_RELOAD=RELOADBG
Begin Object Class=moCheckBox Name=CancelFire Begin Object Class=moCheckBox Name=CancelFire
Caption="Cancel reload by shooting" Caption="Cancel reload by shooting"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelFire.InternalOnCreateComponent OnCreateComponent=CancelFire.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_CancelFire=CancelFire ch_CancelFire=CancelFire
Begin Object Class=moCheckBox Name=CancelSwitching Begin Object Class=moCheckBox Name=CancelSwitching
Caption="Cancel reload by switching weapons" Caption="Cancel reload by switching weapons"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelSwitching.InternalOnCreateComponent OnCreateComponent=CancelSwitching.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_CancelSwitching=CancelSwitching ch_CancelSwitching=CancelSwitching
Begin Object Class=moCheckBox Name=CancelNades Begin Object Class=moCheckBox Name=CancelNades
Caption="Cancel reload by throwing grenades" Caption="Cancel reload by throwing grenades"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelNades.InternalOnCreateComponent OnCreateComponent=CancelNades.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_CancelNades=CancelNades ch_CancelNades=CancelNades
Begin Object Class=moCheckBox Name=CancelAiming Begin Object Class=moCheckBox Name=CancelAiming
Caption="Cancel reload by aiming" Caption="Cancel reload by aiming"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelAiming.InternalOnCreateComponent OnCreateComponent=CancelAiming.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_CancelAiming=CancelAiming ch_CancelAiming=CancelAiming
Begin Object Class=moCheckBox Name=ServerReload Begin Object Class=moCheckBox Name=ServerReload
Caption="My reload doesn't work" Caption="My reload doesn't work"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ServerReload.InternalOnCreateComponent OnCreateComponent=ServerReload.InternalOnCreateComponent
IniOption="@Internal" IniOption="@Internal"
Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload"
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
ch_ReloadWontWork=ServerReload ch_ReloadWontWork=ServerReload
// RANDOM SETTINGS // RANDOM SETTINGS
Begin Object Class=GUISectionBackground Name=randbg Begin Object Class=GUISectionBackground Name=randbg
Caption="Random settings" Caption="Random settings"
WinTop=0.300000 WinTop=0.300000
WinWidth=0.495000 WinWidth=0.495000
WinHeight=0.287500 WinHeight=0.287500
WinLeft=0.505000 WinLeft=0.505000
RenderWeight=0.100100 RenderWeight=0.100100
// OnPreDraw=WeaponsBG.InternalPreDraw // OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=randbg.InternalPreDraw OnPreDraw=randbg.InternalPreDraw
End Object End Object
bg_RANDOM=randbg bg_RANDOM=randbg
Begin Object class=moComboBox Name=zedhbarpmethod Begin Object class=moComboBox Name=zedhbarpmethod
bReadOnly=true bReadOnly=true
CaptionWidth=0.000000 CaptionWidth=0.000000
Caption="Zed health bars" Caption="Zed health bars"
Hint="Choose what health bars you want to see" Hint="Choose what health bars you want to see"
OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent
OnChange=NiceGUISettings.InternalOnChange OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object End Object
mo_ZedHPBars=zedhbarpmethod mo_ZedHPBars=zedhbarpmethod
} }