less scrn hardcode, new guicbx copy-cat

This commit is contained in:
Shtoyan 2022-01-22 14:14:36 +04:00
commit be9e08c37b
8 changed files with 43 additions and 29 deletions

View file

@ -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"
}

View file

@ -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"

View file

@ -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";