From c74aa02086e1bac4d226a1e527fdbcc295fe2293 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 1 Sep 2020 07:02:33 +0300 Subject: [PATCH] feat: trait buy localization --- Localization/INT/ServerExt.int | Bin 43780 -> 44242 bytes ServerExt/Classes/UIR_TraitInfoPopup.uc | 22 ++++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Localization/INT/ServerExt.int b/Localization/INT/ServerExt.int index b27fdae73efee1f345f5825990414647382f8e2a..3dc0f51f0237a44b346ae7faa0f422c28338adc0 100644 GIT binary patch delta 241 zcmZp<#&qc>(*~B+;k*o73?LlM5X#`m5X2DA5W-NzkjRk9Py*!VF{Cl%GXwx}0YfPe z$AZ;50of%$m=BZ(u`7XkQW+|MBDM@l5Ru6r>xEgta+4QM6P8BE`U1_aU{GMl0qQ6N z;vA4lb(ksnKr?fI=41lx0+|&6G`)x+nIQwHtC%5mvZ9vcaNHEptWgEIi0VL6)s delta 9 Qcmca~ld0tz(*~B+02opPX#fBK diff --git a/ServerExt/Classes/UIR_TraitInfoPopup.uc b/ServerExt/Classes/UIR_TraitInfoPopup.uc index f30c92f..73e0810 100644 --- a/ServerExt/Classes/UIR_TraitInfoPopup.uc +++ b/ServerExt/Classes/UIR_TraitInfoPopup.uc @@ -2,18 +2,32 @@ Class UIR_TraitInfoPopup extends KFGUI_FloatingWindow; var KFGUI_TextField TraitInfo; var KFGUI_Button YesButton; +var KFGUI_Button NoButton; var class MyTrait; var int TraitIndex; var Ext_PerkBase MyPerk; var int OldPoints,OldLevel; +var localized string ButtonBuyText; +var localized string ButtonBuyDisabledText; +var localized string ButtonBuyTooltip; +var localized string ButtonCancelText; +var localized string ButtonCancelTooltip; + function InitMenu() { TraitInfo = KFGUI_TextField(FindComponentID('Info')); YesButton = KFGUI_Button(FindComponentID('Yes')); + NoButton = KFGUI_Button(FindComponentID('No')); + + NoButton.ButtonText=ButtonCancelText; + NoButton.Tooltip=ButtonCancelTooltip; + YesButton.Tooltip=ButtonBuyTooltip; + Super.InitMenu(); } + function CloseMenu() { Super.CloseMenu(); @@ -45,12 +59,12 @@ function Timer() OldLevel = MyPerk.PerkTraits[TraitIndex].CurrentLevel; if( OldLevel>=MyTrait.Default.NumLevels ) { - YesButton.ButtonText = "Max level"; + YesButton.ButtonText = ButtonBuyDisabledText; YesButton.SetDisabled(true); return; } Cost = MyTrait.Static.GetTraitCost(OldLevel); - YesButton.ButtonText = "Buy ("$Cost$")"; // TODO: localize + YesButton.ButtonText = ButtonBuyText$" ("$Cost$")"; if( Cost>OldPoints || !MyTrait.Static.MeetsRequirements(OldLevel,MyPerk) ) YesButton.SetDisabled(true); else YesButton.SetDisabled(false); @@ -78,7 +92,6 @@ defaultproperties bAlwaysTop=true bOnlyThisFocus=true - // TODO: localize Begin Object Class=KFGUI_TextField Name=TraitInfoLbl ID="Info" XPosition=0.05 @@ -88,7 +101,6 @@ defaultproperties End Object Begin Object Class=KFGUI_Button Name=BuyButten ID="Yes" - Tooltip="Purchase this trait (you can not undo this action!)" XPosition=0.3 YPosition=0.91 XSize=0.19 @@ -99,8 +111,6 @@ defaultproperties End Object Begin Object Class=KFGUI_Button Name=CancelButten ID="No" - ButtonText="Cancel" - Tooltip="Abort without doing anything" XPosition=0.5 YPosition=0.91 XSize=0.19