feat: MapRank localization

This commit is contained in:
GenZmeY 2020-09-01 06:34:47 +03:00
parent d519e2e772
commit 4eb6bb074a
2 changed files with 27 additions and 6 deletions

Binary file not shown.

View File

@ -2,11 +2,37 @@ Class xUI_MapRank extends KFGUI_Page;
var xVotingReplication RepInfo;
var KFGUI_TextLable InfoLabel;
var KFGUI_Button YesButton;
var KFGUI_Button NoButton;
var localized string InfoText;
var localized string YesButtonText;
var localized string YesButtonToolTip;
var localized string NoButtonText;
var localized string NoButtonToolTip;
function InitMenu()
{
Super.InitMenu();
YesButton = KFGUI_Button(FindComponentID('Yes'));
NoButton = KFGUI_Button(FindComponentID('No'));
InfoLabel = KFGUI_TextLable(FindComponentID('Info'));
InfoLabel.SetText(InfoText);
YesButton.ButtonText=YesButtonText;
YesButton.ToolTip=YesButtonToolTip;
NoButton.ButtonText=NoButtonText;
NoButton.ToolTip=NoButtonToolTip;
}
function CloseMenu()
{
Super.CloseMenu();
RepInfo = None;
}
function ButtonClicked( KFGUI_Button Sender )
{
switch( Sender.ID )
@ -32,15 +58,14 @@ defaultproperties
XSize=0.3
YSize=0.2
// TODO: localize
Begin Object Class=KFGUI_TextLable Name=InfoLabel
ID="Info"
XPosition=0.1
YPosition=0.15
XSize=0.8
YSize=0.35
AlignX=1
AlignY=1
Text="Did you like this map?"
End Object
Begin Object Class=KFGUI_Button Name=YesButton
XPosition=0.3
@ -48,8 +73,6 @@ defaultproperties
XSize=0.2
YSize=0.3
ID="Yes"
ButtonText="Like"
ToolTip="Press this if you liked this map."
OnClickLeft=ButtonClicked
OnClickRight=ButtonClicked
ExtravDir=1
@ -61,8 +84,6 @@ defaultproperties
XSize=0.2
YSize=0.3
ID="No"
ButtonText="Dislike"
ToolTip="Press this if you disliked this map."
OnClickLeft=ButtonClicked
OnClickRight=ButtonClicked
TextColor=(R=255,G=128,B=128,A=255)