Added set English language checkbox (#4898)
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ using Robust.Client.Graphics;
|
||||
using Robust.Client.Input;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Input.Binding;
|
||||
@@ -620,12 +621,14 @@ namespace Content.Client.HUD
|
||||
{
|
||||
_inputManager.OnKeyBindingAdded += OnKeyBindingChanged;
|
||||
_inputManager.OnKeyBindingRemoved += OnKeyBindingChanged;
|
||||
_inputManager.OnInputModeChanged += OnKeyBindingChanged;
|
||||
}
|
||||
|
||||
protected override void ExitedTree()
|
||||
{
|
||||
_inputManager.OnKeyBindingAdded -= OnKeyBindingChanged;
|
||||
_inputManager.OnKeyBindingRemoved -= OnKeyBindingChanged;
|
||||
_inputManager.OnInputModeChanged -= OnKeyBindingChanged;
|
||||
}
|
||||
|
||||
|
||||
@@ -634,6 +637,11 @@ namespace Content.Client.HUD
|
||||
_label.Text = ShortKeyName(_function);
|
||||
}
|
||||
|
||||
private void OnKeyBindingChanged()
|
||||
{
|
||||
_label.Text = ShortKeyName(_function);
|
||||
}
|
||||
|
||||
private string ShortKeyName(BoundKeyFunction keyFunction)
|
||||
{
|
||||
// need to use shortened key names so they fit in the buttons.
|
||||
|
||||
Reference in New Issue
Block a user