mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* fix: thermals and night vision now work * fix: it has to be this way Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * fix: I hate the way they are separated * fix: now cult actions close examine menu (#1046) Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * fix: railins and some other things now dont snap to south upon being built (#1029) * fix: who did this translation wtf * fix: assball bat can now wideswing (#1030) Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * fix: spend flares are actually spent now (#959) Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * fix: made part exchange system a bit less shitty I really have no time or interest in it to rewrite it completely rn Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * fix: fixed cult factories timers being broken Also fixed them being openable by anyone. Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> * Apply suggestions from code review Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com> Co-authored-by: RedFoxIV <38788538+RedFoxIV@users.noreply.github.com> --------- Signed-off-by: Remuchi <RemuchiOfficial@gmail.com> Co-authored-by: Spatison <137375981+Spatison@users.noreply.github.com> Co-authored-by: RedFoxIV <38788538+RedFoxIV@users.noreply.github.com>
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using Content.Client._White.UserInterface.Controls;
|
|
using Content.Shared._White.RadialSelector;
|
|
using JetBrains.Annotations;
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
// White Dream Code but moved to general folder for consistency
|
|
|
|
namespace Content.Client.RadialSelector;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class TrackedRadialSelectorMenuBUI(EntityUid owner, Enum uiKey) : BasedRadialSelectorMenuBUI(owner, uiKey)
|
|
{
|
|
private readonly TrackedRadialMenu _menu = new()
|
|
{
|
|
HorizontalExpand = true,
|
|
VerticalExpand = true,
|
|
BackButtonStyleClass = "RadialMenuBackButton",
|
|
CloseButtonStyleClass = "RadialMenuCloseButton"
|
|
};
|
|
|
|
private EntityUid? _trackedEntity;
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu.OnClose += Close;
|
|
_menu.Track(_trackedEntity ?? Owner);
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
|
|
if (state is not TrackedRadialSelectorState trackedRadialSelectorState)
|
|
return;
|
|
|
|
ClearExistingContainers(_menu);
|
|
CreateMenu(trackedRadialSelectorState.Entries, _menu);
|
|
|
|
_trackedEntity = EntMan.GetEntity(trackedRadialSelectorState.TrackedEntity);
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
if (disposing)
|
|
_menu.Dispose();
|
|
}
|
|
}
|