feat: NewsPage localization

This commit is contained in:
GenZmeY 2020-08-12 18:31:04 +03:00
parent 649332947b
commit ee17235bf4
2 changed files with 7 additions and 2 deletions

Binary file not shown.

View File

@ -4,6 +4,9 @@ var KFGUI_TextField NewsField;
var string WebsiteURL; var string WebsiteURL;
var KFGUI_Button WebsiteButton; var KFGUI_Button WebsiteButton;
var localized string WebSiteButtonText;
var localized string WebsiteButtonToolTip;
function InitMenu() function InitMenu()
{ {
Super.InitMenu(); Super.InitMenu();
@ -11,6 +14,9 @@ function InitMenu()
// Client settings // Client settings
NewsField = KFGUI_TextField(FindComponentID('News')); NewsField = KFGUI_TextField(FindComponentID('News'));
WebsiteButton = KFGUI_Button(FindComponentID('Website')); WebsiteButton = KFGUI_Button(FindComponentID('Website'));
WebsiteButton.ButtonText=WebSiteButtonText;
Timer(); Timer();
} }
function ShowMenu() function ShowMenu()
@ -23,7 +29,7 @@ function ShowMenu()
if( !WebsiteButton.bDisabled ) if( !WebsiteButton.bDisabled )
{ {
WebsiteURL = GRI.ServerAdInfo.WebsiteLink; WebsiteURL = GRI.ServerAdInfo.WebsiteLink;
WebsiteButton.ChangeToolTip("Visit the server website at: "$WebsiteURL); // TODO: localize WebsiteButton.ChangeToolTip(WebsiteButtonToolTip$" "$WebsiteURL);
} }
} }
function Timer() function Timer()
@ -53,7 +59,6 @@ defaultproperties
End Object End Object
Begin Object Class=KFGUI_Button Name=WebSiteButton Begin Object Class=KFGUI_Button Name=WebSiteButton
ID="Website" ID="Website"
ButtonText="Visit Website"
XPosition=0.44 XPosition=0.44
YPosition=0.92 YPosition=0.92
XSize=0.12 XSize=0.12