* Revert "Fix chat bubbles (#25643)" This reverts commit23d2c4d924. * Revert "Fixes obsolete Transform warnings in Content. (#25256)" This reverts commitf284b43ff6.
This commit is contained in:
@@ -2,7 +2,6 @@ using System.Numerics;
|
||||
using Content.Client.Chat.Managers;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Chat;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Graphics;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -17,7 +16,6 @@ namespace Content.Client.Chat.UI
|
||||
[Dependency] private readonly IEyeManager _eyeManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] protected readonly IConfigurationManager ConfigManager = default!;
|
||||
private readonly SharedTransformSystem _xformSystem;
|
||||
|
||||
public enum SpeechType : byte
|
||||
{
|
||||
@@ -84,7 +82,6 @@ namespace Content.Client.Chat.UI
|
||||
public SpeechBubble(ChatMessage message, EntityUid senderEntity, string speechStyleClass, Color? fontColor = null)
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
_xformSystem = _entityManager.System<SharedTransformSystem>();
|
||||
_senderEntity = senderEntity;
|
||||
|
||||
// Use text clipping so new messages don't overlap old ones being pushed up.
|
||||
@@ -143,7 +140,7 @@ namespace Content.Client.Chat.UI
|
||||
}
|
||||
|
||||
var offset = (-_eyeManager.CurrentEye.Rotation).ToWorldVec() * -EntityVerticalOffset;
|
||||
var worldPos = _xformSystem.GetWorldPosition(xform) + offset;
|
||||
var worldPos = xform.WorldPosition + offset;
|
||||
|
||||
var lowerCenter = _eyeManager.WorldToScreen(worldPos) / UIScale;
|
||||
var screenPos = lowerCenter - new Vector2(ContentSize.X / 2, ContentSize.Y + _verticalOffsetAchieved);
|
||||
|
||||
Reference in New Issue
Block a user