Revert "Remove some BUI boilerplate" (#30214)
Revert "Remove some BUI boilerplate (#28399)"
This reverts commit cbf329a82d.
This commit is contained in:
@@ -17,7 +17,6 @@ namespace Content.Client.Paper.UI
|
||||
public sealed partial class PaperWindow : BaseWindow
|
||||
{
|
||||
[Dependency] private readonly IInputManager _inputManager = default!;
|
||||
[Dependency] private readonly IResourceCache _resCache = default!;
|
||||
|
||||
private static Color DefaultTextColor = new(25, 25, 25);
|
||||
|
||||
@@ -86,10 +85,11 @@ namespace Content.Client.Paper.UI
|
||||
// Randomize the placement of any stamps based on the entity UID
|
||||
// so that there's some variety in different papers.
|
||||
StampDisplay.PlacementSeed = (int)entity;
|
||||
var resCache = IoCManager.Resolve<IResourceCache>();
|
||||
|
||||
// Initialize the background:
|
||||
PaperBackground.ModulateSelfOverride = visuals.BackgroundModulate;
|
||||
var backgroundImage = visuals.BackgroundImagePath != null? _resCache.GetResource<TextureResource>(visuals.BackgroundImagePath) : null;
|
||||
var backgroundImage = visuals.BackgroundImagePath != null? resCache.GetResource<TextureResource>(visuals.BackgroundImagePath) : null;
|
||||
if (backgroundImage != null)
|
||||
{
|
||||
var backgroundImageMode = visuals.BackgroundImageTile ? StyleBoxTexture.StretchMode.Tile : StyleBoxTexture.StretchMode.Stretch;
|
||||
@@ -127,7 +127,7 @@ namespace Content.Client.Paper.UI
|
||||
PaperContent.ModulateSelfOverride = visuals.ContentImageModulate;
|
||||
WrittenTextLabel.ModulateSelfOverride = visuals.FontAccentColor;
|
||||
|
||||
var contentImage = visuals.ContentImagePath != null ? _resCache.GetResource<TextureResource>(visuals.ContentImagePath) : null;
|
||||
var contentImage = visuals.ContentImagePath != null ? resCache.GetResource<TextureResource>(visuals.ContentImagePath) : null;
|
||||
if (contentImage != null)
|
||||
{
|
||||
// Setup the paper content texture, but keep a reference to it, as we can't set
|
||||
|
||||
Reference in New Issue
Block a user