From a67c3f577bf914fc7fdae93a1d40ccc7b5ac51fc Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 1 Sep 2020 06:52:58 +0300 Subject: [PATCH] feat: Settings localization --- Localization/INT/ServerExt.int | Bin 41352 -> 43780 bytes ServerExt/Classes/UIP_Settings.uc | 49 ++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/Localization/INT/ServerExt.int b/Localization/INT/ServerExt.int index 65562d29ea07bf23159f018bea7b3db4cb7c4309..b27fdae73efee1f345f5825990414647382f8e2a 100644 GIT binary patch delta 2134 zcma)7%Wl&^6us&WBsQdg5SyV?f(lWIu22LBp(u(JhyrOh?3~6lR%1Ijfzoc0MHUqj zLdajhhBg1dKky$c*>TP|-sF zhmtN3Jvp5-Hh}A4za^f8c)!H$$ssV2V~Ig3>||JS+34!ldQxrXf@%zdeV99x0Z31= zPVlu%K^6of-Gu1_T(2QD!sQ`&T-o6>SS81Ew32Yo5irp;;1c5W+w|7N?7QY#)DCme z;F^wGX6EIL?pYG*iB6F1scZNW1uKm&sJNhExdUyK$WT7wE{}JScetCwR~em?rjMr; zE8Y%S&V^)_M*IL};7b!-uqQRFJakikWuase3Nm%bC`!FpB4!*|t3=1$C1$f_=D5Zy zG-3e5O)s#CWAsC)@w@ZhvbB~Jst$*hk+&=K%8ER0vxm^Z94dJ* z&yT{~F$2-;j0Mo7wH(|f-mWZ zM&*Dj3@pN;2Vr&lKae(JBFqBnTGZPV5SQt9JwD(F|>%_=T-^^~e@-JXK c+?E}SVgO?YEaO7Fp5lCt@sC;J-gDsp0~;Wg3IG5A delta 9 QcmZp<#?*0`X+y_C02VU@g8%>k diff --git a/ServerExt/Classes/UIP_Settings.uc b/ServerExt/Classes/UIP_Settings.uc index 5ea3903..99505b9 100644 --- a/ServerExt/Classes/UIP_Settings.uc +++ b/ServerExt/Classes/UIP_Settings.uc @@ -6,6 +6,29 @@ var KFGUI_TextLable KeyBindLabel; var name CurKeybind; var bool bSetKeybind,bDelayedSet; +var localized string FirstPersonLegsText; +var localized string FirstPersonLegsToolTip; +var localized string HideNameBeaconsText; +var localized string HideNameBeaconsToolTip; +var localized string HideKillMessagesText; +var localized string HideKillMessagesToolTip; +var localized string HideDamageMessagesText; +var localized string HideDamageMessagesToolTip; +var localized string HideDamagePopupText; +var localized string HideDamagePopupToolTip; +var localized string UseKf2DeathMessagesText; +var localized string UseKf2DeathMessagesToolTip; +var localized string UseKf2KillMessagesText; +var localized string UseKf2KillMessagesToolTip; +var localized string DontBecomeZombieText; +var localized string DontBecomeZombieToolTip; +var localized string NoScreenShakeText; +var localized string NoScreenShakeToolTip; +var localized string ButtonToggleBehindviewKeybindText; +var localized string ButtonToggleBehindviewKeybindToolTip; +var localized string ButtonPressButtonText; +var localized string NotSetText; + function InitMenu() { Super.InitMenu(); @@ -13,22 +36,22 @@ function InitMenu() // Client settings SettingsBox = KFGUI_ComponentList(FindComponentID('SettingsBox')); - // TODO: localize //AddCheckBox("Text-To-Speech:","Enable Text-to-Speech talk for player chat messages",'TTS', bool bDefault ); - AddCheckBox("First person legs:","Show first person body",'FP',class'ExtPlayerController'.Default.bShowFPLegs); + AddCheckBox(FirstPersonLegsText,FirstPersonLegsToolTip,'FP',class'ExtPlayerController'.Default.bShowFPLegs); if( class'ExtPlayerController'.Default.bShowFPLegs ) ExtPlayerController(GetPlayer()).ToggleFPBody(false); - AddCheckBox("Hide name beacons:","Hide the player name beacons",'NB',class'ExtPlayerController'.Default.bHideNameBeacons); - AddCheckBox("Hide kill messages:","Hide player kill messages",'KM',class'ExtPlayerController'.Default.bHideKillMsg); - AddCheckBox("Hide damage messages:","Hide player damage messages",'DM',class'ExtPlayerController'.Default.bHideDamageMsg); - AddCheckBox("Hide damage popup:","Hide damage popup messages",'PP',class'ExtPlayerController'.Default.bHideNumberMsg); - AddCheckBox("Use KF2 DeathMessages:","Use KF2 death message display format.",'K2DM',class'ExtPlayerController'.Default.bUseKF2DeathMessages); - AddCheckBox("Use KF2 Kill Messages:","Use KF2 kill message display format.",'K2KM',class'ExtPlayerController'.Default.bUseKF2KillMessages); - KeyBindButton = AddButton("","Toggle Behindview keybind:","With this desired button you can toggle your behindview (click to change it)",'KB',KeyBindLabel); - AddCheckBox("Don't become zombie:","Disable zombie player mode (for game modes that support it)",'ZP',class'ExtPlayerController'.Default.bNoMonsterPlayer); - AddCheckBox("No screen shake:","Disable screen shake (from explosions)",'NS',class'ExtPlayerController'.Default.bNoScreenShake); + AddCheckBox(HideNameBeaconsText,HideNameBeaconsToolTip,'NB',class'ExtPlayerController'.Default.bHideNameBeacons); + AddCheckBox(HideKillMessagesText,HideKillMessagesToolTip,'KM',class'ExtPlayerController'.Default.bHideKillMsg); + AddCheckBox(HideDamageMessagesText,HideDamageMessagesToolTip,'DM',class'ExtPlayerController'.Default.bHideDamageMsg); + AddCheckBox(HideDamagePopupText,HideDamagePopupToolTip,'PP',class'ExtPlayerController'.Default.bHideNumberMsg); + AddCheckBox(UseKf2DeathMessagesText,UseKf2DeathMessagesToolTip,'K2DM',class'ExtPlayerController'.Default.bUseKF2DeathMessages); + AddCheckBox(UseKf2KillMessagesText,UseKf2KillMessagesToolTip,'K2KM',class'ExtPlayerController'.Default.bUseKF2KillMessages); + KeyBindButton = AddButton("",ButtonToggleBehindviewKeybindText,ButtonToggleBehindviewKeybindToolTip,'KB',KeyBindLabel); + AddCheckBox(DontBecomeZombieText,DontBecomeZombieToolTip,'ZP',class'ExtPlayerController'.Default.bNoMonsterPlayer); + AddCheckBox(NoScreenShakeText,NoScreenShakeToolTip,'NS',class'ExtPlayerController'.Default.bNoScreenShake); InitBehindviewKey(); } + final function InitBehindviewKey() { local PlayerInput IN; @@ -46,7 +69,7 @@ final function InitBehindviewKey() break; } } - KeyBindButton.ButtonText = (CurKeybind!='' ? string(CurKeybind) : ""); + KeyBindButton.ButtonText = (CurKeybind!='' ? string(CurKeybind) : NotSetText); } final function KFGUI_CheckBox AddCheckBox( string Cap, string TT, name IDN, bool bDefault ) { @@ -132,7 +155,7 @@ function ButtonClicked( KFGUI_Button Sender ) switch( Sender.ID ) { case 'KB': - KeyBindButton.ButtonText = "Press a button"; // TODO: localize + KeyBindButton.ButtonText = ButtonPressButtonText; KeyBindButton.SetDisabled(true); GrabKeyFocus(); bSetKeybind = true;