Admin Overlay stacking and ghost hiding (#35622)

* ghostbuster mouse and overlay stacks

* variable adjustment

* use map coords for distance check

* vertical stack ordering, and cvars

* skreee

* fix stack merge 'sidedness' issue

* overlays no longer try to stack to overlays at the wrong coordinates

* options slider for stack merge distance

* admin option sliders for ghost fade/hide

* Update AdminOptionsTab.xaml.cs

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
Errant
2025-03-25 21:15:22 +01:00
committed by GitHub
parent 098e594161
commit c82d531a8f
5 changed files with 156 additions and 31 deletions

View File

@@ -8,6 +8,13 @@ namespace Content.Client.Options.UI.Tabs;
[GenerateTypedNameReferences]
public sealed partial class AdminOptionsTab : Control
{
private const float OverlayMergeMin = 0.05f;
private const float OverlayMergeMax = 0.95f;
private const int OverlayGhostFadeMin = 0;
private const int OverlayGhostFadeMax = 10;
private const int OverlayGhostHideMin = 0;
private const int OverlayGhostHideMax = 5;
public AdminOptionsTab()
{
RobustXamlLoader.Load(this);
@@ -22,6 +29,24 @@ public sealed partial class AdminOptionsTab : Control
Control.AddOptionCheckBox(CCVars.AdminOverlayStartingJob, EnableOverlayStartingJobCheckBox);
Control.Initialize();
Control.AddOptionPercentSlider(
CCVars.AdminOverlayMergeDistance,
OverlayMergeDistanceSlider,
OverlayMergeMin,
OverlayMergeMax);
Control.AddOptionSlider(
CCVars.AdminOverlayGhostFadeDistance,
OverlayGhostFadeSlider,
OverlayGhostFadeMin,
OverlayGhostFadeMax);
Control.AddOptionSlider(
CCVars.AdminOverlayGhostHideDistance,
OverlayGhostHideSlider,
OverlayGhostHideMin,
OverlayGhostHideMax);
}
}