Removed LocalizationManager dependencies (#2059)
* Removed LocalizationManager dependencies * Fixed error Co-authored-by: David Tan <>
This commit is contained in:
@@ -15,8 +15,6 @@ namespace Content.Client.UserInterface.Cargo
|
||||
{
|
||||
public class CargoConsoleMenu : SS14Window
|
||||
{
|
||||
[Dependency] private readonly ILocalizationManager _loc = default!;
|
||||
|
||||
protected override Vector2? CustomSize => (400, 600);
|
||||
|
||||
public CargoConsoleBoundUserInterface Owner { get; private set; }
|
||||
@@ -48,15 +46,15 @@ namespace Content.Client.UserInterface.Cargo
|
||||
Owner = owner;
|
||||
|
||||
if (Owner.RequestOnly)
|
||||
Title = _loc.GetString("Cargo Request Console");
|
||||
Title = Loc.GetString("Cargo Request Console");
|
||||
else
|
||||
Title = _loc.GetString("Cargo Shuttle Console");
|
||||
Title = Loc.GetString("Cargo Shuttle Console");
|
||||
|
||||
var rows = new VBoxContainer();
|
||||
|
||||
var accountName = new HBoxContainer();
|
||||
var accountNameLabel = new Label {
|
||||
Text = _loc.GetString("Account Name: "),
|
||||
Text = Loc.GetString("Account Name: "),
|
||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||
};
|
||||
_accountNameLabel = new Label {
|
||||
@@ -69,7 +67,7 @@ namespace Content.Client.UserInterface.Cargo
|
||||
var points = new HBoxContainer();
|
||||
var pointsLabel = new Label
|
||||
{
|
||||
Text = _loc.GetString("Points: "),
|
||||
Text = Loc.GetString("Points: "),
|
||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||
};
|
||||
_pointsLabel = new Label
|
||||
@@ -83,12 +81,12 @@ namespace Content.Client.UserInterface.Cargo
|
||||
var shuttleStatus = new HBoxContainer();
|
||||
var shuttleStatusLabel = new Label
|
||||
{
|
||||
Text = _loc.GetString("Shuttle Status: "),
|
||||
Text = Loc.GetString("Shuttle Status: "),
|
||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||
};
|
||||
_shuttleStatusLabel = new Label
|
||||
{
|
||||
Text = _loc.GetString("Away") // Shuttle.Status
|
||||
Text = Loc.GetString("Away") // Shuttle.Status
|
||||
};
|
||||
shuttleStatus.AddChild(shuttleStatusLabel);
|
||||
shuttleStatus.AddChild(_shuttleStatusLabel);
|
||||
@@ -97,7 +95,7 @@ namespace Content.Client.UserInterface.Cargo
|
||||
var shuttleCapacity = new HBoxContainer();
|
||||
var shuttleCapacityLabel = new Label
|
||||
{
|
||||
Text = _loc.GetString("Order Capacity: "),
|
||||
Text = Loc.GetString("Order Capacity: "),
|
||||
StyleClasses = { StyleNano.StyleClassLabelKeyText }
|
||||
};
|
||||
_shuttleCapacityLabel = new Label
|
||||
@@ -111,13 +109,13 @@ namespace Content.Client.UserInterface.Cargo
|
||||
var buttons = new HBoxContainer();
|
||||
CallShuttleButton = new Button()
|
||||
{
|
||||
Text = _loc.GetString("Call Shuttle"),
|
||||
Text = Loc.GetString("Call Shuttle"),
|
||||
TextAlign = Label.AlignMode.Center,
|
||||
SizeFlagsHorizontal = SizeFlags.FillExpand
|
||||
};
|
||||
PermissionsButton = new Button()
|
||||
{
|
||||
Text = _loc.GetString("Permissions"),
|
||||
Text = Loc.GetString("Permissions"),
|
||||
TextAlign = Label.AlignMode.Center
|
||||
};
|
||||
buttons.AddChild(CallShuttleButton);
|
||||
@@ -127,13 +125,13 @@ namespace Content.Client.UserInterface.Cargo
|
||||
var category = new HBoxContainer();
|
||||
_categories = new OptionButton
|
||||
{
|
||||
Prefix = _loc.GetString("Categories: "),
|
||||
Prefix = Loc.GetString("Categories: "),
|
||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||
SizeFlagsStretchRatio = 1
|
||||
};
|
||||
_searchBar = new LineEdit
|
||||
{
|
||||
PlaceHolder = _loc.GetString("Search"),
|
||||
PlaceHolder = Loc.GetString("Search"),
|
||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||
SizeFlagsStretchRatio = 1
|
||||
};
|
||||
@@ -166,14 +164,14 @@ namespace Content.Client.UserInterface.Cargo
|
||||
SizeFlagsVertical = SizeFlags.FillExpand
|
||||
};
|
||||
var rAndOVBox = new VBoxContainer();
|
||||
var requestsLabel = new Label { Text = _loc.GetString("Requests") };
|
||||
var requestsLabel = new Label { Text = Loc.GetString("Requests") };
|
||||
_requests = new VBoxContainer // replace with scroll box so that approval buttons can be added
|
||||
{
|
||||
StyleClasses = { "transparentItemList" },
|
||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||
SizeFlagsStretchRatio = 1,
|
||||
};
|
||||
var ordersLabel = new Label { Text = _loc.GetString("Orders") };
|
||||
var ordersLabel = new Label { Text = Loc.GetString("Orders") };
|
||||
_orders = new VBoxContainer
|
||||
{
|
||||
StyleClasses = { "transparentItemList" },
|
||||
@@ -262,14 +260,14 @@ namespace Content.Client.UserInterface.Cargo
|
||||
_categoryStrings.Clear();
|
||||
_categories.Clear();
|
||||
|
||||
_categoryStrings.Add(_loc.GetString("All"));
|
||||
_categoryStrings.Add(Loc.GetString("All"));
|
||||
|
||||
var search = _searchBar.Text.Trim().ToLowerInvariant();
|
||||
foreach (var prototype in Owner.Market.Products)
|
||||
{
|
||||
if (!_categoryStrings.Contains(prototype.Category))
|
||||
{
|
||||
_categoryStrings.Add(_loc.GetString(prototype.Category));
|
||||
_categoryStrings.Add(Loc.GetString(prototype.Category));
|
||||
}
|
||||
}
|
||||
_categoryStrings.Sort();
|
||||
|
||||
Reference in New Issue
Block a user