small action bar fixes (#21655)
This commit is contained in:
@@ -326,6 +326,7 @@ public sealed class ActionButton : Control, IEntityControl
|
|||||||
{
|
{
|
||||||
base.FrameUpdate(args);
|
base.FrameUpdate(args);
|
||||||
|
|
||||||
|
Cooldown.Visible = _action != null && _action.Cooldown != null;
|
||||||
if (_action == null)
|
if (_action == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class ActionButtonContainer : GridContainer
|
|||||||
public void SetActionData(ActionsSystem system, params EntityUid?[] actionTypes)
|
public void SetActionData(ActionsSystem system, params EntityUid?[] actionTypes)
|
||||||
{
|
{
|
||||||
var uniqueCount = Math.Min(system.GetClientActions().Count(), actionTypes.Length + 1);
|
var uniqueCount = Math.Min(system.GetClientActions().Count(), actionTypes.Length + 1);
|
||||||
|
if (ChildCount != uniqueCount)
|
||||||
BuildActionButtons(uniqueCount);
|
BuildActionButtons(uniqueCount);
|
||||||
|
|
||||||
for (var i = 0; i < uniqueCount; i++)
|
for (var i = 0; i < uniqueCount; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user