First commit

This commit is contained in:
Anton Tarasenko 2020-02-16 19:53:59 +07:00
commit 5b48414900
263 changed files with 24830 additions and 0 deletions

View file

@ -0,0 +1,190 @@
class NiceGUIBuyMenu extends UT2k4MainPage;
//The "Header"
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
//The "Footer"
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk;
var localized string NoActivePerk;
var localized string TraderClose;
var localized string WaveString;
var localized string LvAbbrString;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{
c_Tabs.TabStack[i].bVisible = false;
}
UpdateWeightBar();
}
function InitTabs()
{
local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
}
}
function UpdateWeightBar()
{
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
}
}
event Opened(GUIComponent Sender)
{
local rotator PlayerRot;
super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree
if ( KFPlayerController(PlayerOwner()) != none )
{ KFPlayerController(PlayerOwner()).bShopping = true;
}
if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle )
{
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
}
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
PlayerRot = PlayerOwner().Rotation;
SavedPitch = PlayerRot.Pitch;
PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Pitch = 0;
PlayerRot.Roll = 0;
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
}
function Timer()
{
UpdateHeader();
UpdateWeightBar();
}
function InternalOnClose(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
}
function UpdateHeader()
{
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
return;
}
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
}
else
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
}
else
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
}
else
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
else
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
}
function KFBuyMenuClosed(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{ KFPlayerController(PlayerOwner()).bShopping = false;
}
}
function CloseSale(bool savePurchases)
{
Controller.CloseMenu(!savePurchases);
}
function bool ButtonClicked(GUIComponent Sender)
{
if ( Sender == PerkTabButton )
{
HandleParameters(PanelCaption[1], "OhHi!");
}
if ( Sender == StoreTabButton )
{
HandleParameters(PanelCaption[0], "OhHi!");
}
return true;
}
defaultproperties
{ Begin Object Class=GUIImage Name=HBGLeft Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Perk Quick Select" WinTop=0.001000 WinLeft=0.001000 WinWidth=0.332300 WinHeight=0.100000 End Object HeaderBG_Left=GUIImage'NicePack.NiceGUIBuyMenu.HBGLeft'
Begin Object Class=GUIImage Name=HBGCenter Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Trading Time Left" WinTop=0.001000 WinLeft=0.334000 WinWidth=0.331023 WinHeight=0.100000 End Object HeaderBG_Center=GUIImage'NicePack.NiceGUIBuyMenu.HBGCenter'
Begin Object Class=GUIImage Name=HBGRight Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched Hint="Current Perk" WinTop=0.001000 WinLeft=0.666000 WinWidth=0.332000 WinHeight=0.100000 End Object HeaderBG_Right=GUIImage'NicePack.NiceGUIBuyMenu.HBGRight'
Begin Object Class=GUILabel Name=Perk TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) WinTop=0.010000 WinLeft=0.665000 WinWidth=0.329761 WinHeight=0.050000 End Object CurrentPerkLabel=GUILabel'NicePack.NiceGUIBuyMenu.Perk'
Begin Object Class=GUILabel Name=Time Caption="Trader closes in 00:31" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) TextFont="UT2LargeFont" WinTop=0.020952 WinLeft=0.335000 WinWidth=0.330000 WinHeight=0.035000 End Object TimeLeftLabel=GUILabel'NicePack.NiceGUIBuyMenu.Time'
Begin Object Class=GUILabel Name=Wave Caption="Wave: 7/10" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) WinTop=0.052857 WinLeft=0.336529 WinWidth=0.327071 WinHeight=0.035000 End Object WaveLabel=GUILabel'NicePack.NiceGUIBuyMenu.Wave'
Begin Object Class=GUILabel Name=HBGLL Caption="Quick Perk Select" TextAlign=TXTA_Center TextColor=(B=158,G=176,R=175) TextFont="UT2ServerListFont" WinTop=0.007238 WinLeft=0.024937 WinWidth=0.329761 WinHeight=0.019524 End Object HeaderBG_Left_Label=GUILabel'NicePack.NiceGUIBuyMenu.HBGLL'
Begin Object Class=KFQuickPerkSelect Name=QS WinTop=0.011906 WinLeft=0.008008 WinWidth=0.316601 WinHeight=0.082460 OnDraw=QS.MyOnDraw End Object QuickPerkSelect=KFQuickPerkSelect'NicePack.NiceGUIBuyMenu.QS'
Begin Object Class=KFBuyMenuFilter Name=filter WinTop=0.051000 WinLeft=0.670000 WinWidth=0.305000 WinHeight=0.082460 OnDraw=filter.MyOnDraw End Object BuyMenuFilter=KFBuyMenuFilter'NicePack.NiceGUIBuyMenu.filter'
Begin Object Class=GUIButton Name=StoreTabB Caption="Store" FontScale=FNS_Small WinTop=0.072762 WinLeft=0.202801 WinWidth=0.050000 WinHeight=0.022000 OnClick=NiceGUIBuyMenu.ButtonClicked OnKeyEvent=StoreTabB.InternalOnKeyEvent End Object StoreTabButton=GUIButton'NicePack.NiceGUIBuyMenu.StoreTabB'
Begin Object Class=GUIButton Name=PerkTabB Caption="Perk" FontScale=FNS_Small WinTop=0.072762 WinLeft=0.127234 WinWidth=0.050000 WinHeight=0.022000 OnClick=NiceGUIBuyMenu.ButtonClicked OnKeyEvent=PerkTabB.InternalOnKeyEvent End Object PerkTabButton=GUIButton'NicePack.NiceGUIBuyMenu.PerkTabB'
Begin Object Class=GUIImage Name=Weight Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border' ImageStyle=ISTY_Stretched WinTop=0.934206 WinLeft=0.001000 WinWidth=0.663086 WinHeight=0.065828 End Object WeightBG=GUIImage'NicePack.NiceGUIBuyMenu.Weight'
Begin Object Class=GUIImage Name=WeightIco Image=Texture'KillingFloorHUD.HUD.Hud_Weight' ImageStyle=ISTY_Scaled WinTop=0.946166 WinLeft=0.009961 WinWidth=0.033672 WinHeight=0.048992 RenderWeight=0.460000 End Object WeightIcon=GUIImage'NicePack.NiceGUIBuyMenu.WeightIco'
Begin Object Class=GUIImage Name=WeightIcoBG Image=Texture'KF_InterfaceArt_tex.Menu.Perk_box_unselected' ImageStyle=ISTY_Scaled WinTop=0.942416 WinLeft=0.006055 WinWidth=0.041484 WinHeight=0.054461 RenderWeight=0.450000 End Object WeightIconBG=GUIImage'NicePack.NiceGUIBuyMenu.WeightIcoBG'
Begin Object Class=KFWeightBar Name=WeightB WinTop=0.945302 WinLeft=0.055266 WinWidth=0.443888 WinHeight=0.053896 OnDraw=WeightB.MyOnDraw End Object WeightBar=KFWeightBar'NicePack.NiceGUIBuyMenu.WeightB'
RedColor=(R=255,A=255) GreenGreyColor=(B=158,G=176,R=175,A=255) CurrentPerk="Current Perk" NoActivePerk="No Active Perk!" TraderClose="Trader Closes in" WaveString="Wave" LvAbbrString="Lv" Begin Object Class=GUITabControl Name=PageTabs bDockPanels=True TabHeight=0.025000 BackgroundStyleName="TabBackground" WinTop=0.078000 WinLeft=0.005000 WinWidth=0.990000 WinHeight=0.025000 RenderWeight=0.490000 TabOrder=0 bAcceptsInput=True OnActivate=PageTabs.InternalOnActivate OnChange=NiceGUIBuyMenu.InternalOnChange End Object c_Tabs=GUITabControl'NicePack.NiceGUIBuyMenu.PageTabs'
Begin Object Class=BackgroundImage Name=PageBackground Image=Texture'Engine.WhiteSquareTexture' ImageColor=(B=20,G=20,R=20) ImageStyle=ISTY_Tiled RenderWeight=0.001000 End Object i_Background=BackgroundImage'NicePack.NiceGUIBuyMenu.PageBackground'
PanelClass(0)="KFGUI.KFTab_BuyMenu" PanelClass(1)="KFGUI.KFTab_Perks" PanelCaption(0)="Store" PanelCaption(1)="Perks" PanelHint(0)="Trade equipment and ammunition" PanelHint(1)="Select your current Perk" bAllowedAsLast=True OnClose=NiceGUIBuyMenu.KFBuyMenuClosed WhiteColor=(B=255,G=255,R=255)
}

View file

@ -0,0 +1,76 @@
class NiceGUIPerkButton extends GUIButton;
var bool isAltSkill;
var int skillPerkIndex, skillIndex;
var class<NiceSkill> associatedSkill;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
OnDraw = DrawSkillButton;
OnClick = SkillChange;
Super.InitComponent(MyController, MyOwner);
}
function bool SkillChange(GUIComponent Sender){
local byte newSkillChoice;
local NicePlayerController skillOwner;
if(isAltSkill) newSkillChoice = 1;
else newSkillChoice = 0;
skillOwner = NicePlayerController(PlayerOwner());
if(skillOwner != none){ skillOwner.ServerSetSkill(skillPerkIndex, skillIndex, newSkillChoice); skillOwner.SaveConfig();
}
return true;
}
function bool DrawSkillButton(Canvas cnvs){
// Variables that contain information about this button's skill
local NicePlayerController skillOwner;
local bool bAvailable, bSelected, bPending;
// Variables needed for text drawing
local int descLineOffset; // How much vertical space description took so far
local string skillEffects, line; // 'line' is next line from description to be drawn, 'skillEffects' is a not-yet drawn part of skill's effect description
local float textWidth, textHeight, nameHeight; // Variables for storing amount of space text uses
local int horizontalOffset, verticalOffset, smVerticalOffset; // Spaces between text and borders ('smVerticalOffset' is space between skill's name and description)
// Old values for font and it's scale
local Font oldFont;
local float oldFontScaleX, oldFontScaleY;
// Get skill parameters
skillOwner = NicePlayerController(PlayerOwner());
bAvailable = class'NiceVeterancyTypes'.static.CanUseSkill(skillOwner, associatedSkill);
if(bAvailable) bSelected = class'NiceVeterancyTypes'.static.HasSkill(skillOwner, associatedSkill);
bPending = class'NiceVeterancyTypes'.static.IsSkillPending(skillOwner, associatedSkill);
if(skillOwner == none || associatedSkill == none) return true;
// Text offset parameters that seem to give a good result
horizontalOffset = 10;
verticalOffset = 5;
smVerticalOffset = 2;
// Backup old font values and set the new ones
oldFont = cnvs.Font;
oldFontScaleX = cnvs.FontScaleX;
oldFontScaleY = cnvs.FontScaleY;
cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(3);
cnvs.FontScaleX = 1.0;
cnvs.FontScaleY = 1.0;
// Draw text
// - Name
cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset);
if(!bAvailable) cnvs.SetDrawColor(0, 0, 0);
else if(bSelected) cnvs.SetDrawColor(255, 255, 255);
else cnvs.SetDrawColor(128, 128, 128);
cnvs.DrawText(associatedSkill.default.skillName);
cnvs.TextSize(associatedSkill.default.skillName, textWidth, nameHeight);
// - Description
cnvs.Font = class'ROHUD'.Static.LoadSmallFontStatic(5);
if(!bAvailable) cnvs.SetDrawColor(0, 0, 0);
else if(bSelected) cnvs.SetDrawColor(220, 220, 220);//180
else cnvs.SetDrawColor(140, 140, 140);//100
skillEffects = associatedSkill.default.skillEffects;
while(Len(skillEffects) > 0){ cnvs.WrapText(skillEffects, line, ActualWidth() - horizontalOffset * 2, cnvs.Font, cnvs.FontScaleX); cnvs.SetPos(ActualLeft() + horizontalOffset, ActualTop() + verticalOffset + nameHeight + smVerticalOffset + descLineOffset); cnvs.DrawText(line); cnvs.TextSize(line, textWidth, textHeight); descLineOffset += textHeight;
}
// Draw border
if(bAvailable && bSelected || bPending){ if(bAvailable && bSelected) cnvs.SetDrawColor(255, 255, 255); else cnvs.SetDrawColor(64, 64, 64); cnvs.SetPos(ActualLeft(), ActualTop()); cnvs.DrawLine(3, ActualWidth()); cnvs.DrawLine(1, ActualHeight()); cnvs.SetPos(ActualLeft() + ActualWidth() + 2, ActualTop() + ActualHeight()); cnvs.DrawLine(2, ActualWidth() + 2); cnvs.SetPos(ActualLeft() + ActualWidth(), ActualTop() + ActualHeight() + 2); cnvs.DrawLine(0, ActualHeight() + 2);
}
cnvs.Font = oldFont;
cnvs.FontScaleX = oldFontScaleX;
cnvs.FontScaleY = oldFontScaleY;
return true;
}
defaultproperties
{
}

View file

@ -0,0 +1,70 @@
class NiceGUISettings extends Settings_Tabs;
//var automated GUIButton skillButtonA;
var array<string> ForceProjItems;
var automated moCheckBox ch_WeapManagement;
var automated moCheckBox ch_AltSwitches;
var automated moCheckBox ch_DispCounters;
var automated moCheckBox ch_DisWeapProgress;
var automated moCheckBox ch_ShowHLMessages;
var automated moCheckBox ch_CancelFire;
var automated moCheckBox ch_CancelSwitching;
var automated moCheckBox ch_CancelNades;
var automated moCheckBox ch_CancelAiming;
var automated moCheckBox ch_ReloadWontWork;
var automated GUISectionBackground bg_WEAP;
var automated GUISectionBackground bg_RELOAD;
function InitComponent(GUIController MyController, GUIComponent MyOwner){
super.InitComponent(MyController, MyOwner);
}
function InternalOnLoadINI(GUIComponent sender, string s){
local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer == none) return;
switch(sender){
case ch_WeapManagement: ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); break;
case ch_AltSwitches: ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes); break;
case ch_DispCounters: ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters); break;
case ch_DisWeapProgress: ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress); break;
case ch_ShowHLMessages: ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages); break;
case ch_CancelFire: ch_CancelFire.Checked(nicePlayer.bRelCancelByFire); break;
case ch_CancelSwitching: ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching); break;
case ch_CancelNades: ch_CancelNades.Checked(nicePlayer.bRelCancelByNades); break;
case ch_CancelAiming: ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming); break;
case ch_ReloadWontWork: ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); break;
}
}
function InternalOnChange(GUIComponent Sender){
local NicePlayerController nicePlayer;
super.InternalOnChange(Sender);
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer == none) return;
switch(sender){
case ch_WeapManagement: nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); break;
case ch_AltSwitches: nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked()); break;
case ch_DispCounters: nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked()); break;
case ch_DisWeapProgress: nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked()); break;
case ch_ShowHLMessages: nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked()); break;
case ch_CancelFire: nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked(); break;
case ch_CancelSwitching: nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked(); break;
case ch_CancelNades: nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked(); break;
case ch_CancelAiming: nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked(); break;
case ch_ReloadWontWork: nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); break;
}
nicePlayer.ClientSaveConfig();
}
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// tab order
defaultproperties
{ Begin Object Class=moCheckBox Name=WeaponManagement CaptionWidth=0.955000 Caption="Nice weapon management" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=WeaponManagement.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, NicePack will use it's own system to manage weapon switching" WinTop=0.050000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=4 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_WeapManagement=moCheckBox'NicePack.NiceGUISettings.WeaponManagement'
Begin Object Class=moCheckBox Name=AltSwitches CaptionWidth=0.955000 Caption="Alt fire switches modes" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=AltSwitches.InternalOnCreateComponent IniOption="@Internal" Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" WinTop=0.100000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=6 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_AltSwitches=moCheckBox'NicePack.NiceGUISettings.AltSwitches'
Begin Object Class=moCheckBox Name=DispCounters CaptionWidth=0.955000 Caption="Display counters" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=DispCounters.InternalOnCreateComponent IniOption="@Internal" Hint="Toggles display of the various counters used by skills" WinTop=0.150000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=7 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_DispCounters=moCheckBox'NicePack.NiceGUISettings.DispCounters'
Begin Object Class=moCheckBox Name=DispWeapProgress CaptionWidth=0.955000 Caption="Display weapon progress" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=DispWeapProgress.InternalOnCreateComponent IniOption="@Internal" Hint="Displays weapon progress rate, whoever it's defined by a skill that's using this functionality" WinTop=0.200000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=8 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_DisWeapProgress=moCheckBox'NicePack.NiceGUISettings.DispWeapProgress'
Begin Object Class=moCheckBox Name=ShowHLMessages CaptionWidth=0.955000 Caption="Show Hardcore Level messages" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=ShowHLMessages.InternalOnCreateComponent IniOption="@Internal" Hint="Enable to be notified each time Hardcore Level is changed" WinTop=0.300000 WinLeft=0.012500 WinWidth=0.278000 TabOrder=9 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_ShowHLMessages=moCheckBox'NicePack.NiceGUISettings.ShowHLMessages'
Begin Object Class=moCheckBox Name=CancelFire CaptionWidth=0.955000 Caption="Cancel reload by shooting" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelFire.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" WinTop=0.050000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=11 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelFire=moCheckBox'NicePack.NiceGUISettings.CancelFire'
Begin Object Class=moCheckBox Name=CancelSwitching CaptionWidth=0.955000 Caption="Cancel reload by switching weapons" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelSwitching.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" WinTop=0.100000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=12 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelSwitching=moCheckBox'NicePack.NiceGUISettings.CancelSwitching'
Begin Object Class=moCheckBox Name=CancelNades CaptionWidth=0.955000 Caption="Cancel reload by throwing grenades" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" OnCreateComponent=CancelNades.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" WinTop=0.150000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=13 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelNades=moCheckBox'NicePack.NiceGUISettings.CancelNades'
Begin Object Class=moCheckBox Name=CancelAiming CaptionWidth=0.955000 Caption="Cancel reload by aiming" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" 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)" WinTop=0.200000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=14 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_CancelAiming=moCheckBox'NicePack.NiceGUISettings.CancelAiming'
Begin Object Class=moCheckBox Name=ServerReload CaptionWidth=0.955000 Caption="My reload doesn't work" ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" 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" WinTop=0.250000 WinLeft=0.517500 WinWidth=0.287000 TabOrder=15 OnChange=NiceGUISettings.InternalOnChange OnLoadINI=NiceGUISettings.InternalOnLoadINI End Object ch_ReloadWontWork=moCheckBox'NicePack.NiceGUISettings.ServerReload'
Begin Object Class=GUISectionBackground Name=WEAPBG Caption="General weapon settings" WinTop=0.012500 WinWidth=0.495000 WinHeight=0.287500 RenderWeight=0.100100 OnPreDraw=WeaponsBG.InternalPreDraw End Object bg_WEAP=GUISectionBackground'NicePack.NiceGUISettings.WEAPBG'
Begin Object Class=GUISectionBackground Name=RELOADBG Caption="Weapon reload settings" WinTop=0.012500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.287500 RenderWeight=0.100100 OnPreDraw=WeaponsBG.InternalPreDraw End Object bg_RELOAD=GUISectionBackground'NicePack.NiceGUISettings.RELOADBG'
}

View file

@ -0,0 +1,216 @@
class NiceInteraction extends Interaction
dependson(NicePack)
dependson(NiceAbilityManager);
#exec OBJ LOAD FILE=KillingFloor2HUD.utx
var NicePack NicePackMutator;
var Material bleedIcon, poisonIcon;
var Texture greenBar, redBar;
var Texture shield;
var float size;
// Weapon box sizes
var float InventoryBoxWidth;
var float InventoryBoxHeight;
var float BorderSize;
event NotifyLevelChange(){
Master.RemoveInteraction(self);
}
function RegisterMutator(NicePack activePack){
NicePackMutator = activePack;
}
function bool isPoisoned(ScrnHumanPawn pwn){
local Inventory I;
if(pwn.Inventory != none) for(I = pwn.Inventory; I != none; I = I.Inventory) if(I != none && MeanPoisonInventory(I) != none) return true;
return false;
}
function PostRender(Canvas C){
local int i;
local NicePack niceMutator;
local NiceHumanPawn nicePawn;
local class<NiceVeterancyTypes> niceVet;
local MeanReplicationInfo szRI;
local NiceWeapon niceWeap;
local NicePlayerController nicePlayer;
local ScrnHUD scrnHUDInstance;
local Texture barTexture;
local int x, y, center, barWidth, offset;
local int missesWidth, missesHeight, missesSpace;
local int missesX, missesY;
if(C == none) return;
if(C.ViewPort == none) return;
if(C.ViewPort.Actor == none) return;
if(C.ViewPort.Actor.Pawn == none) return;
nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon);
if(nicePlayer == none) return;
scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
//// Draw bleed and poison icons
C.SetDrawColor(255, 255, 255);
szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo);
offset = 4;
if(szRI != none){ if(szRI.isBleeding){ x = C.ClipX * 0.007; y = C.ClipY * 0.93 - size * offset; C.SetPos(x, y); C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize()); } offset++; if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){ x = C.ClipX * 0.007; y = C.ClipY * 0.93 - size * offset; C.SetPos(x, y); C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); }
}
if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){ C.ColorModulate.X = 1; C.ColorModulate.Y = 1; C.ColorModulate.Z = 1; C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255; if(!scrnHUDInstance.bLightHud) scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG); scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon); scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge; scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
}
niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level);
if(niceMutator == none) return;
//// Draw counters
if(nicePlayer != none && nicePlayer.bFlagDisplayCounters){ x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount(); y = C.ClipY * 0.01; for(i = 0;i < niceMutator.niceCounterSet.Length;i ++) if(niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue){ DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); x += 128 + 4; }
}
//// Draw weapons progress bars
if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress){ x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){ DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); y += (InventoryBoxHeight * C.ClipX + 4); }
}
//// Draw invincibility bar
nicePawn = NiceHumanPawn(nicePlayer.pawn);
if(nicePawn != none && nicePawn.invincibilityTimer != 0.0){ C.SetDrawColor(255, 255, 255); if(nicePawn.invincibilityTimer > 0) barTexture = greenBar; else barTexture = redBar; center = C.ClipX * 0.5; y = C.ClipY * 0.75; barWidth = C.ClipX * 0.2; niceVet = class'NiceVeterancyTypes'.static. GetVeterancy(nicePawn.PlayerReplicationInfo); if(niceVet != none){ if(nicePawn.invincibilityTimer > 0){ barWidth *= nicePawn.invincibilityTimer / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI); } else{ barWidth *= nicePawn.invincibilityTimer / class'NiceSkillZerkGunzerker'.default.cooldown; } } else barWidth = 0; x = center - (barWidth / 2); C.SetPos(x, y); C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize()); if(nicePawn.safeMeleeMisses <= 0) return; missesSpace = 10;//64x64 => 16x16 missesHeight = 16; missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace; missesX = center - (missesWidth / 2); missesY = y + (32 - missesHeight) * 0.5; for(i = 0;i < nicePawn.safeMeleeMisses;i ++){ C.SetPos(missesX + i * (16 + missesSpace), missesY); C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize()); }
}
// Draw cooldowns
if(nicePlayer.abilityManager == none) return;
for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++) DrawAbilityCooldown(C, i);
}
function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
local float borderSpace;
local Texture textureToDraw;
local float textWidth, textHeight;
local string textToDraw;
// Some per-defined values for drawing
local int iconSize, backgroundWidth, backgroundHeight;
// Fill some constants that will dictate how to display counter
iconSize = 64;
backgroundWidth = 128;
backgroundHeight = 64;
borderSpace = 8;
// Reset color
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64);
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
// Draw background
C.SetPos(x, y);
textureToDraw = Texture(class'HUDKillingFloor'.default.HealthBG.WidgetTexture);
C.DrawTile(textureToDraw, 128, 64, 0, 0, textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize());
// Draw appropriate icon
C.SetPos(x + borderSpace, y + borderSpace);
textureToDraw = counter.icon;
C.DrawTile(textureToDraw, 64 - 2*borderSpace, 64 - 2 * borderSpace, 0, 0, textureToDraw.MaterialUSize(), textureToDraw.MaterialVSize());
// Draw numbers
textToDraw = string(counter.value);
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(1);
C.TextSize(textToDraw, textWidth, textHeight);
C.SetPos(x + iconSize + (backgroundWidth - iconSize - textWidth) / 2, y + (backgroundHeight - textHeight) / 2 + 2);
C.DrawText(textToDraw);
}
function DrawAbilityCooldown(Canvas C, int abilityIndex){
local Texture skillTexture, backgroundTexture;
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer;
local class<NiceVeterancyTypes> niceVet;
local int x, y;
local string textToDraw;
local float textWidth, textHeight;
local NiceAbilityManager.EAbilityState abilityState;
if(C == none) return;
if(C.ViewPort == none) return;
if(C.ViewPort.Actor == none) return;
nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn);
nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
if(nicePawn == none) return;
if(nicePlayer == none || nicePlayer.abilityManager == none) return;
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.KFPRI);
skillTexture = nicePlayer.abilityManager.currentAbilities[abilityIndex]. description.icon;
if(skillTexture == none) return;
// Set stuff up
x = C.ClipX * 0.265;
x += abilityIndex * (10 + 64);
y = C.ClipY * 0.93;
textToDraw = string(int(Ceil(nicePlayer.abilityManager.currentAbilities[abilityIndex].cooldown)));
backgroundTexture = Texture'KillingFloorHUD.HUD.Hud_Box_128x64';
// Reset color
C.SetDrawColor(255, 64, 64);
// Draw background
C.SetPos(x, y);
C.DrawTile(backgroundTexture, 64, 64, 0, 0, backgroundTexture.MaterialUSize(), backgroundTexture.MaterialVSize());
C.SetPos(x, y);
C.DrawTile(skillTexture, 64, 64, 0, 0, skillTexture.MaterialUSize(), skillTexture.MaterialVSize());
// Draw additional background
abilityState = nicePlayer.abilityManager.currentAbilities[abilityIndex].myState;
if(abilityState == ASTATE_ACTIVE) C.SetDrawColor(255, 0, 0, 128);
if(abilityState == ASTATE_COOLDOWN) C.SetDrawColor(0, 0, 0, 192);
if(abilityState != ASTATE_READY){ C.SetPos(x, y); C.DrawTileStretched(Material'KillingFloorHUD.HUD.WhiteTexture', 64, 64);
}
// Draw cooldown stuff
if(abilityState == ASTATE_COOLDOWN){ C.SetDrawColor(255, 192, 192); C.Font = class'ROHUD'.static.LoadSmallFontStatic(1); C.TextSize(textToDraw, textWidth, textHeight); C.SetPos(x, y); C.SetPos(x + (64 - textWidth) / 2, y + (64 - textHeight) / 2 + 2); C.DrawText(textToDraw);
}
// Draw calibration GUI
DrawCalibrationStars(C);
}
function DrawCalibrationStars(Canvas C){
local Texture starTexture;
local int x, y, i;
local int starsAmount;
local NiceHumanPawn nicePawn;
local NicePlayerController nicePlayer;
if(C == none) return;
if(C.ViewPort == none) return;
if(C.ViewPort.Actor == none) return;
nicePawn = NiceHumanPawn(C.ViewPort.Actor.Pawn);
if(nicePawn == none) return;
if(nicePawn.currentCalibrationState == CALSTATE_NOABILITY) return;
nicePlayer = NicePlayerController(nicePawn.controller);
if(nicePlayer == none) return;
starsAmount = nicePawn.calibrationScore;
x = C.ClipX * 0.5;
x -= 0.5 * (starsAmount * 32 + (starsAmount - 1) * 16);
if(nicePawn.currentCalibrationState == CALSTATE_ACTIVE) y = C.ClipY * 0.6;
else y = C.ClipY * 0.02;
starTexture = Texture'KillingFloorHUD.HUD.Hud_Perk_Star';
for(i = 0;i < starsAmount;i ++){ C.SetPos(x, y); C.SetDrawColor(255, 255, 255); C.DrawTile(starTexture, 32, 32, 0, 0, starTexture.MaterialUSize(), starTexture.MaterialVSize()); x += 32 + 16;
}
}
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){
local float textWidth, textHeight;
local string textToDraw;
local float TempWidth, TempHeight, TempBorder;
TempWidth = InventoryBoxWidth * C.ClipX;
TempHeight = InventoryBoxHeight * C.ClipX;
TempBorder = BorderSize * C.ClipX;
// Draw background bar
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64, 64);
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64);
C.SetPos(x, y);
C.DrawTile(Texture'Engine.WhiteSquareTexture', TempWidth * weapProgress.progress, TempHeight, 0, 0, 2, 2);
// Draw this item's Background
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64);
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
C.SetPos(x, y);
C.DrawTileStretched(Texture'KillingFloorHUD.HUD.HUD_Rectangel_W_Stroke', TempWidth, TempHeight);
// Draw the Weapon's Icon over the Background
C.SetDrawColor(255, 255, 255);
C.SetPos(x + TempBorder, y + TempBorder);
if(weapProgress.weapClass.default.HudImage != none) C.DrawTile(weapProgress.weapClass.default.HudImage, TempWidth - (2.0 * TempBorder), TempHeight - (2.0 * TempBorder), 0, 0, 256, 192);
// Draw counter, if needed
if(team.teamIndex == 0) C.SetDrawColor(255, 64, 64);
else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
if(weapProgress.bShowCounter){ textToDraw = string(weapProgress.counter); C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); C.TextSize(textToDraw, textWidth, textHeight); C.SetPos(x + TempWidth - TempBorder - textWidth, y + TempHeight - TempBorder - textHeight + 2); C.DrawText(textToDraw);
}
}
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){
local bool bNeedsReload;
local string Alias, LeftPart, RigthPart;
local NiceWeapon niceWeap;
local NicePlayerController nicePlayer;
// Find controller and current weapon
nicePlayer = NicePlayerController(ViewportOwner.Actor);
if(nicePlayer == none) return false;
if(nicePlayer.Pawn != none) niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon);
// If this is a button press - detect alias
if(Action == IST_Press){ // Check for reload command Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key)); if(nicePlayer.bAdvReloadCheck) bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1; if(Divide(Alias, " ", LeftPart, RigthPart)) Alias = LeftPart; if(Key == IK_MouseWheelUp || Key == IK_MouseWheelDown){ nicePlayer.UpdateSelectors(); if(nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement){ nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp); return true; } }
}
// Open trader on movement
if(Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight" || Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis"){
// Open trader if it's a pre-game if(NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none){ nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight); nicePlayer.bOpenedInitTrader = true; return true; } //nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
}
// Reload if we've detected a reload alias in this button's command
if(niceWeap != none && !nicePlayer.bUseServerReload && (bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon")) niceWeap.ClientReloadMeNow();
return false;
}
defaultproperties
{ bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon' poisonIcon=Texture'NicePackT.MeanZeds.poisonIcon' greenBar=Texture'KFStoryGame_Tex.HUD.Batter_Fill' redBar=Texture'KFStoryGame_Tex.HUD.BarFill_Red' Shield=Texture'KillingFloorHUD.HUD.Hud_Shield' Size=75.599998 InventoryBoxWidth=0.100000 InventoryBoxHeight=0.075000 BorderSize=0.005000 bVisible=True
}

View file

@ -0,0 +1,54 @@
class NiceInvasionLoginMenu extends ScrnInvasionLoginMenu;
var bool bShowScrnMenu;
// copy-pasted from ScrnInvasionLoginMenu to change change remove news tab and add skills tab
function InitComponent(GUIController MyController, GUIComponent MyOwner){
local int i;
local string s;
local eFontScale FS;
local SRMenuAddition M;
local int indexAfterScrn;
// Setup panel classes.
Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks');
Panels[1].ClassName = string(Class'NicePack.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[1].Caption = "Skills";
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;
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;
b_MapVote.Caption=class'KFTab_MidGamePerks'.default.b_MapVote.Caption;
b_Quit.Caption=class'KFTab_MidGamePerks'.default.b_Quit.Caption;
b_Favs.Caption=class'KFTab_MidGamePerks'.default.b_Favs.Caption;
b_Favs.Hint=class'KFTab_MidGamePerks'.default.b_Favs.Hint;
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].Caption = "Achievements";
Panels[4].Hint = "ScrN server-side achievements";
if(default.bShowScrnMenu){ Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings"; Panels[5].Caption = "ScrN Features"; Panels[5].Hint = "ScrN Balance features, settings and info"; indexAfterScrn = 6;
}
else indexAfterScrn = 5;
Panels[indexAfterScrn].ClassName = "NicePack.NiceGUISettings";
Panels[indexAfterScrn].Caption = "Nice settings";
Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator";
Panels.Length = indexAfterScrn + 1;
Super(UT2K4PlayerLoginMenu).InitComponent(MyController, MyOwner);
// Mod menus
foreach MyController.ViewportOwner.Actor.DynamicActors(class'SRMenuAddition',M) if( M.bHasInit ) { AddOnList[AddOnList.Length] = M; M.NotifyMenuOpen(Self,MyController); }
s = GetSizingCaption();
for ( i = 0; i < Controls.Length; i++ )
{ if (GUIButton(Controls[i]) != none) { GUIButton(Controls[i]).bAutoSize = true; GUIButton(Controls[i]).SizingCaption = s; GUIButton(Controls[i]).AutoSizePadding.HorzPerc = 0.04; GUIButton(Controls[i]).AutoSizePadding.VertPerc = 0.5; }
}
s = class'KFTab_MidGamePerks'.default.PlayerStyleName;
PlayerStyle = MyController.GetStyle(s, fs);
InitGRI();
}
defaultproperties
{
}

View file

@ -0,0 +1,14 @@
class NiceLobbyFooter extends ScrnLobbyFooter;
function bool OnFooterClick(GUIComponent Sender)
{
if (Sender == b_Perks){ PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false); return false;
}
else if(Sender == b_ViewMap){ if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){ LobbyMenu(PageOwner).bAllowClose = true; PlayerOwner().ClientCloseMenu(true, false); LobbyMenu(PageOwner).bAllowClose = false; }
}
else if(Sender == b_Ready){ return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks
}
else return super.OnFooterClick(Sender);
}
defaultproperties
{
}

View file

@ -0,0 +1,4 @@
class NiceLobbyMenu extends ScrnLobbyMenu;
defaultproperties
{ Begin Object Class=NiceLobbyFooter Name=BuyFooter RenderWeight=0.300000 TabOrder=8 bBoundToParent=False bScaleToParent=False OnPreDraw=BuyFooter.InternalOnPreDraw End Object t_Footer=NiceLobbyFooter'NicePack.NiceLobbyMenu.BuyFooter'
}

View file

@ -0,0 +1,26 @@
class NicePanelSkills extends Settings_Tabs;
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
function ShowPanel(bool bShow){
local int i;
local class<NiceVeterancyTypes> niceVet;
local NicePlayerController nicePlayer;
Super.ShowPanel(bShow);
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer != none) niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePlayer.PlayerReplicationInfo);
if(niceVet != none){ for(i = 0;i < 5;i ++){ skillButtonA[i].skillIndex = i; skillButtonB[i].skillIndex = i; skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex; skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex; skillButtonA[i].isAltSkill = false; skillButtonB[i].isAltSkill = true; skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i]; skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i]; }
}
}
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// setup caption
defaultproperties
{ Begin Object Class=NiceGUIPerkButton Name=btn1A WinTop=0.012500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=1 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn1A.InternalOnKeyEvent End Object skillButtonA(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1A'
Begin Object Class=NiceGUIPerkButton Name=btn2A WinTop=0.188500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=3 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn2A.InternalOnKeyEvent End Object skillButtonA(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2A'
Begin Object Class=NiceGUIPerkButton Name=btn3A WinTop=0.364500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=5 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn3A.InternalOnKeyEvent End Object skillButtonA(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3A'
Begin Object Class=NiceGUIPerkButton Name=btn4A WinTop=0.540500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=7 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn4A.InternalOnKeyEvent End Object skillButtonA(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4A'
Begin Object Class=NiceGUIPerkButton Name=btn5A WinTop=0.716500 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=9 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn5A.InternalOnKeyEvent End Object skillButtonA(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5A'
Begin Object Class=NiceGUIPerkButton Name=btn1B WinTop=0.012500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=2 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn1B.InternalOnKeyEvent End Object skillButtonB(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1B'
Begin Object Class=NiceGUIPerkButton Name=btn2B WinTop=0.188500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=4 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn2B.InternalOnKeyEvent End Object skillButtonB(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2B'
Begin Object Class=NiceGUIPerkButton Name=btn3B WinTop=0.364500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=6 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn3B.InternalOnKeyEvent End Object skillButtonB(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3B'
Begin Object Class=NiceGUIPerkButton Name=btn4B WinTop=0.540500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=8 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn4B.InternalOnKeyEvent End Object skillButtonB(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4B'
Begin Object Class=NiceGUIPerkButton Name=btn5B WinTop=0.716500 WinLeft=0.505000 WinWidth=0.495000 WinHeight=0.160000 RenderWeight=2.000000 TabOrder=10 bBoundToParent=True bScaleToParent=True bMouseOverSound=False OnClickSound=CS_None OnKeyEvent=btn5B.InternalOnKeyEvent End Object skillButtonB(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5B'
}