Various UI warnings cleanup (#36169)
* Various UI warnings cleanup * Revert unnecessary change * Redoing SpriteSystem as it's non-injectable * Missed one * Better entity instantiation * General cleanup of warnings changes * Wrong class name!
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Content.Client.SprayPainter.UI;
|
||||
public sealed partial class SprayPainterWindow : DefaultWindow
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
|
||||
private readonly SpriteSystem _spriteSystem;
|
||||
|
||||
public Action<ItemList.ItemListSelectedEventArgs>? OnSpritePicked;
|
||||
@@ -32,17 +34,17 @@ public sealed partial class SprayPainterWindow : DefaultWindow
|
||||
_spriteSystem = _sysMan.GetEntitySystem<SpriteSystem>();
|
||||
}
|
||||
|
||||
private static string GetColorLocString(string? colorKey)
|
||||
private string GetColorLocString(string? colorKey)
|
||||
{
|
||||
if (string.IsNullOrEmpty(colorKey))
|
||||
return Loc.GetString("pipe-painter-no-color-selected");
|
||||
var locKey = colorLocKeyPrefix + colorKey;
|
||||
|
||||
if (!Loc.TryGetString(locKey, out var locString))
|
||||
if (!_loc.TryGetString(locKey, out var locString))
|
||||
locString = colorKey;
|
||||
|
||||
return locString;
|
||||
}
|
||||
}
|
||||
|
||||
public string? IndexToColorKey(int index)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user