Fix GhostRoleRadio icons (#30650)
Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -22,7 +22,7 @@ public sealed class GhostRoleRadioBoundUserInterface : BoundUserInterface
|
|||||||
_ghostRoleRadioMenu.SendGhostRoleRadioMessageAction += SendGhostRoleRadioMessage;
|
_ghostRoleRadioMenu.SendGhostRoleRadioMessageAction += SendGhostRoleRadioMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendGhostRoleRadioMessage(ProtoId<GhostRolePrototype> protoId)
|
private void SendGhostRoleRadioMessage(ProtoId<GhostRolePrototype> protoId)
|
||||||
{
|
{
|
||||||
SendMessage(new GhostRoleRadioMessage(protoId));
|
SendMessage(new GhostRoleRadioMessage(protoId));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Content.Client.UserInterface.Controls;
|
using Content.Client.UserInterface.Controls;
|
||||||
using Content.Shared.Ghost.Roles;
|
using Content.Shared.Ghost.Roles;
|
||||||
using Content.Shared.Ghost.Roles.Components;
|
using Content.Shared.Ghost.Roles.Components;
|
||||||
using Robust.Client.GameObjects;
|
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.XAML;
|
using Robust.Client.UserInterface.XAML;
|
||||||
@@ -33,7 +32,7 @@ public sealed partial class GhostRoleRadioMenu : RadialMenu
|
|||||||
|
|
||||||
private void RefreshUI()
|
private void RefreshUI()
|
||||||
{
|
{
|
||||||
// The main control that will contain all of the clickable options
|
// The main control that will contain all the clickable options
|
||||||
var main = FindControl<RadialContainer>("Main");
|
var main = FindControl<RadialContainer>("Main");
|
||||||
|
|
||||||
// The purpose of this radial UI is for ghost role radios that allow you to select
|
// The purpose of this radial UI is for ghost role radios that allow you to select
|
||||||
@@ -70,7 +69,7 @@ public sealed partial class GhostRoleRadioMenu : RadialMenu
|
|||||||
if (_prototypeManager.TryIndex(ghostRoleProto.IconPrototype, out var iconProto))
|
if (_prototypeManager.TryIndex(ghostRoleProto.IconPrototype, out var iconProto))
|
||||||
entProtoView.SetPrototype(iconProto);
|
entProtoView.SetPrototype(iconProto);
|
||||||
else
|
else
|
||||||
entProtoView.SetPrototype(comp.Prototype);
|
entProtoView.SetPrototype(ghostRoleProto.EntityPrototype);
|
||||||
|
|
||||||
button.AddChild(entProtoView);
|
button.AddChild(entProtoView);
|
||||||
main.AddChild(button);
|
main.AddChild(button);
|
||||||
|
|||||||
Reference in New Issue
Block a user