This commit is contained in:
GenZmeY 2021-05-16 07:40:47 +03:00
parent 9dae3489e6
commit f608412edb
5 changed files with 2 additions and 2399 deletions

View File

@ -267,7 +267,6 @@ simulated function RenderMenu( Canvas C )
if( !KFPlayerController(PlayerOwner).MyGFxManager.bMenusActive ) if( !KFPlayerController(PlayerOwner).MyGFxManager.bMenusActive )
{ {
HUDOwner.Canvas = C; HUDOwner.Canvas = C;
HUDOwner.RenderKFHUD(KFPawn_Human(PlayerOwner.Pawn));
for( i=(HUDOwner.HUDWidgets.Length-1); i>=0; --i ) for( i=(HUDOwner.HUDWidgets.Length-1); i>=0; --i )
{ {

File diff suppressed because it is too large Load Diff

View File

@ -1,155 +0,0 @@
Class UIP_ColorSettings extends KFGUI_MultiComponent;
var KFGUI_ComponentList SettingsBox;
var KFGUI_ColorSlider MainHudSlider,OutlineSlider,FontSlider,ArmorSlider,HealthSlider;
var ScoreboardExtHUD HUD;
function InitMenu()
{
HUD = ScoreboardExtHUD(GetPlayer().myHUD);
Super.InitMenu();
// Client settings
SettingsBox = KFGUI_ComponentList(FindComponentID('SettingsBox'));
MainHudSlider = AddColorSlider('HUDColorSlider', "Main HUD Color", HUD.HudMainColor);
OutlineSlider = AddColorSlider('OutlineColorSlider', "HUD Outline Color", HUD.HudOutlineColor);
FontSlider = AddColorSlider('FontCSlider', "Font Color", HUD.FontColor);
ArmorSlider = AddColorSlider('ArmorCSlider', "Player Info Armor Color", HUD.CustomArmorColor);
HealthSlider = AddColorSlider('HealthCSlider', "Player Info Health Color", HUD.CustomHealthColor);
}
function ShowMenu()
{
Super.ShowMenu();
HUD.ColorSettingMenu = self;
ArmorSlider.SetDefaultColor(HUD.CustomArmorColor);
HealthSlider.SetDefaultColor(HUD.CustomHealthColor);
}
final function KFGUI_ColorSlider AddColorSlider( name IDN, string Caption, Color DefaultColor )
{
local KFGUI_MultiComponent MC;
local KFGUI_ColorSlider SL;
MC = KFGUI_MultiComponent(SettingsBox.AddListComponent(class'KFGUI_MultiComponent'));
MC.XSize = 0.65;
MC.XPosition = 0.15;
MC.InitMenu();
SL = new(MC) class'KFGUI_ColorSlider';
SL.CaptionText = Caption;
SL.DefaultColor = DefaultColor;
SL.ID = IDN;
SL.OnColorSliderValueChanged = CheckColorSliderChange;
MC.AddComponent(SL);
return SL;
}
function CheckColorSliderChange(KFGUI_ColorSlider Sender, KFGUI_Slider Slider, int Value)
{
switch(Sender.ID)
{
case 'HUDColorSlider':
switch( Slider.ID )
{
case 'ColorSliderR':
HUD.HudMainColor.R = Value;
break;
case 'ColorSliderG':
HUD.HudMainColor.G = Value;
break;
case 'ColorSliderB':
HUD.HudMainColor.B = Value;
break;
case 'ColorSliderA':
HUD.HudMainColor.A = Value;
break;
}
HUD.SaveConfig();
break;
case 'OutlineColorSlider':
switch( Slider.ID )
{
case 'ColorSliderR':
HUD.HudOutlineColor.R = Value;
break;
case 'ColorSliderG':
HUD.HudOutlineColor.G = Value;
break;
case 'ColorSliderB':
HUD.HudOutlineColor.B = Value;
break;
case 'ColorSliderA':
HUD.HudOutlineColor.A = Value;
break;
}
HUD.SaveConfig();
break;
case 'FontCSlider':
switch( Slider.ID )
{
case 'ColorSliderR':
HUD.FontColor.R = Value;
break;
case 'ColorSliderG':
HUD.FontColor.G = Value;
break;
case 'ColorSliderB':
HUD.FontColor.B = Value;
break;
case 'ColorSliderA':
HUD.FontColor.A = Value;
break;
}
HUD.SaveConfig();
break;
case 'ArmorCSlider':
switch( Slider.ID )
{
case 'ColorSliderR':
HUD.CustomArmorColor.R = Value;
break;
case 'ColorSliderG':
HUD.CustomArmorColor.G = Value;
break;
case 'ColorSliderB':
HUD.CustomArmorColor.B = Value;
break;
case 'ColorSliderA':
HUD.CustomArmorColor.A = Value;
break;
}
HUD.SaveConfig();
break;
case 'HealthCSlider':
switch( Slider.ID )
{
case 'ColorSliderR':
HUD.CustomHealthColor.R = Value;
break;
case 'ColorSliderG':
HUD.CustomHealthColor.G = Value;
break;
case 'ColorSliderB':
HUD.CustomHealthColor.B = Value;
break;
case 'ColorSliderA':
HUD.CustomHealthColor.A = Value;
break;
}
HUD.SaveConfig();
break;
}
}
defaultproperties
{
Begin Object Class=KFGUI_ComponentList Name=ClientSettingsBox
ID="SettingsBox"
ListItemsPerPage=3
End Object
Components.Add(ClientSettingsBox)
}

View File

@ -1,255 +0,0 @@
Class UIP_Settings extends KFGUI_MultiComponent;
var KFGUI_ComponentList SettingsBox;
var KFGUI_TextLable ResetColorLabel,PerkStarsLabel,PerkStarsRowLabel,ControllerTypeLabel,PlayerInfoTypeLabel;
var KFGUI_EditBox PerkStarsBox, PerkRowsBox;
var KFGUI_ComboBox ControllerBox;
var ScoreboardExtHUD HUD;
var KFPlayerController PC;
function InitMenu()
{
local string S;
PC = KFPlayerController(GetPlayer());
HUD = ScoreboardExtHUD(PC.myHUD);
Super.InitMenu();
// Client settings
SettingsBox = KFGUI_ComponentList(FindComponentID('SettingsBox'));
AddCheckBox("Disable HUD","Disables the HUD entirely.",'bDisableHUD',HUD.bDisableHUD);
AddCheckBox("Light HUD","Show a light version of the HUD.",'bLight',HUD.bLightHUD);
AddCheckBox("Show weapon info","Show current weapon ammunition status.",'bWeapons',!HUD.bHideWeaponInfo);
AddCheckBox("Show personal info","Display health and armor on the HUD.",'bPersonal',!HUD.bHidePlayerInfo);
AddCheckBox("Show score","Check to show scores on the HUD.",'bScore',!HUD.bHideDosh);
AddCheckBox("Show hidden player icons","Shows the hidden player icons.",'bDisableHiddenPlayers',!HUD.bDisableHiddenPlayers);
AddCheckBox("Show damage messages","Shows the damage popups when damaging ZEDs.",'bEnableDamagePopups',HUD.bEnableDamagePopups);
AddCheckBox("Show player speed","Shows how fast you are moving.",'bShowSpeed',HUD.bShowSpeed);
AddCheckBox("Show pickup information","Shows a UI with infromation on pickups.",'bDisablePickupInfo',!HUD.bDisablePickupInfo);
AddCheckBox("Show lockon target","Shows who you have targeted with a medic gun.",'bDisableLockOnUI',!HUD.bDisableLockOnUI);
AddCheckBox("Show medicgun recharge info","Shows what the recharge info is on various medic weapons.",'bDisableRechargeUI',!HUD.bDisableRechargeUI);
AddCheckBox("Show last remaining ZED icons","Shows the last remaining ZEDs as icons.",'bDisableLastZEDIcons',!HUD.bDisableLastZEDIcons);
AddCheckBox("Show XP earned","Shows when you earn XP.",'bShowXPEarned',HUD.bShowXPEarned);
AddCheckBox("Show Dosh earned","Shows when you earn Dosh.",'bShowDoshEarned',HUD.bShowDoshEarned);
AddCheckBox("Enable Modern Scoreboard","Makes the scoreboard look more modern.",'bNewScoreboard',HUD.bNewScoreboard);
switch(HUD.PlayerInfoType)
{
case INFO_CLASSIC:
S = "Classic";
break;
case INFO_LEGACY:
S = "Legacy";
break;
case INFO_MODERN:
S = "Modern";
break;
}
ControllerBox = AddComboBox("Player Info Type","What style to draw the player info system in.",'PlayerInfo',PlayerInfoTypeLabel);
ControllerBox.Values.AddItem("Classic");
ControllerBox.Values.AddItem("Legacy");
ControllerBox.Values.AddItem("Modern");
ControllerBox.SetValue(S);
AddButton("Reset","Reset HUD Colors","Resets the color settings for the HUD.",'ResetColors',ResetColorLabel);
}
final function KFGUI_CheckBox AddCheckBox( string Cap, string TT, name IDN, bool bDefault )
{
local KFGUI_CheckBox CB;
CB = KFGUI_CheckBox(SettingsBox.AddListComponent(class'KFGUI_CheckBox'));
CB.LableString = Cap;
CB.ToolTip = TT;
CB.bChecked = bDefault;
CB.InitMenu();
CB.ID = IDN;
CB.OnCheckChange = CheckChange;
return CB;
}
final function KFGUI_Button AddButton( string ButtonText, string Cap, string TT, name IDN, out KFGUI_TextLable Label )
{
local KFGUI_Button CB;
local KFGUI_MultiComponent MC;
MC = KFGUI_MultiComponent(SettingsBox.AddListComponent(class'KFGUI_MultiComponent'));
MC.InitMenu();
Label = new(MC) class'KFGUI_TextLable';
Label.SetText(Cap);
Label.XSize = 0.60;
Label.FontScale = 1;
Label.AlignY = 1;
MC.AddComponent(Label);
CB = new(MC) class'KFGUI_Button';
CB.XPosition = 0.77;
CB.XSize = 0.15;
CB.ButtonText = ButtonText;
CB.ToolTip = TT;
CB.ID = IDN;
CB.OnClickLeft = ButtonClicked;
CB.OnClickRight = ButtonClicked;
MC.AddComponent(CB);
return CB;
}
final function KFGUI_ComboBox AddComboBox( string Cap, string TT, name IDN, out KFGUI_TextLable Label )
{
local KFGUI_ComboBox CB;
local KFGUI_MultiComponent MC;
MC = KFGUI_MultiComponent(SettingsBox.AddListComponent(class'KFGUI_MultiComponent'));
MC.InitMenu();
Label = new(MC) class'KFGUI_TextLable';
Label.SetText(Cap);
Label.XSize = 0.60;
Label.FontScale = 1;
Label.AlignY = 1;
MC.AddComponent(Label);
CB = new(MC) class'KFGUI_ComboBox';
CB.XPosition = 0.77;
CB.XSize = 0.15;
CB.ToolTip = TT;
CB.ID = IDN;
CB.OnComboChanged = OnComboChanged;
MC.AddComponent(CB);
return CB;
}
function OnComboChanged(KFGUI_ComboBox Sender)
{
switch( Sender.ID )
{
case 'PlayerInfo':
switch(Sender.GetCurrent())
{
case "Classic":
HUD.PlayerInfoType = INFO_CLASSIC;
break;
case "Legacy":
HUD.PlayerInfoType = INFO_LEGACY;
break;
case "Modern":
HUD.PlayerInfoType = INFO_MODERN;
break;
}
break;
}
switch(HUD.PlayerInfoType)
{
case INFO_CLASSIC:
HUD.CustomArmorColor = HUD.BlueColor;
HUD.CustomHealthColor = HUD.RedColor;
break;
case INFO_LEGACY:
HUD.CustomArmorColor = HUD.ClassicArmorColor;
HUD.CustomHealthColor = HUD.ClassicHealthColor;
break;
case INFO_MODERN:
HUD.CustomArmorColor = HUD.ArmorColor;
HUD.CustomHealthColor = HUD.HealthColor;
break;
}
HUD.SaveConfig();
}
function CheckChange( KFGUI_CheckBox Sender )
{
switch( Sender.ID )
{
case 'bDisableHUD':
HUD.bDisableHUD = Sender.bChecked;
HUD.RemoveMovies();
if( HUD.bDisableHUD )
{
HUD.HUDClass = class'KFGFxHudWrapper'.default.HUDClass;
HUD.CreateHUDMovie();
}
else
{
HUD.HUDClass = HUD.default.HUDClass;
HUD.CreateHUDMovie();
}
break;
case 'bLight':
HUD.bLightHUD = Sender.bChecked;
break;
case 'bWeapons':
HUD.bHideWeaponInfo = !Sender.bChecked;
break;
case 'bPersonal':
HUD.bHidePlayerInfo = !Sender.bChecked;
break;
case 'bScore':
HUD.bHideDosh = !Sender.bChecked;
break;
case 'bDisableHiddenPlayers':
HUD.bDisableHiddenPlayers = !Sender.bChecked;
break;
case 'bEnableDamagePopups':
HUD.bEnableDamagePopups = Sender.bChecked;
break;
case 'bShowSpeed':
HUD.bShowSpeed = Sender.bChecked;
break;
case 'bDisableLastZEDIcons':
HUD.bDisableLastZEDIcons = !Sender.bChecked;
break;
case 'bDisablePickupInfo':
HUD.bDisablePickupInfo = !Sender.bChecked;
break;
case 'bDisableLockOnUI':
HUD.bDisableLockOnUI = !Sender.bChecked;
break;
case 'bDisableRechargeUI':
HUD.bDisableRechargeUI = !Sender.bChecked;
break;
case 'bNewScoreboard':
HUD.bNewScoreboard = Sender.bChecked;
HUD.Scoreboard.SetVisibility(false);
if( HUD.HUDMovie.GfxScoreBoardPlayer != None )
HUD.HUDMovie.GfxScoreBoardPlayer.ShowScoreboard(false);
break;
case 'bShowXPEarned':
HUD.bShowXPEarned = Sender.bChecked;
break;
case 'bShowDoshEarned':
HUD.bShowDoshEarned = Sender.bChecked;
break;
}
HUD.SaveConfig();
}
function ButtonClicked( KFGUI_Button Sender )
{
switch( Sender.ID )
{
case 'ResetColors':
HUD.ResetHUDColors();
if( HUD.ColorSettingMenu != None )
{
HUD.ColorSettingMenu.MainHudSlider.SetDefaultColor(HUD.HudMainColor);
HUD.ColorSettingMenu.OutlineSlider.SetDefaultColor(HUD.HudOutlineColor);
HUD.ColorSettingMenu.FontSlider.SetDefaultColor(HUD.FontColor);
}
break;
}
}
defaultproperties
{
Begin Object Class=KFGUI_ComponentList Name=ClientSettingsBox
ID="SettingsBox"
ListItemsPerPage=16
End Object
Components.Add(ClientSettingsBox)
}

View File

@ -1,140 +0,0 @@
Class UI_MidGameMenu extends KFGUI_FloatingWindow;
struct FPageInfo
{
var class<KFGUI_Base> PageClass;
var string Caption,Hint;
};
var KFGUI_SwitchMenuBar PageSwitcher;
var() array<FPageInfo> Pages;
var transient KFGUI_Button PrevButton;
var transient int NumButtons,NumButtonRows;
var KFPlayerReplicationInfo KFPRI;
function InitMenu()
{
local int i;
local KFGUI_Button B;
PageSwitcher = KFGUI_SwitchMenuBar(FindComponentID('Pager'));
Super(KFGUI_Page).InitMenu();
AddMenuButton('Close',"Close","Close this menu");
for( i=0; i<Pages.Length; ++i )
{
PageSwitcher.AddPage(Pages[i].PageClass,Pages[i].Caption,Pages[i].Hint,B).InitMenu();
}
}
function Timer()
{
local PlayerReplicationInfo PRI;
PRI = GetPlayer().PlayerReplicationInfo;
if( PRI==None )
return;
if( KFPlayerController(GetPlayer()).IsBossCameraMode() )
{
DoClose();
return;
}
}
function ShowMenu()
{
Super.ShowMenu();
PlayMenuSound(MN_DropdownChange);
// Update spectate button info text.
Timer();
SetTimer(0.5,true);
Owner.bHideCursor = false;
}
function CloseMenu()
{
local KFGfxMoviePlayer_Manager MovieManager;
Super.CloseMenu();
Owner.bHideCursor = true;
MovieManager = KFPlayerController(GetPlayer()).MyGFxManager;
MovieManager.SetMovieCanReceiveInput(MovieManager.bMenusActive);
}
function PreDraw()
{
local KFGfxMoviePlayer_Manager MovieManager;
Super.PreDraw();
MovieManager = KFPlayerController(GetPlayer()).MyGFxManager;
if( CaptureMouse() )
MovieManager.SetMovieCanReceiveInput(false);
else MovieManager.SetMovieCanReceiveInput(true);
}
function ButtonClicked( KFGUI_Button Sender )
{
DoClose();
}
final function KFGUI_Button AddMenuButton( name ButtonID, string Text, optional string ToolTipStr )
{
local KFGUI_Button B;
B = new (Self) class'KFGUI_Button';
B.ButtonText = Text;
B.ToolTip = ToolTipStr;
B.OnClickLeft = ButtonClicked;
B.OnClickRight = ButtonClicked;
B.ID = ButtonID;
B.XPosition = 0.05+NumButtons*0.1;
B.XSize = 0.099;
B.YPosition = 0.92+NumButtonRows*0.04;
B.YSize = 0.0399;
PrevButton = B;
if( ++NumButtons>8 )
{
++NumButtonRows;
NumButtons = 0;
}
AddComponent(B);
return B;
}
defaultproperties
{
WindowTitle="Classic HUD - Menu"
XPosition=0.2
YPosition=0.1
XSize=0.6
YSize=0.8
bAlwaysTop=true
bOnlyThisFocus=true
Pages.Add((PageClass=Class'UIP_Settings',Caption="Settings",Hint="Show additional Classic Mode settings"))
Pages.Add((PageClass=Class'UIP_ColorSettings',Caption="Colors",Hint="Settings to adjust the hud colors"))
Begin Object Class=KFGUI_SwitchMenuBar Name=MultiPager
ID="Pager"
XPosition=0.015
YPosition=0.04
XSize=0.975
YSize=0.8
BorderWidth=0.05
ButtonAxisSize=0.1
End Object
Components.Add(MultiPager)
}