#3814 - dropping an item, which adds an action to the actions bar, wi… (#4123)

* #3814 - dropping an item, which adds an action to the actions bar, will no longer leave weird ui glitch in actions bar

* #3814 - small reformat + minor style tweaks

* #3814 - bit better working ActionMenu locking + added missing toolips for ActionMenu lock and OpenAbilities button

* #3814 - tooltip text typo fix

* #3814 - incorporated suggestions

* #3814 localization tweaks
This commit is contained in:
Galactic Chimp
2021-06-19 12:41:43 +02:00
committed by GitHub
parent 53671aeee7
commit cfc3f2e7fc
5 changed files with 42 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Input;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Log;
using Robust.Shared.Timing;
@@ -25,6 +26,7 @@ namespace Content.Client.Actions.UI
/// </summary>
public sealed class ActionsUI : Container
{
private const float CustomTooltipDelay = 0.4f;
private readonly ClientActionsComponent _actionsComponent;
private readonly ActionManager _actionManager;
private readonly IEntityManager _entityManager;
@@ -128,7 +130,9 @@ namespace Content.Client.Actions.UI
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f)
Scale = (0.5f, 0.5f),
ToolTip = Loc.GetString("ui-actionmenu-function-lock-action-slots"),
TooltipDelay = CustomTooltipDelay
};
settingsContainer.AddChild(_lockButton);
settingsContainer.AddChild(new Control { HorizontalExpand = true, SizeFlagsStretchRatio = 2 });
@@ -138,7 +142,9 @@ namespace Content.Client.Actions.UI
HorizontalAlignment = HAlignment.Center,
VerticalAlignment = VAlignment.Center,
SizeFlagsStretchRatio = 1,
Scale = (0.5f, 0.5f)
Scale = (0.5f, 0.5f),
ToolTip = Loc.GetString("ui-actionmenu-function-open-abilities-menu"),
TooltipDelay = CustomTooltipDelay
};
settingsContainer.AddChild(_settingsButton);
settingsContainer.AddChild(new Control { HorizontalExpand = true, SizeFlagsStretchRatio = 1 });