From be9e08c37b2ea7f98e8eb8766a1a021377b66929 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 14:14:36 +0400 Subject: [PATCH] less scrn hardcode, new guicbx copy-cat --- sources/GUI/NiceGUICheckBoxButton.uc | 13 +++++++++++ sources/GUI/NiceGUISettings.uc | 20 ++++++++-------- sources/GUI/NiceInvasionLoginMenu.uc | 23 ++++++++++--------- sources/NiceHumanPawn.uc | 6 ++--- sources/Perks/Firebug/NiceVetFirebug.uc | 2 +- sources/Weapons/NiceWeapon.uc | 4 ++-- sources/Weapons/Playable/Grenades/NiceNade.uc | 2 +- .../Incendiary/HuskGun/NiceHuskGunFire.uc | 2 +- 8 files changed, 43 insertions(+), 29 deletions(-) create mode 100644 sources/GUI/NiceGUICheckBoxButton.uc diff --git a/sources/GUI/NiceGUICheckBoxButton.uc b/sources/GUI/NiceGUICheckBoxButton.uc new file mode 100644 index 0000000..98a7150 --- /dev/null +++ b/sources/GUI/NiceGUICheckBoxButton.uc @@ -0,0 +1,13 @@ +class NiceGUICheckBoxButton extends GUICheckBoxButton; + +defaultproperties +{ + CheckedOverlay(0)=Texture'KF_InterfaceArt_tex.Menu.Checkbox' // checked + CheckedOverlay(1)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, mouse over + CheckedOverlay(2)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, focused + CheckedOverlay(3)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, clicked + CheckedOverlay(4)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, disabled + ImageIndex=0 + bAllOverlay=False + StyleName="CheckBox" +} \ No newline at end of file diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index 330ed1f..2ceaa06 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -157,7 +157,7 @@ defaultproperties Begin Object Class=moCheckBox Name=WeaponManagement Caption="Nice weapon management" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=WeaponManagement.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, NicePack will use it's own system to manage weapon switching" @@ -168,7 +168,7 @@ defaultproperties Begin Object Class=moCheckBox Name=AltSwitches Caption="Alt fire switches modes" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=AltSwitches.InternalOnCreateComponent IniOption="@Internal" Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" @@ -179,7 +179,7 @@ defaultproperties Begin Object Class=moCheckBox Name=DispCounters Caption="Display counters" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=DispCounters.InternalOnCreateComponent IniOption="@Internal" Hint="Toggles display of the various counters used by skills" @@ -190,7 +190,7 @@ defaultproperties Begin Object Class=moCheckBox Name=DispWeapProgress Caption="Display weapon progress" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=DispWeapProgress.InternalOnCreateComponent IniOption="@Internal" Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" @@ -201,7 +201,7 @@ defaultproperties Begin Object Class=moCheckBox Name=ShowHLMessages Caption="Show Hardcore Level messages" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=ShowHLMessages.InternalOnCreateComponent IniOption="@Internal" Hint="Enable to be notified each time Hardcore Level is changed" @@ -225,7 +225,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelFire Caption="Cancel reload by shooting" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelFire.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" @@ -236,7 +236,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelSwitching Caption="Cancel reload by switching weapons" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelSwitching.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" @@ -247,7 +247,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelNades Caption="Cancel reload by throwing grenades" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelNades.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" @@ -258,7 +258,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelAiming Caption="Cancel reload by aiming" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelAiming.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" @@ -269,7 +269,7 @@ defaultproperties Begin Object Class=moCheckBox Name=ServerReload Caption="My reload doesn't work" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=ServerReload.InternalOnCreateComponent 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" diff --git a/sources/GUI/NiceInvasionLoginMenu.uc b/sources/GUI/NiceInvasionLoginMenu.uc index 6f260a2..94e6868 100644 --- a/sources/GUI/NiceInvasionLoginMenu.uc +++ b/sources/GUI/NiceInvasionLoginMenu.uc @@ -8,16 +8,16 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){ local SRMenuAddition M; local int indexAfterScrn; // Setup panel classes. - Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks'); + Panels[0].ClassName = string(class'ScrnTab_MidGamePerks'); Panels[1].ClassName = string(class'NicePanelSkills'); - Panels[2].ClassName = string(Class'SRTab_MidGameVoiceChat'); - Panels[3].ClassName = string(Class'SRTab_MidGameStats'); - Panels[0].Caption = Class'KFInvasionLoginMenu'.Default.Panels[1].Caption; + Panels[2].ClassName = string(class'SRTab_MidGameVoiceChat'); + Panels[3].ClassName = string(class'SRTab_MidGameStats'); + Panels[0].Caption = class'KFInvasionLoginMenu'.Default.Panels[1].Caption; Panels[1].Caption = "Skills"; - Panels[2].Caption = Class'KFInvasionLoginMenu'.Default.Panels[2].Caption; - Panels[0].Hint = Class'KFInvasionLoginMenu'.Default.Panels[1].Hint; + Panels[2].Caption = class'KFInvasionLoginMenu'.Default.Panels[2].Caption; + Panels[0].Hint = class'KFInvasionLoginMenu'.Default.Panels[1].Hint; Panels[1].Hint = "Customize your perk"; - Panels[2].Hint = Class'KFInvasionLoginMenu'.Default.Panels[2].Hint; + Panels[2].Hint = class'KFInvasionLoginMenu'.Default.Panels[2].Hint; b_Spec.Caption=class'KFTab_MidGamePerks'.default.b_Spec.Caption; b_MatchSetup.Caption=class'KFTab_MidGamePerks'.default.b_MatchSetup.Caption; b_KickVote.Caption=class'KFTab_MidGamePerks'.default.b_KickVote.Caption; @@ -28,17 +28,18 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){ b_Settings.Caption=class'KFTab_MidGamePerks'.default.b_Settings.Caption; b_Browser.Caption=class'KFTab_MidGamePerks'.default.b_Browser.Caption; // Other panels - Panels[4].ClassName = "ScrnBalanceSrv.ScrnTab_Achievements"; + Panels[4].ClassName = string(class'ScrnTab_Achievements'); Panels[4].Caption = "Achievements"; Panels[4].Hint = "ScrN server-side achievements"; - if(default.bShowScrnMenu){ - Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings"; + if (default.bShowScrnMenu) + { + Panels[5].ClassName = string(class'ScrnTab_UserSettings'); Panels[5].Caption = "ScrN Features"; Panels[5].Hint = "ScrN Balance features, settings and info"; indexAfterScrn = 6; } else - indexAfterScrn = 5; + indexAfterScrn = 5; Panels[indexAfterScrn].ClassName = string(class'NiceGUISettings'); Panels[indexAfterScrn].Caption = "Nice settings"; Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator"; diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index ebbd6b0..a7dd51e 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -67,8 +67,8 @@ function ReplaceRequiredEquipment(){ Super.ReplaceRequiredEquipment(); RequiredEquipment[0] = String(class'NiceMachete'); RequiredEquipment[1] = String(class'Nice9mmPlus'); - RequiredEquipment[2] = String(class'ScrnBalanceSrv.ScrnFrag'); - RequiredEquipment[3] = String(class'ScrnBalanceSrv.ScrnSyringe'); + RequiredEquipment[2] = String(class'ScrnFrag'); + RequiredEquipment[3] = String(class'ScrnSyringe'); RequiredEquipment[4] = String(class'KFMod.Welder'); } simulated function int CalculateCalibrationScore(){ @@ -510,7 +510,7 @@ function bool AddInventory(inventory NewItem){ if((DualDeagle(weap) != none || Dual44Magnum(weap) != none || DualMK23Pistol(weap) != none) && weap.InventoryGroup != 4 ) { if(KFPRI != none && - ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnBalanceSrv.ScrnVetGunslinger')) + ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnVetGunslinger')) weap.InventoryGroup = 3; else weap.InventoryGroup = 2; diff --git a/sources/Perks/Firebug/NiceVetFirebug.uc b/sources/Perks/Firebug/NiceVetFirebug.uc index 6da1222..00e87f0 100644 --- a/sources/Perks/Firebug/NiceVetFirebug.uc +++ b/sources/Perks/Firebug/NiceVetFirebug.uc @@ -96,7 +96,7 @@ static function class GetNadeType(KFPlayerReplicationInfo KFPRI) //can't cook fire nades static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap) { - return GetNadeType(KFPRI) != class'ScrnBalanceSrv.ScrnFlameNade'; + return GetNadeType(KFPRI) != class'ScrnFlameNade'; } //v2.60: +60% faster charge with Husk Gun static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class Other) diff --git a/sources/Weapons/NiceWeapon.uc b/sources/Weapons/NiceWeapon.uc index 3adda40..efc2a0a 100644 --- a/sources/Weapons/NiceWeapon.uc +++ b/sources/Weapons/NiceWeapon.uc @@ -1626,8 +1626,8 @@ defaultproperties { recordedZoomTime=-1.000000 SecondaryCharge=1 - LaserAttachmentClass=Class'ScrnBalanceSrv.ScrnLaserAttachmentFirstPerson' - LaserDotClass=Class'ScrnBalanceSrv.ScrnLocalLaserDot' + LaserAttachmentClass=Class'ScrnLaserAttachmentFirstPerson' + LaserDotClass=Class'ScrnLocalLaserDot' LaserAttachmentBone="LightBone" MagazineBone="Magazine" bHasChargePhase=True diff --git a/sources/Weapons/Playable/Grenades/NiceNade.uc b/sources/Weapons/Playable/Grenades/NiceNade.uc index 1a2b71e..48b778b 100644 --- a/sources/Weapons/Playable/Grenades/NiceNade.uc +++ b/sources/Weapons/Playable/Grenades/NiceNade.uc @@ -135,7 +135,7 @@ simulated function HurtRadius( float DamageAmount, float DamageRadius, class= 5 && Stats != none ) - class'ScrnBalanceSrv.ScrnAchievements'.static.ProgressAchievementByID(Stats.Rep, 'SuicideBomber', 1); + class'ScrnAchievements'.static.ProgressAchievementByID(Stats.Rep, 'SuicideBomber', 1); if ( NumKilled >= 4 ) { diff --git a/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc b/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc index a25fa63..d806ad1 100644 --- a/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc +++ b/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc @@ -11,7 +11,7 @@ function Timer() // if (AmmoInCharge == MaxChargeAmmo) { // Player = Level.GetLocalPlayerController(); // if (Player != none) - // Player.ReceiveLocalizedMessage(class'ScrnBalanceSrv.ScrnPlayerMessage',0); + // Player.ReceiveLocalizedMessage(class'ScrnPlayerMessage',0); // } } super.Timer();