(fef7ff248) Workaround to missing "hold to unequip" text

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:40:15 +03:00
parent a5e869ccd0
commit f758ae9329
3 changed files with 93 additions and 98 deletions
@@ -543,7 +543,10 @@ namespace Barotrauma
//equipped item that can't be put in the inventory, use delayed dropping
if (quickUseAction == QuickUseAction.Drop)
{
slots[i].QuickUseButtonToolTip = "Hold to unequip";
slots[i].QuickUseButtonToolTip =
TextManager.Get("QuickUseAction.HoldToUnequip", returnNull: true) ??
(GameMain.Config.Language == "English" ? "Hold to unequip" : TextManager.Get("QuickUseAction.Unequip"));
if (PlayerInput.LeftButtonHeld())
{
slots[i].QuickUseTimer = Math.Max(0.1f, slots[i].QuickUseTimer + deltaTime);
@@ -218,6 +218,22 @@ namespace Barotrauma
return true;
}
private bool RefreshJoinButtonState(GUIComponent component, object obj)
{
if (obj == null || waitingForRefresh) { return false; }
if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text))
{
joinButton.Enabled = true;
}
else
{
joinButton.Enabled = false;
}
return true;
}
private bool SelectServer(GUIComponent component, object obj)
{
if (obj == null || waitingForRefresh) { return false; }