From 44c4d081b042920fc4248e89833c33ee96c498fd Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Wed, 12 Aug 2020 18:53:32 +0300 Subject: [PATCH] feat: PerkSelection localization --- Localization/INT/ServerExt.int | Bin 38290 -> 39402 bytes ServerExt/Classes/UIP_PerkSelection.uc | 48 +++++++++++++++++-------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Localization/INT/ServerExt.int b/Localization/INT/ServerExt.int index 19b5d9bd20f74aa53a42c3b6bd1d0422ca7b7ea3..7c3511b6ede8b5da16a883f5a3fb3f3a0e5d0113 100644 GIT binary patch delta 857 zcmZuvO-lk%6g{{UtU!c9sFx9KBD1AbP_$H2BWOGMm1Hx1jA9_@!etTo@GrD!6ZC^> z-LL4}H_A9E!-IL}opn%bTTzd! zOR`*k4z;eNN*EUIjaXTyM$x5KB7^urmGm|xmyLNviWKg!?dx%TfA&wVLWa0!F~EbX zQ_~&&KH3-t+f;P&%zIs$Yp|w;vT3?T%pxMKO2`&h2Z!9b^ktDFd*Rr;A)E>kg*(Qr z_#nctiOJcVW8zyQD58>w!m%#AMRjq!8M|FDpeSNq!JM8|-_R{v#KO>UiOUy^Y zw(rCY)0cq56Cvy^JNp5)BLMe0DQSZ++YlZJV1}T+owOSu|Yk PdyHp3b)ud_l4t^dLTjc_ delta 9 RcmaF0nQ78$rVW#(0st6&1hxPG diff --git a/ServerExt/Classes/UIP_PerkSelection.uc b/ServerExt/Classes/UIP_PerkSelection.uc index 89f376b..b7823a3 100644 --- a/ServerExt/Classes/UIP_PerkSelection.uc +++ b/ServerExt/Classes/UIP_PerkSelection.uc @@ -1,7 +1,7 @@ Class UIP_PerkSelection extends KFGUI_MultiComponent; var KFGUI_List PerkList; -var KFGUI_Button B_Prestige; +var KFGUI_Button B_Prestige, B_Reset, B_Unload; var KFGUI_ComponentList StatsList; var UIR_PerkTraitList TraitsList; var KFGUI_TextLable PerkLabel; @@ -11,6 +11,19 @@ var class PrevPendingPerk; var array StatBuyers; var int OldPerkPoints; +var localized string PrestigeButtonText; +var localized string PrestigeButtonToolTip; +var localized string ResetButtonText; +var localized string ResetButtonToolTip; +var localized string UnloadButtonText; +var localized string UnloadButtonToolTip; +var localized string PrestigeButtonDisabledToolTip; +var localized string Level; +var localized string Points; +var localized string NoPerkSelected; +var localized string NotAviable; +var localized string MaxStr; + function InitMenu() { PerkList = KFGUI_List(FindComponentID('Perks')); @@ -19,6 +32,18 @@ function InitMenu() PerkLabel = KFGUI_TextLable(FindComponentID('Info')); PerkLabel.SetText(""); B_Prestige = KFGUI_Button(FindComponentID('Prestige')); + B_Reset = KFGUI_Button(FindComponentID('Reset')); + B_Unload = KFGUI_Button(FindComponentID('Unload')); + + B_Prestige.ButtonText=PrestigeButtonText; + B_Prestige.ToolTip="-"; + + B_Unload.ButtonText=UnloadButtonText; + B_Unload.ToolTip=UnloadButtonToolTip; + + B_Reset.ButtonText=ResetButtonText; + B_Reset.ToolTip=ResetButtonToolTip; + Super.InitMenu(); } function ShowMenu() @@ -87,7 +112,7 @@ function Timer() } } OldPerkPoints = PendingPerk.CurrentSP; - PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")"); + PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName$" ("$Points$" "$PendingPerk.CurrentSP$")"); for( i=0; i"); + PerkLabel.SetText(NoPerkSelected); } } else if( PendingPerk!=None && OldPerkPoints!=PendingPerk.CurrentSP ) @@ -112,7 +137,7 @@ function Timer() B_Prestige.SetDisabled(!PendingPerk.CanPrestige()); OldPerkPoints = PendingPerk.CurrentSP; - PerkLabel.SetText("Lv"$PendingPerk.GetLevelString()@PendingPerk.PerkName$" (Points: "$PendingPerk.CurrentSP$")"); + PerkLabel.SetText(Level$PendingPerk.GetLevelString()@PendingPerk.PerkName$" ("$Points$" "$PendingPerk.CurrentSP$")"); for( i=0; i=TC.Default.NumLevels ) - S = "MAX\nN/A"; + S = MaxStr$"\n"$NotAviable; else { S = PendingPerk.PerkTraits[i].CurrentLevel$"/"$TC.Default.NumLevels$"\n"; if( TC.Static.MeetsRequirements(PendingPerk.PerkTraits[i].CurrentLevel,PendingPerk) ) S $= string(TC.Static.GetTraitCost(PendingPerk.PerkTraits[i].CurrentLevel)); - else S $= "N/A"; + else S $= NotAviable; } TraitsList.AddLine(TC.Default.TraitName$"\n"$S,i); TraitsList.ToolTip.AddItem(TC.Static.GetTooltipInfo()); @@ -260,7 +285,6 @@ function ButtonClicked( KFGUI_Button Sender ) defaultproperties { - // TODO: localize Begin Object Class=KFGUI_List Name=PerksList ID="Perks" XPosition=0 @@ -304,8 +328,6 @@ defaultproperties Begin Object Class=KFGUI_Button Name=ResetPerkButton ID="Reset" - ButtonText="Reset Level" - ToolTip="Reset this perk by unloading all stats, traits and set XP gained and level to 0" XPosition=0.25 YPosition=0.025 XSize=0.074 @@ -316,8 +338,6 @@ defaultproperties End Object Begin Object Class=KFGUI_Button Name=UnloadPerkButton ID="Unload" - ButtonText="Unload Perk" - ToolTip="Reset all spent points on this perk and refund the points in exchange of some XP" XPosition=0.325 YPosition=0.025 XSize=0.074 @@ -328,8 +348,6 @@ defaultproperties End Object Begin Object Class=KFGUI_Button Name=PrestigePerkButton ID="Prestige" - ButtonText="Prestige" - ToolTip="-" XPosition=0.4 YPosition=0.025 XSize=0.074