diff --git a/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs b/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs index dff2a4069e..c29f08d96f 100644 --- a/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/ExamineSystem.cs @@ -73,15 +73,14 @@ namespace Content.Client.GameObjects.EntitySystems public async void DoExamine(IEntity entity) { + const float minWidth = 300; CloseTooltip(); var popupPos = _inputManager.MouseScreenPosition; - - // Actually open the tooltip. _examineTooltipOpen = new Popup(); - _userInterfaceManager.StateRoot.AddChild(_examineTooltipOpen); + _userInterfaceManager.ModalRoot.AddChild(_examineTooltipOpen); var panel = new PanelContainer(); panel.AddStyleClass(StyleClassEntityTooltip); panel.ModulateSelfOverride = Color.LightGray.WithAlpha(0.90f); @@ -89,7 +88,7 @@ namespace Content.Client.GameObjects.EntitySystems //panel.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide); var vBox = new VBoxContainer(); panel.AddChild(vBox); - var hBox = new HBoxContainer { SeparationOverride = 5}; + var hBox = new HBoxContainer {SeparationOverride = 5}; vBox.AddChild(hBox); if (entity.TryGetComponent(out ISpriteComponent sprite)) { @@ -102,11 +101,8 @@ namespace Content.Client.GameObjects.EntitySystems SizeFlagsHorizontal = Control.SizeFlags.FillExpand, }); - const float minWidth = 300; var size = Vector2.ComponentMax((minWidth, 0), panel.CombinedMinimumSize); - popupPos += Vector2.ComponentMin(Vector2.Zero, _userInterfaceManager.StateRoot.Size - (size + popupPos)); - _examineTooltipOpen.Open(UIBox2.FromDimensions(popupPos, size)); if (entity.Uid.IsClientSide()) @@ -144,8 +140,6 @@ namespace Content.Client.GameObjects.EntitySystems break; } } - - //_examineTooltipOpen.Position += Vector2.ComponentMin(Vector2.Zero,_userInterfaceManager.StateRoot.Size - (panel.Size + _examineTooltipOpen.Position)); } public void CloseTooltip() diff --git a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs index 0f652a146a..d7d4ffeb8c 100644 --- a/Content.Client/GameObjects/EntitySystems/VerbSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/VerbSystem.cs @@ -67,7 +67,7 @@ namespace Content.Client.GameObjects.EntitySystems _currentEntity = entity.Uid; _currentPopup = new VerbPopup(); - _currentPopup.UserInterfaceManager.StateRoot.AddChild(_currentPopup); + _currentPopup.UserInterfaceManager.ModalRoot.AddChild(_currentPopup); _currentPopup.OnPopupHide += _closeContextMenu; _currentPopup.List.AddChild(new Label {Text = "Waiting on Server..."});