feat: ResetPerk localization

This commit is contained in:
GenZmeY 2020-08-12 14:55:02 +03:00
parent d07c52ea4c
commit c01c7629b6
2 changed files with 18 additions and 6 deletions

Binary file not shown.

View File

@ -1,18 +1,35 @@
Class UI_ResetWarning extends KFGUI_FloatingWindow;
var KFGUI_TextField InfoLabel;
var KFGUI_Button YesButton, NoButton;
var class<Ext_PerkBase> PerkToReset;
var bool bIsPrestige;
var localized string TitleText;
var localized string YesButtonText;
var localized string YesButtonToolTip;
var localized string NoButtonText;
var localized string NobuttonToolTip;
var localized string InfoText;
function InitMenu()
{
InfoLabel = KFGUI_TextField(FindComponentID('Info'));
YesButton = KFGUI_Button(FindComponentID('Yes'));
NoButton = KFGUI_Button(FindComponentID('No'));
YesButton.ButtonText=YesButtonText;
YesButton.Tooltip=YesButtonToolTip;
NoButton.ButtonText=NoButtonText;
NoButton.Tooltip=NobuttonToolTip;
InfoLabel.SetText(InfoText);
Super.InitMenu();
}
function SetupTo( Ext_PerkBase P )
{
PerkToReset = P.Class;
WindowTitle = "WARNING: Reset "$P.PerkName; // TODO: localize
WindowTitle = TitleText$" "$P.PerkName;
}
function ButtonClicked( KFGUI_Button Sender )
{
@ -45,12 +62,9 @@ defaultproperties
YPosition=0.12
XSize=0.98
YSize=0.775
Text="#{FF0000}WARNING:#{DEF} If you reset your perk to initial status, you can not undo this operation!|#{FF0000}All your gained XP and level (including prestige level) will be reset to 0.#{DEF}|Do NOT cry to an admin later if this was a mistake!||Are you sure you want to do this?"
End Object
Begin Object Class=KFGUI_Button Name=YesButten
ID="Yes"
ButtonText="YES"
Tooltip="Reset the perk (you can not undo this action!)"
XPosition=0.2
YPosition=0.9
XSize=0.29
@ -61,8 +75,6 @@ defaultproperties
End Object
Begin Object Class=KFGUI_Button Name=NoButten
ID="No"
ButtonText="ABORT"
Tooltip="Abort without doing anything"
XPosition=0.5
YPosition=0.9
XSize=0.29