Remove encapsulation for previously protected XAML UI fields (#4975)
This commit is contained in:
@@ -4,12 +4,12 @@
|
|||||||
MinWidth="500">
|
MinWidth="500">
|
||||||
<GridContainer Columns="1">
|
<GridContainer Columns="1">
|
||||||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
|
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
|
||||||
<LineEdit Name="_announcer" PlaceHolder="{Loc 'announcer-placeholder'}" Text="{Loc 'Central Command'}" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
|
<LineEdit Name="Announcer" Access="Public" PlaceHolder="{Loc 'announcer-placeholder'}" Text="{Loc 'Central Command'}" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
|
||||||
<Control HorizontalExpand="True" SizeFlagsStretchRatio="1" />
|
<Control HorizontalExpand="True" SizeFlagsStretchRatio="1" />
|
||||||
<OptionButton Name="_announceMethod" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
|
<OptionButton Name="AnnounceMethod" Access="Public" HorizontalExpand="True" SizeFlagsStretchRatio="2"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<LineEdit Name="_announcement" PlaceHolder="{Loc 'announcement-placeholder'}"/>
|
<LineEdit Name="Announcement" Access="Public" PlaceHolder="{Loc 'announcement-placeholder'}"/>
|
||||||
|
|
||||||
<Button Name="_announceButton" Disabled="True" Text="{Loc 'Announce'}" HorizontalAlignment="Center"/>
|
<Button Name="AnnounceButton" Access="Public" Disabled="True" Text="{Loc 'Announce'}" HorizontalAlignment="Center"/>
|
||||||
</GridContainer>
|
</GridContainer>
|
||||||
</SS14Window>
|
</SS14Window>
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ namespace Content.Client.Administration.UI
|
|||||||
public partial class AdminAnnounceWindow : SS14Window
|
public partial class AdminAnnounceWindow : SS14Window
|
||||||
{
|
{
|
||||||
[Dependency] private readonly ILocalizationManager _localization = default!;
|
[Dependency] private readonly ILocalizationManager _localization = default!;
|
||||||
public Button AnnounceButton => _announceButton;
|
|
||||||
public OptionButton AnnounceMethod => _announceMethod;
|
|
||||||
public LineEdit Announcer => _announcer;
|
|
||||||
public LineEdit Announcement => _announcement;
|
|
||||||
|
|
||||||
public AdminAnnounceWindow()
|
public AdminAnnounceWindow()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ namespace Content.Client.Alerts
|
|||||||
{
|
{
|
||||||
_alertControls.Remove(alertKeyToRemove, out var control);
|
_alertControls.Remove(alertKeyToRemove, out var control);
|
||||||
if (control == null) return;
|
if (control == null) return;
|
||||||
_ui.Grid.Children.Remove(control);
|
_ui.AlertContainer.Children.Remove(control);
|
||||||
}
|
}
|
||||||
|
|
||||||
// now we know that alertControls contains alerts that should still exist but
|
// now we know that alertControls contains alerts that should still exist but
|
||||||
@@ -145,7 +145,7 @@ namespace Content.Client.Alerts
|
|||||||
{
|
{
|
||||||
if (existingAlertControl != null)
|
if (existingAlertControl != null)
|
||||||
{
|
{
|
||||||
_ui.Grid.Children.Remove(existingAlertControl);
|
_ui.AlertContainer.Children.Remove(existingAlertControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is a new alert + alert key or just a different alert with the same
|
// this is a new alert + alert key or just a different alert with the same
|
||||||
@@ -154,12 +154,12 @@ namespace Content.Client.Alerts
|
|||||||
if (_alertOrder != null)
|
if (_alertOrder != null)
|
||||||
{
|
{
|
||||||
var added = false;
|
var added = false;
|
||||||
foreach (var alertControl in _ui.Grid.Children)
|
foreach (var alertControl in _ui.AlertContainer.Children)
|
||||||
{
|
{
|
||||||
if (_alertOrder.Compare(newAlert, ((AlertControl) alertControl).Alert) < 0)
|
if (_alertOrder.Compare(newAlert, ((AlertControl) alertControl).Alert) < 0)
|
||||||
{
|
{
|
||||||
var idx = alertControl.GetPositionInParent();
|
var idx = alertControl.GetPositionInParent();
|
||||||
_ui.Grid.Children.Add(newAlertControl);
|
_ui.AlertContainer.Children.Add(newAlertControl);
|
||||||
newAlertControl.SetPositionInParent(idx);
|
newAlertControl.SetPositionInParent(idx);
|
||||||
added = true;
|
added = true;
|
||||||
break;
|
break;
|
||||||
@@ -168,12 +168,12 @@ namespace Content.Client.Alerts
|
|||||||
|
|
||||||
if (!added)
|
if (!added)
|
||||||
{
|
{
|
||||||
_ui.Grid.Children.Add(newAlertControl);
|
_ui.AlertContainer.Children.Add(newAlertControl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_ui.Grid.Children.Add(newAlertControl);
|
_ui.AlertContainer.Children.Add(newAlertControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
_alertControls[newAlert.AlertKey] = newAlertControl;
|
_alertControls[newAlert.AlertKey] = newAlertControl;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<PanelContainer StyleClasses="TransparentBorderedWindowPanel"
|
<PanelContainer StyleClasses="TransparentBorderedWindowPanel"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top">
|
VerticalAlignment="Top">
|
||||||
<GridContainer Name="AlertContainer" MaxGridHeight="64" ExpandBackwards="True">
|
<GridContainer Name="AlertContainer" Access="Public" MaxGridHeight="64" ExpandBackwards="True">
|
||||||
|
|
||||||
</GridContainer>
|
</GridContainer>
|
||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ namespace Content.Client.Alerts.UI
|
|||||||
|
|
||||||
public const float ChatSeparation = 38f;
|
public const float ChatSeparation = 38f;
|
||||||
|
|
||||||
public GridContainer Grid => AlertContainer;
|
|
||||||
|
|
||||||
public AlertsUI()
|
public AlertsUI()
|
||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||||
SetSize="400 600"
|
SetSize="400 600"
|
||||||
MinSize="400 600">
|
MinSize="400 600">
|
||||||
<BoxContainer Orientation="Vertical" Name="rows"> <!-- TODO: remove name -->
|
<BoxContainer Orientation="Vertical">
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<Label Text="{Loc 'cargo-console-menu-account-name-label'}"
|
<Label Text="{Loc 'cargo-console-menu-account-name-label'}"
|
||||||
StyleClasses="LabelKeyText" />
|
StyleClasses="LabelKeyText" />
|
||||||
@@ -28,7 +28,8 @@
|
|||||||
Text="0/20" />
|
Text="0/20" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<Button Name="CallShuttleButtonProtected"
|
<Button Name="CallShuttleButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'cargo-console-menu-call-shuttle-button'}"
|
Text="{Loc 'cargo-console-menu-call-shuttle-button'}"
|
||||||
TextAlign="Center"
|
TextAlign="Center"
|
||||||
HorizontalExpand="True"/>
|
HorizontalExpand="True"/>
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ namespace Content.Client.Cargo.UI
|
|||||||
public event Action<ButtonEventArgs>? OnOrderApproved;
|
public event Action<ButtonEventArgs>? OnOrderApproved;
|
||||||
public event Action<ButtonEventArgs>? OnOrderCanceled;
|
public event Action<ButtonEventArgs>? OnOrderCanceled;
|
||||||
|
|
||||||
public Button CallShuttleButton => CallShuttleButtonProtected;
|
|
||||||
|
|
||||||
private readonly List<string> _categoryStrings = new();
|
private readonly List<string> _categoryStrings = new();
|
||||||
private string? _category;
|
private string? _category;
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,19 @@
|
|||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<GridContainer Columns="2">
|
<GridContainer Columns="2">
|
||||||
<Label Text="{Loc 'cargo-console-order-menu-requester-label'}" />
|
<Label Text="{Loc 'cargo-console-order-menu-requester-label'}" />
|
||||||
<LineEdit Name="RequesterProtected" />
|
<LineEdit Name="Requester"
|
||||||
|
Access="Public" />
|
||||||
<Label Text="{Loc 'cargo-console-order-menu-reason-label'}" />
|
<Label Text="{Loc 'cargo-console-order-menu-reason-label'}" />
|
||||||
<LineEdit Name="ReasonProtected" />
|
<LineEdit Name="Reason"
|
||||||
|
Access="Public" />
|
||||||
<Label Text="{Loc 'cargo-console-order-menu-amount-label'}" />
|
<Label Text="{Loc 'cargo-console-order-menu-amount-label'}" />
|
||||||
<SpinBox Name="AmountProtected"
|
<SpinBox Name="Amount"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
Value="1" />
|
Value="1" />
|
||||||
</GridContainer>
|
</GridContainer>
|
||||||
<Button Name="SubmitButtonProtected"
|
<Button Name="SubmitButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'cargo-console-order-menu-submit-button'}"
|
Text="{Loc 'cargo-console-order-menu-submit-button'}"
|
||||||
TextAlign="Center" />
|
TextAlign="Center" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -10,11 +10,6 @@ namespace Content.Client.Cargo.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
partial class CargoConsoleOrderMenu : SS14Window
|
partial class CargoConsoleOrderMenu : SS14Window
|
||||||
{
|
{
|
||||||
public LineEdit Requester => RequesterProtected;
|
|
||||||
public LineEdit Reason => ReasonProtected;
|
|
||||||
public SpinBox Amount => AmountProtected;
|
|
||||||
public Button SubmitButton => SubmitButtonProtected;
|
|
||||||
|
|
||||||
public CargoConsoleOrderMenu()
|
public CargoConsoleOrderMenu()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -2,25 +2,30 @@
|
|||||||
HorizontalExpand="True">
|
HorizontalExpand="True">
|
||||||
<BoxContainer Orientation="Horizontal"
|
<BoxContainer Orientation="Horizontal"
|
||||||
HorizontalExpand="True">
|
HorizontalExpand="True">
|
||||||
<TextureRect Name="IconProtected"
|
<TextureRect Name="Icon"
|
||||||
|
Access="Public"
|
||||||
MinSize="32 32"
|
MinSize="32 32"
|
||||||
RectClipContent="True" />
|
RectClipContent="True" />
|
||||||
<BoxContainer Orientation="Vertical"
|
<BoxContainer Orientation="Vertical"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
VerticalExpand="True">
|
VerticalExpand="True">
|
||||||
<Label Name="ProductNameProtected"
|
<Label Name="ProductName"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
StyleClasses="LabelSubText"
|
StyleClasses="LabelSubText"
|
||||||
ClipText="True" />
|
ClipText="True" />
|
||||||
<Label Name="DescriptionProtected"
|
<Label Name="Description"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
StyleClasses="LabelSubText"
|
StyleClasses="LabelSubText"
|
||||||
ClipText="True" />
|
ClipText="True" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Button Name="ApproveProtected"
|
<Button Name="Approve"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'cargo-console-menu-cargo-order-row-approve-button'}"
|
Text="{Loc 'cargo-console-menu-cargo-order-row-approve-button'}"
|
||||||
StyleClasses="LabelSubText" />
|
StyleClasses="LabelSubText" />
|
||||||
<Button Name="CancelProtected"
|
<Button Name="Cancel"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'cargo-console-menu-cargo-order-row-cancel-button'}"
|
Text="{Loc 'cargo-console-menu-cargo-order-row-cancel-button'}"
|
||||||
StyleClasses="LabelSubText" />
|
StyleClasses="LabelSubText" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -9,11 +9,6 @@ namespace Content.Client.Cargo.UI
|
|||||||
public partial class CargoOrderRow : PanelContainer
|
public partial class CargoOrderRow : PanelContainer
|
||||||
{
|
{
|
||||||
public CargoOrderData? Order { get; set; }
|
public CargoOrderData? Order { get; set; }
|
||||||
public TextureRect Icon => IconProtected;
|
|
||||||
public Label ProductName => ProductNameProtected;
|
|
||||||
public Label Description => DescriptionProtected;
|
|
||||||
public Button Approve => ApproveProtected;
|
|
||||||
public Button Cancel => CancelProtected;
|
|
||||||
|
|
||||||
public CargoOrderRow()
|
public CargoOrderRow()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<PanelContainer xmlns="https://spacestation14.io"
|
<PanelContainer xmlns="https://spacestation14.io"
|
||||||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||||
HorizontalExpand="True">
|
HorizontalExpand="True">
|
||||||
<Button Name="MainButtonProtected"
|
<Button Name="MainButton"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
VerticalExpand="True" />
|
VerticalExpand="True" />
|
||||||
<BoxContainer Orientation="Horizontal"
|
<BoxContainer Orientation="Horizontal"
|
||||||
HorizontalExpand="True">
|
HorizontalExpand="True">
|
||||||
<TextureRect Name="IconProtected"
|
<TextureRect Name="Icon"
|
||||||
|
Access="Public"
|
||||||
MinSize="32 32"
|
MinSize="32 32"
|
||||||
RectClipContent="True" />
|
RectClipContent="True" />
|
||||||
<Label Name="ProductNameProtected"
|
<Label Name="ProductName"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True" />
|
HorizontalExpand="True" />
|
||||||
<PanelContainer>
|
<PanelContainer>
|
||||||
<PanelContainer.PanelOverride>
|
<PanelContainer.PanelOverride>
|
||||||
<gfx:StyleBoxFlat BackgroundColor="#25252A" />
|
<gfx:StyleBoxFlat BackgroundColor="#25252A" />
|
||||||
</PanelContainer.PanelOverride>
|
</PanelContainer.PanelOverride>
|
||||||
<Label Name="PointCostProtected"
|
<Label Name="PointCost"
|
||||||
|
Access="Public"
|
||||||
MinSize="40 32"
|
MinSize="40 32"
|
||||||
Align="Right" />
|
Align="Right" />
|
||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ namespace Content.Client.Cargo.UI
|
|||||||
public partial class CargoProductRow : PanelContainer
|
public partial class CargoProductRow : PanelContainer
|
||||||
{
|
{
|
||||||
public CargoProductPrototype? Product { get; set; }
|
public CargoProductPrototype? Product { get; set; }
|
||||||
public TextureRect Icon => IconProtected;
|
|
||||||
public Button MainButton => MainButtonProtected;
|
|
||||||
public Label ProductName => ProductNameProtected;
|
|
||||||
public Label PointCost => PointCostProtected;
|
|
||||||
|
|
||||||
public CargoProductRow()
|
public CargoProductRow()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ namespace Content.Client.Chemistry.UI
|
|||||||
base.Open();
|
base.Open();
|
||||||
_window = new TransferAmountWindow();
|
_window = new TransferAmountWindow();
|
||||||
|
|
||||||
_window.applyButton.OnPressed += _ =>
|
_window.ApplyButton.OnPressed += _ =>
|
||||||
{
|
{
|
||||||
if (int.TryParse(_window.amountLineEdit.Text, out var i))
|
if (int.TryParse(_window.AmountLineEdit.Text, out var i))
|
||||||
{
|
{
|
||||||
SendMessage(new TransferAmountSetValueMessage(ReagentUnit.New(i)));
|
SendMessage(new TransferAmountSetValueMessage(ReagentUnit.New(i)));
|
||||||
_window.Close();
|
_window.Close();
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinSize="240 80">
|
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinSize="240 80">
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<LineEdit Name="AmountLineEdit" HorizontalExpand="True" PlaceHolder="{Loc 'ui-transfer-amount-line-edit-placeholder'}"/>
|
<LineEdit Name="AmountLineEdit" Access="Public" HorizontalExpand="True" PlaceHolder="{Loc 'ui-transfer-amount-line-edit-placeholder'}"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Button Name="ApplyButton" Text="{Loc 'ui-transfer-amount-apply'}"/>
|
<Button Name="ApplyButton" Access="Public" Text="{Loc 'ui-transfer-amount-apply'}"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</SS14Window>
|
</SS14Window>
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ namespace Content.Client.Chemistry.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class TransferAmountWindow : SS14Window
|
public partial class TransferAmountWindow : SS14Window
|
||||||
{
|
{
|
||||||
public Button applyButton => ApplyButton;
|
|
||||||
public LineEdit amountLineEdit => AmountLineEdit;
|
|
||||||
|
|
||||||
public TransferAmountWindow()
|
public TransferAmountWindow()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.4">
|
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.4">
|
||||||
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
|
<BoxContainer Orientation="Horizontal" HorizontalExpand="True">
|
||||||
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True"/>
|
<LineEdit Name="SearchBar" PlaceHolder="Search" HorizontalExpand="True"/>
|
||||||
<OptionButton Name="Category" MinSize="130 0"/>
|
<OptionButton Name="Category" Access="Public" MinSize="130 0"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<ItemList Name="RecipesList" SelectMode="Single" VerticalExpand="True"/>
|
<ItemList Name="Recipes" Access="Public" SelectMode="Single" VerticalExpand="True"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Control MinSize="10 0"/>
|
<Control MinSize="10 0"/>
|
||||||
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.6">
|
<BoxContainer Orientation="Vertical" HorizontalExpand="True" SizeFlagsStretchRatio="0.6">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</Control>
|
</Control>
|
||||||
<ItemList Name="StepList" VerticalExpand="True"/>
|
<ItemList Name="RecipeStepList" Access="Public" VerticalExpand="True"/>
|
||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<Button Name="BuildButton" Disabled="True" ToggleMode="True" VerticalExpand="True" SizeFlagsStretchRatio="0.5"/>
|
<Button Name="BuildButton" Disabled="True" ToggleMode="True" VerticalExpand="True" SizeFlagsStretchRatio="0.5"/>
|
||||||
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SizeFlagsStretchRatio="0.5">
|
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SizeFlagsStretchRatio="0.5">
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Content.Client.Construction.UI
|
|||||||
// It isn't optimal to expose UI controls like this, but the UI control design is
|
// It isn't optimal to expose UI controls like this, but the UI control design is
|
||||||
// questionable so it can't be helped.
|
// questionable so it can't be helped.
|
||||||
string[] Categories { get; set; }
|
string[] Categories { get; set; }
|
||||||
OptionButton CategoryButton { get; }
|
OptionButton Category { get; }
|
||||||
|
|
||||||
bool EraseButtonPressed { get; set; }
|
bool EraseButtonPressed { get; set; }
|
||||||
bool BuildButtonPressed { get; set; }
|
bool BuildButtonPressed { get; set; }
|
||||||
@@ -63,19 +63,12 @@ namespace Content.Client.Construction.UI
|
|||||||
|
|
||||||
public string[] Categories { get; set; } = Array.Empty<string>();
|
public string[] Categories { get; set; } = Array.Empty<string>();
|
||||||
|
|
||||||
public OptionButton CategoryButton => Category;
|
|
||||||
|
|
||||||
public bool EraseButtonPressed
|
public bool EraseButtonPressed
|
||||||
{
|
{
|
||||||
get => EraseButton.Pressed;
|
get => EraseButton.Pressed;
|
||||||
set => EraseButton.Pressed = value;
|
set => EraseButton.Pressed = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public ItemList Recipes => RecipesList;
|
|
||||||
|
|
||||||
public ItemList RecipeStepList => StepList;
|
|
||||||
|
|
||||||
public ConstructionMenu()
|
public ConstructionMenu()
|
||||||
{
|
{
|
||||||
SetSize = MinSize = (720, 320);
|
SetSize = MinSize = (720, 320);
|
||||||
@@ -86,8 +79,8 @@ namespace Content.Client.Construction.UI
|
|||||||
Title = Loc.GetString("construction-menu-title");
|
Title = Loc.GetString("construction-menu-title");
|
||||||
|
|
||||||
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
|
BuildButton.Text = Loc.GetString("construction-menu-place-ghost");
|
||||||
RecipesList.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
|
Recipes.OnItemSelected += obj => RecipeSelected?.Invoke(this, obj.ItemList[obj.ItemIndex]);
|
||||||
RecipesList.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
|
Recipes.OnItemDeselected += _ => RecipeSelected?.Invoke(this, null);
|
||||||
|
|
||||||
SearchBar.OnTextChanged += _ => PopulateRecipes?.Invoke(this, (SearchBar.Text, Categories[Category.SelectedId]));
|
SearchBar.OnTextChanged += _ => PopulateRecipes?.Invoke(this, (SearchBar.Text, Categories[Category.SelectedId]));
|
||||||
Category.OnItemSelected += obj =>
|
Category.OnItemSelected += obj =>
|
||||||
@@ -132,7 +125,7 @@ namespace Content.Client.Construction.UI
|
|||||||
TargetName.SetMessage(string.Empty);
|
TargetName.SetMessage(string.Empty);
|
||||||
TargetDesc.SetMessage(string.Empty);
|
TargetDesc.SetMessage(string.Empty);
|
||||||
TargetTexture.Texture = null;
|
TargetTexture.Texture = null;
|
||||||
StepList.Clear();
|
RecipeStepList.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ namespace Content.Client.Construction.UI
|
|||||||
uniqueCategories.Add(category);
|
uniqueCategories.Add(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
_constructionView.CategoryButton.Clear();
|
_constructionView.Category.Clear();
|
||||||
|
|
||||||
var array = uniqueCategories.ToArray();
|
var array = uniqueCategories.ToArray();
|
||||||
Array.Sort(array);
|
Array.Sort(array);
|
||||||
@@ -207,7 +207,7 @@ namespace Content.Client.Construction.UI
|
|||||||
for (var i = 0; i < array.Length; i++)
|
for (var i = 0; i < array.Length; i++)
|
||||||
{
|
{
|
||||||
var category = array[i];
|
var category = array[i];
|
||||||
_constructionView.CategoryButton.AddItem(category, i);
|
_constructionView.Category.AddItem(category, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
_constructionView.Categories = array;
|
_constructionView.Categories = array;
|
||||||
|
|||||||
@@ -6,12 +6,14 @@
|
|||||||
<Label Text="{Loc 'disposal-router-window-tags-label'}" />
|
<Label Text="{Loc 'disposal-router-window-tags-label'}" />
|
||||||
<Control MinSize="0 10" />
|
<Control MinSize="0 10" />
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<LineEdit Name="TagInputProtected"
|
<LineEdit Name="TagInput"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
MinSize="320 0"
|
MinSize="320 0"
|
||||||
ToolTip="{Loc 'disposal-router-window-tag-input-tooltip'}" />
|
ToolTip="{Loc 'disposal-router-window-tag-input-tooltip'}" />
|
||||||
<Control MinSize="10 0" />
|
<Control MinSize="10 0" />
|
||||||
<Button Name="ConfirmProtected"
|
<Button Name="Confirm"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'disposal-router-window-tag-input-confirm-button'}" />
|
Text="{Loc 'disposal-router-window-tag-input-confirm-button'}" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ namespace Content.Client.Disposal.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class DisposalRouterWindow : SS14Window
|
public partial class DisposalRouterWindow : SS14Window
|
||||||
{
|
{
|
||||||
public LineEdit TagInput => TagInputProtected;
|
|
||||||
public Button Confirm => ConfirmProtected;
|
|
||||||
|
|
||||||
public DisposalRouterWindow()
|
public DisposalRouterWindow()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -6,11 +6,13 @@
|
|||||||
<Label Text="{Loc 'disposal-tagger-window-tag-input-label'}" />
|
<Label Text="{Loc 'disposal-tagger-window-tag-input-label'}" />
|
||||||
<Control MinSize="0 10" />
|
<Control MinSize="0 10" />
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<LineEdit Name="TagInputProtected"
|
<LineEdit Name="TagInput"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
MinSize="320 0" />
|
MinSize="320 0" />
|
||||||
<Control MinSize="10 0" />
|
<Control MinSize="10 0" />
|
||||||
<Button Name="ConfirmProtected"
|
<Button Name="Confirm"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'disposal-tagger-window-tag-confirm-button'}" />
|
Text="{Loc 'disposal-tagger-window-tag-confirm-button'}" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ namespace Content.Client.Disposal.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class DisposalTaggerWindow : SS14Window
|
public partial class DisposalTaggerWindow : SS14Window
|
||||||
{
|
{
|
||||||
public LineEdit TagInput => TagInputProtected;
|
|
||||||
public Button Confirm => ConfirmProtected;
|
|
||||||
|
|
||||||
public DisposalTaggerWindow()
|
public DisposalTaggerWindow()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -23,14 +23,17 @@
|
|||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Control MinSize="0 10" />
|
<Control MinSize="0 10" />
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<Button Name="EngageProtected"
|
<Button Name="Engage"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'ui-disposal-unit-button-flush'}"
|
Text="{Loc 'ui-disposal-unit-button-flush'}"
|
||||||
StyleClasses="OpenRight"
|
StyleClasses="OpenRight"
|
||||||
ToggleMode="True" />
|
ToggleMode="True" />
|
||||||
<Button Name="EjectProtected"
|
<Button Name="Eject"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'ui-disposal-unit-button-eject'}"
|
Text="{Loc 'ui-disposal-unit-button-eject'}"
|
||||||
StyleClasses="OpenBoth" />
|
StyleClasses="OpenBoth" />
|
||||||
<CheckButton Name="PowerProtected"
|
<CheckButton Name="Power"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'ui-disposal-unit-button-power'}"
|
Text="{Loc 'ui-disposal-unit-button-power'}"
|
||||||
StyleClasses="OpenLeft" />
|
StyleClasses="OpenLeft" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ namespace Content.Client.Disposal.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class DisposalUnitWindow : SS14Window
|
public partial class DisposalUnitWindow : SS14Window
|
||||||
{
|
{
|
||||||
public Button Engage => EngageProtected;
|
|
||||||
public Button Eject => EjectProtected;
|
|
||||||
public Button Power => PowerProtected;
|
|
||||||
|
|
||||||
public DisposalUnitWindow()
|
public DisposalUnitWindow()
|
||||||
{
|
{
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<RichTextLabel Name="Status" />
|
<RichTextLabel Name="Status" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Button Name="SwitchProtected"
|
<Button Name="Switch"
|
||||||
|
Access="Public"
|
||||||
TextAlign="Center"
|
TextAlign="Center"
|
||||||
MinHeight="60" />
|
MinHeight="60" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ namespace Content.Client.Gravity.UI
|
|||||||
{
|
{
|
||||||
private readonly GravityGeneratorBoundUserInterface _owner;
|
private readonly GravityGeneratorBoundUserInterface _owner;
|
||||||
|
|
||||||
public Button Switch => SwitchProtected;
|
|
||||||
|
|
||||||
public GravityGeneratorWindow(GravityGeneratorBoundUserInterface ui)
|
public GravityGeneratorWindow(GravityGeneratorBoundUserInterface ui)
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<customControls:BoxContainer Orientation="Vertical" xmlns:customControls="https://spacestation14.io">
|
<BoxContainer Orientation="Vertical" xmlns="https://spacestation14.io">
|
||||||
<customControls:SplitContainer Orientation="Horizontal">
|
<SplitContainer Orientation="Horizontal">
|
||||||
<customControls:Label Name="Label" Align="Center"/>
|
<Label Name="Label" Align="Center"/>
|
||||||
<customControls:Button Name="Button" TextAlign="Center"/>
|
<Button Name="EjectButton" Access="Public" TextAlign="Center"/>
|
||||||
</customControls:SplitContainer>
|
</SplitContainer>
|
||||||
<customControls:ItemList Name="ItemList" VerticalExpand="True" HorizontalExpand="True" SelectMode="Button" SizeFlagsStretchRatio="2" MinSize="100 128"/>
|
<ItemList Name="BoxContents" Access="Public" VerticalExpand="True" HorizontalExpand="True" SelectMode="Button" SizeFlagsStretchRatio="2" MinSize="100 128"/>
|
||||||
</customControls:BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ namespace Content.Client.Kitchen.UI
|
|||||||
public partial class LabelledContentBox : BoxContainer
|
public partial class LabelledContentBox : BoxContainer
|
||||||
{
|
{
|
||||||
public string? LabelText { get => Label.Text; set => Label.Text = value; }
|
public string? LabelText { get => Label.Text; set => Label.Text = value; }
|
||||||
public string? ButtonText { get => Button.Text; set => Button.Text = value; }
|
public string? ButtonText { get => EjectButton.Text; set => EjectButton.Text = value; }
|
||||||
|
|
||||||
public ItemList BoxContents => ItemList;
|
|
||||||
public Button EjectButton => Button;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
<!-- Top row -->
|
<!-- Top row -->
|
||||||
<BoxContainer Orientation="Horizontal" MinSize="0 40">
|
<BoxContainer Orientation="Horizontal" MinSize="0 40">
|
||||||
<Label Margin="8 0 0 0" StyleClasses="LabelHeadingBigger" VAlign="Center" Text="{Loc 'Lobby'}" />
|
<Label Margin="8 0 0 0" StyleClasses="LabelHeadingBigger" VAlign="Center" Text="{Loc 'Lobby'}" />
|
||||||
<Label Name="CServerName" StyleClasses="LabelHeadingBigger" VAlign="Center" />
|
<Label Name="ServerName" Access="Public" StyleClasses="LabelHeadingBigger" VAlign="Center" />
|
||||||
<ui:VoteCallMenuButton Name="CCallVoteButton" StyleClasses="ButtonBig" />
|
<ui:VoteCallMenuButton Name="CallVoteButton" StyleClasses="ButtonBig" />
|
||||||
<Button Name="COptionsButton" StyleClasses="ButtonBig" Text="{Loc 'Options'}" />
|
<Button Name="OptionsButton" Access="Public" StyleClasses="ButtonBig" Text="{Loc 'Options'}" />
|
||||||
<Button Name="CLeaveButton" StyleClasses="ButtonBig" Text="{Loc 'Leave'}" />
|
<Button Name="LeaveButton" Access="Public" StyleClasses="ButtonBig" Text="{Loc 'Leave'}" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<!-- Gold line -->
|
<!-- Gold line -->
|
||||||
<PanelContainer>
|
<PanelContainer>
|
||||||
@@ -35,18 +35,20 @@
|
|||||||
<!-- Middle section with the two vertical panels -->
|
<!-- Middle section with the two vertical panels -->
|
||||||
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
|
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
|
||||||
<!-- Left panel -->
|
<!-- Left panel -->
|
||||||
<BoxContainer Orientation="Vertical" Name="CLeftPanelContainer" HorizontalExpand="True">
|
<BoxContainer Orientation="Vertical" Name="LeftPanelContainer" HorizontalExpand="True">
|
||||||
<hudUi:StripeBack>
|
<hudUi:StripeBack>
|
||||||
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
|
<BoxContainer Orientation="Horizontal" SeparationOverride="6" Margin="3 3 3 3">
|
||||||
<cc:UICommandButton Command="observe" Name="CObserveButton" Text="{Loc 'Observe'}" StyleClasses="ButtonBig" WindowType="{x:Type lobbyUi:ObserveWarningWindow}"/>
|
<cc:UICommandButton Command="observe" Name="ObserveButton" Text="{Loc 'Observe'}" StyleClasses="ButtonBig" WindowType="{x:Type lobbyUi:ObserveWarningWindow}"/>
|
||||||
<Label Name="CStartTime" Align="Right"
|
<Label Name="StartTime"
|
||||||
|
Access="Public"
|
||||||
|
Align="Right"
|
||||||
FontColorOverride="{x:Static maths:Color.DarkGray}"
|
FontColorOverride="{x:Static maths:Color.DarkGray}"
|
||||||
StyleClasses="LabelBig" HorizontalExpand="True" />
|
StyleClasses="LabelBig" HorizontalExpand="True" />
|
||||||
<Button Name="CReadyButton" ToggleMode="True" Text="{Loc 'Ready Up'}"
|
<Button Name="ReadyButton" Access="Public" ToggleMode="True" Text="{Loc 'Ready Up'}"
|
||||||
StyleClasses="ButtonBig" />
|
StyleClasses="ButtonBig" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</hudUi:StripeBack>
|
</hudUi:StripeBack>
|
||||||
<chatUi:ChatBox Name="CChat" VerticalExpand="True" Margin="3 3 3 3"/>
|
<chatUi:ChatBox Name="Chat" Access="Public" VerticalExpand="True" Margin="3 3 3 3"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<!-- Gold line -->
|
<!-- Gold line -->
|
||||||
<PanelContainer MinSize="2 0">
|
<PanelContainer MinSize="2 0">
|
||||||
@@ -59,16 +61,21 @@
|
|||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<!-- Player list -->
|
<!-- Player list -->
|
||||||
<hudUi:NanoHeading Text="{Loc 'Online Players'}" />
|
<hudUi:NanoHeading Text="{Loc 'Online Players'}" />
|
||||||
<lobbyUi:LobbyPlayerList Name="COnlinePlayerList"
|
<lobbyUi:LobbyPlayerList Name="OnlinePlayerList"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
VerticalExpand="True"
|
VerticalExpand="True"
|
||||||
Margin="3 3 3 3" />
|
Margin="3 3 3 3" />
|
||||||
<!-- Server info -->
|
<!-- Server info -->
|
||||||
<hudUi:NanoHeading Text="{Loc 'Server Info'}" />
|
<hudUi:NanoHeading Text="{Loc 'Server Info'}" />
|
||||||
<info:ServerInfo Name="CServerInfo" VerticalExpand="True" Margin="3 3 3 3"/>
|
<info:ServerInfo Name="ServerInfo"
|
||||||
|
Access="Public"
|
||||||
|
VerticalExpand="True"
|
||||||
|
Margin="3 3 3 3"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<BoxContainer Orientation="Vertical"
|
<BoxContainer Orientation="Vertical"
|
||||||
Name="CVoteContainer"
|
Name="VoteContainer"
|
||||||
|
Access="Public"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Margin="0 8 8 0" />
|
Margin="0 8 8 0" />
|
||||||
</Control>
|
</Control>
|
||||||
|
|||||||
@@ -15,16 +15,6 @@ namespace Content.Client.Lobby.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
internal sealed partial class LobbyGui : Control
|
internal sealed partial class LobbyGui : Control
|
||||||
{
|
{
|
||||||
public Label ServerName => CServerName;
|
|
||||||
public Label StartTime => CStartTime;
|
|
||||||
public Button ReadyButton => CReadyButton;
|
|
||||||
public Button ObserveButton => CObserveButton;
|
|
||||||
public Button OptionsButton => COptionsButton;
|
|
||||||
public Button LeaveButton => CLeaveButton;
|
|
||||||
public ChatBox Chat => CChat;
|
|
||||||
public BoxContainer VoteContainer => CVoteContainer;
|
|
||||||
public LobbyPlayerList OnlinePlayerList => COnlinePlayerList;
|
|
||||||
public ServerInfo ServerInfo => CServerInfo;
|
|
||||||
public LobbyCharacterPreviewPanel CharacterPreview { get; }
|
public LobbyCharacterPreviewPanel CharacterPreview { get; }
|
||||||
|
|
||||||
public LobbyGui(IEntityManager entityManager,
|
public LobbyGui(IEntityManager entityManager,
|
||||||
@@ -42,7 +32,7 @@ namespace Content.Client.Lobby.UI
|
|||||||
HorizontalAlignment = HAlignment.Left
|
HorizontalAlignment = HAlignment.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
CLeftPanelContainer.AddChild(CharacterPreview);
|
LeftPanelContainer.AddChild(CharacterPreview);
|
||||||
CharacterPreview.SetPositionFirst();
|
CharacterPreview.SetPositionFirst();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ namespace Content.Client.MainMenu
|
|||||||
|
|
||||||
private void TryConnect(string address)
|
private void TryConnect(string address)
|
||||||
{
|
{
|
||||||
var inputName = _mainMenuControl.UserNameBox.Text.Trim();
|
var inputName = _mainMenuControl.UsernameBox.Text.Trim();
|
||||||
if (!UsernameHelpers.IsNameValid(inputName, out var reason))
|
if (!UsernameHelpers.IsNameValid(inputName, out var reason))
|
||||||
{
|
{
|
||||||
var invalidReason = Loc.GetString(reason.ToText());
|
var invalidReason = Loc.GetString(reason.ToText());
|
||||||
@@ -110,7 +110,7 @@ namespace Content.Client.MainMenu
|
|||||||
}
|
}
|
||||||
|
|
||||||
var configName = _configurationManager.GetCVar(CVars.PlayerName);
|
var configName = _configurationManager.GetCVar(CVars.PlayerName);
|
||||||
if (_mainMenuControl.UserNameBox.Text != configName)
|
if (_mainMenuControl.UsernameBox.Text != configName)
|
||||||
{
|
{
|
||||||
_configurationManager.SetCVar(CVars.PlayerName, inputName);
|
_configurationManager.SetCVar(CVars.PlayerName, inputName);
|
||||||
_configurationManager.SaveToFile();
|
_configurationManager.SaveToFile();
|
||||||
|
|||||||
@@ -11,29 +11,35 @@
|
|||||||
<BoxContainer Orientation="Horizontal"
|
<BoxContainer Orientation="Horizontal"
|
||||||
SeparationOverride="4">
|
SeparationOverride="4">
|
||||||
<Label Text="{Loc 'main-menu-username-label'}" />
|
<Label Text="{Loc 'main-menu-username-label'}" />
|
||||||
<LineEdit Name="UsernameBoxProtected"
|
<LineEdit Name="UsernameBox"
|
||||||
|
Access="Public"
|
||||||
PlaceHolder="{Loc 'main-menu-username-text'}"
|
PlaceHolder="{Loc 'main-menu-username-text'}"
|
||||||
HorizontalExpand="True" />
|
HorizontalExpand="True" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
<Button Name="JoinPublicServerButtonProtected"
|
<Button Name="JoinPublicServerButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'main-menu-join-public-server-button'}"
|
Text="{Loc 'main-menu-join-public-server-button'}"
|
||||||
StyleIdentifier="mainMenu"
|
StyleIdentifier="mainMenu"
|
||||||
TextAlign="Center" />
|
TextAlign="Center" />
|
||||||
<Control MinSize="0 2" />
|
<Control MinSize="0 2" />
|
||||||
<LineEdit Name="AddressBoxProtected"
|
<LineEdit Name="AddressBox"
|
||||||
|
Access="Public"
|
||||||
Text="localhost"
|
Text="localhost"
|
||||||
PlaceHolder="server address:port"
|
PlaceHolder="server address:port"
|
||||||
HorizontalExpand="True" />
|
HorizontalExpand="True" />
|
||||||
<Button Name="DirectConnectButtonProtected"
|
<Button Name="DirectConnectButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'main-menu-direct-connect-button'}"
|
Text="{Loc 'main-menu-direct-connect-button'}"
|
||||||
TextAlign="Center"
|
TextAlign="Center"
|
||||||
StyleIdentifier="mainMenu" />
|
StyleIdentifier="mainMenu" />
|
||||||
<Control MinSize="0 2" />
|
<Control MinSize="0 2" />
|
||||||
<Button Name="OptionsButtonProtected"
|
<Button Name="OptionsButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'main-menu-options-button'}"
|
Text="{Loc 'main-menu-options-button'}"
|
||||||
TextAlign="Center"
|
TextAlign="Center"
|
||||||
StyleIdentifier="mainMenu" />
|
StyleIdentifier="mainMenu" />
|
||||||
<Button Name="QuitButtonProtected"
|
<Button Name="QuitButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'main-menu-quit-button'}"
|
Text="{Loc 'main-menu-quit-button'}"
|
||||||
TextAlign="Center"
|
TextAlign="Center"
|
||||||
StyleIdentifier="mainMenu" />
|
StyleIdentifier="mainMenu" />
|
||||||
|
|||||||
@@ -14,13 +14,6 @@ namespace Content.Client.MainMenu.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class MainMenuControl : Control
|
public partial class MainMenuControl : Control
|
||||||
{
|
{
|
||||||
public LineEdit UserNameBox => UsernameBoxProtected;
|
|
||||||
public Button JoinPublicServerButton => JoinPublicServerButtonProtected;
|
|
||||||
public LineEdit AddressBox => AddressBoxProtected;
|
|
||||||
public Button DirectConnectButton => DirectConnectButtonProtected;
|
|
||||||
public Button OptionsButton => OptionsButtonProtected;
|
|
||||||
public Button QuitButton => QuitButtonProtected;
|
|
||||||
|
|
||||||
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
@@ -36,7 +29,7 @@ namespace Content.Client.MainMenu.UI
|
|||||||
Logo.Texture = logoTexture;
|
Logo.Texture = logoTexture;
|
||||||
|
|
||||||
var currentUserName = configMan.GetCVar(CVars.PlayerName);
|
var currentUserName = configMan.GetCVar(CVars.PlayerName);
|
||||||
UserNameBox.Text = currentUserName;
|
UsernameBox.Text = currentUserName;
|
||||||
|
|
||||||
#if !FULL_RELEASE
|
#if !FULL_RELEASE
|
||||||
JoinPublicServerButton.Disabled = true;
|
JoinPublicServerButton.Disabled = true;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
MinSize="250 100"
|
MinSize="250 100"
|
||||||
SetSize="250 100">
|
SetSize="250 100">
|
||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<Button Name="ScanButtonProtected"
|
<Button Name="ScanButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'medical-scanner-window-save-button-text'}" />
|
Text="{Loc 'medical-scanner-window-save-button-text'}" />
|
||||||
<Label Name="Diagnostics" />
|
<Label Name="Diagnostics" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ namespace Content.Client.MedicalScanner.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class MedicalScannerWindow : SS14Window
|
public partial class MedicalScannerWindow : SS14Window
|
||||||
{
|
{
|
||||||
public Button ScanButton => ScanButtonProtected;
|
|
||||||
|
|
||||||
public MedicalScannerWindow()
|
public MedicalScannerWindow()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -7,25 +7,30 @@
|
|||||||
VerticalExpand="True"
|
VerticalExpand="True"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
MinSize="50 50">
|
MinSize="50 50">
|
||||||
<RichTextLabel Name="PdaOwnerLabelProtected" />
|
<RichTextLabel Name="PdaOwnerLabel" Access="Public" />
|
||||||
<PanelContainer>
|
<PanelContainer>
|
||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<RichTextLabel Name="IdInfoLabelProtected"
|
<RichTextLabel Name="IdInfoLabel"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True" />
|
HorizontalExpand="True" />
|
||||||
<Button Name="EjectIdButtonProtected"
|
<Button Name="EjectIdButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'comp-pda-ui-eject-id-button'}"
|
Text="{Loc 'comp-pda-ui-eject-id-button'}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
<Button Name="EjectPenButtonProtected"
|
<Button Name="EjectPenButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'comp-pda-ui-eject-pen-button'}"
|
Text="{Loc 'comp-pda-ui-eject-pen-button'}"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
<Button Name="FlashLightToggleButtonProtected"
|
<Button Name="FlashLightToggleButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'comp-pda-ui-toggle-flashlight-button'}"
|
Text="{Loc 'comp-pda-ui-toggle-flashlight-button'}"
|
||||||
ToggleMode="True" />
|
ToggleMode="True" />
|
||||||
<Button Name="ActivateUplinkButtonProtected"
|
<Button Name="ActivateUplinkButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'pda-bound-user-interface-uplink-tab-title'}" />
|
Text="{Loc 'pda-bound-user-interface-uplink-tab-title'}" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</TabContainer>
|
</TabContainer>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Robust.Client.AutoGenerated;
|
using Robust.Client.AutoGenerated;
|
||||||
using Robust.Client.UserInterface.Controls;
|
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Client.UserInterface.XAML;
|
using Robust.Client.UserInterface.XAML;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
@@ -9,15 +8,6 @@ namespace Content.Client.PDA
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class PDAMenu : SS14Window
|
public partial class PDAMenu : SS14Window
|
||||||
{
|
{
|
||||||
public Button FlashLightToggleButton => FlashLightToggleButtonProtected;
|
|
||||||
public Button EjectIdButton => EjectIdButtonProtected;
|
|
||||||
public Button EjectPenButton => EjectPenButtonProtected;
|
|
||||||
|
|
||||||
public Button ActivateUplinkButton => ActivateUplinkButtonProtected;
|
|
||||||
|
|
||||||
public RichTextLabel PdaOwnerLabel => PdaOwnerLabelProtected;
|
|
||||||
public RichTextLabel IdInfoLabel => IdInfoLabelProtected;
|
|
||||||
|
|
||||||
public PDAMenu()
|
public PDAMenu()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
SetSize="300 300">
|
SetSize="300 300">
|
||||||
<BoxContainer Orientation="Vertical">
|
<BoxContainer Orientation="Vertical">
|
||||||
<RichTextLabel Name="Label" />
|
<RichTextLabel Name="Label" />
|
||||||
<LineEdit Name="InputProtected"
|
<LineEdit Name="Input"
|
||||||
|
Access="Public"
|
||||||
Visible="False" />
|
Visible="False" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</SS14Window>
|
</SS14Window>
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ namespace Content.Client.Paper.UI
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class PaperWindow : SS14Window
|
public partial class PaperWindow : SS14Window
|
||||||
{
|
{
|
||||||
public LineEdit Input => InputProtected;
|
|
||||||
|
|
||||||
public PaperWindow()
|
public PaperWindow()
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<Control xmlns="https://spacestation14.io"
|
<Control xmlns="https://spacestation14.io"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client"
|
||||||
xmlns:magicmirror="clr-namespace:Content.Client.CharacterAppearance"
|
|
||||||
xmlns:parallax="clr-namespace:Content.Client.Parallax"
|
xmlns:parallax="clr-namespace:Content.Client.Parallax"
|
||||||
xmlns:prefUi="clr-namespace:Content.Client.Preferences.UI"
|
|
||||||
xmlns:style="clr-namespace:Content.Client.Stylesheets">
|
xmlns:style="clr-namespace:Content.Client.Stylesheets">
|
||||||
<parallax:ParallaxControl />
|
<parallax:ParallaxControl />
|
||||||
<Control Margin="20 20 20 20">
|
<Control Margin="20 20 20 20">
|
||||||
<PanelContainer Name="CBackgroundPanel" />
|
<PanelContainer Name="BackgroundPanel" />
|
||||||
<BoxContainer Orientation="Vertical" SeparationOverride="0">
|
<BoxContainer Orientation="Vertical" SeparationOverride="0">
|
||||||
<BoxContainer Orientation="Horizontal" MinSize="0 40">
|
<BoxContainer Orientation="Horizontal" MinSize="0 40">
|
||||||
<Label Text="{Loc 'character-setup-gui-character-setup-label'}"
|
<Label Text="{Loc 'character-setup-gui-character-setup-label'}"
|
||||||
Margin="8 0 0 0" VAlign="Center"
|
Margin="8 0 0 0" VAlign="Center"
|
||||||
StyleClasses="{x:Static style:StyleNano.StyleClassLabelHeadingBigger}" />
|
StyleClasses="{x:Static style:StyleNano.StyleClassLabelHeadingBigger}" />
|
||||||
<Button Name="CRulesButton" HorizontalExpand="True"
|
<Button Name="RulesButton" HorizontalExpand="True"
|
||||||
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
|
Text="{Loc 'character-setup-gui-character-setup-rules-button'}"
|
||||||
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"
|
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"
|
||||||
HorizontalAlignment="Right" />
|
HorizontalAlignment="Right" />
|
||||||
<Button Name="CSaveButton"
|
<Button Name="SaveButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'character-setup-gui-character-setup-save-button'}"
|
Text="{Loc 'character-setup-gui-character-setup-save-button'}"
|
||||||
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"/>
|
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"/>
|
||||||
<Button Name="CCloseButton"
|
<Button Name="CloseButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'character-setup-gui-character-setup-close-button'}"
|
Text="{Loc 'character-setup-gui-character-setup-close-button'}"
|
||||||
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"/>
|
StyleClasses="{x:Static style:StyleNano.StyleClassButtonBig}"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
|
<BoxContainer Orientation="Horizontal" VerticalExpand="True" SeparationOverride="0">
|
||||||
<ScrollContainer MinSize="325 0" Margin="5 5 0 0">
|
<ScrollContainer MinSize="325 0" Margin="5 5 0 0">
|
||||||
<BoxContainer Name="CCharacters" Orientation="Vertical" />
|
<BoxContainer Name="Characters" Orientation="Vertical" />
|
||||||
</ScrollContainer>
|
</ScrollContainer>
|
||||||
<PanelContainer MinSize="2 0">
|
<PanelContainer MinSize="2 0">
|
||||||
<PanelContainer.PanelOverride>
|
<PanelContainer.PanelOverride>
|
||||||
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
|
<gfx:StyleBoxFlat BackgroundColor="{x:Static style:StyleNano.NanoGold}" ContentMarginTopOverride="2" />
|
||||||
</PanelContainer.PanelOverride>
|
</PanelContainer.PanelOverride>
|
||||||
</PanelContainer>
|
</PanelContainer>
|
||||||
<BoxContainer Name="CCharEditor" />
|
<BoxContainer Name="CharEditor" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</Control>
|
</Control>
|
||||||
|
|||||||
@@ -29,14 +29,8 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
private readonly IClientPreferencesManager _preferencesManager;
|
private readonly IClientPreferencesManager _preferencesManager;
|
||||||
private readonly IEntityManager _entityManager;
|
private readonly IEntityManager _entityManager;
|
||||||
private PanelContainer _backgroundPanel => CBackgroundPanel;
|
private readonly Button _createNewCharacterButton;
|
||||||
private BoxContainer _charactersVBox => CCharacters;
|
private readonly HumanoidProfileEditor _humanoidProfileEditor;
|
||||||
private Button _createNewCharacterButton;
|
|
||||||
private HumanoidProfileEditor _humanoidProfileEditor;
|
|
||||||
private BoxContainer _humanoidProfileEditorContainer => CCharEditor;
|
|
||||||
public Button CloseButton => CCloseButton;
|
|
||||||
public Button SaveButton => CSaveButton;
|
|
||||||
public Button RulesButton => CRulesButton;
|
|
||||||
|
|
||||||
public CharacterSetupGui(
|
public CharacterSetupGui(
|
||||||
IEntityManager entityManager,
|
IEntityManager entityManager,
|
||||||
@@ -56,7 +50,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
};
|
};
|
||||||
back.SetPatchMargin(StyleBox.Margin.All, 10);
|
back.SetPatchMargin(StyleBox.Margin.All, 10);
|
||||||
|
|
||||||
_backgroundPanel.PanelOverride = back;
|
BackgroundPanel.PanelOverride = back;
|
||||||
|
|
||||||
_createNewCharacterButton = new Button
|
_createNewCharacterButton = new Button
|
||||||
{
|
{
|
||||||
@@ -71,7 +65,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager);
|
_humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager);
|
||||||
_humanoidProfileEditor.OnProfileChanged += ProfileChanged;
|
_humanoidProfileEditor.OnProfileChanged += ProfileChanged;
|
||||||
_humanoidProfileEditorContainer.AddChild(_humanoidProfileEditor);
|
CharEditor.AddChild(_humanoidProfileEditor);
|
||||||
|
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
|
|
||||||
@@ -100,7 +94,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
var numberOfFullSlots = 0;
|
var numberOfFullSlots = 0;
|
||||||
var characterButtonsGroup = new ButtonGroup();
|
var characterButtonsGroup = new ButtonGroup();
|
||||||
_charactersVBox.RemoveAllChildren();
|
Characters.RemoveAllChildren();
|
||||||
|
|
||||||
if (!_preferencesManager.ServerDataLoaded)
|
if (!_preferencesManager.ServerDataLoaded)
|
||||||
{
|
{
|
||||||
@@ -123,7 +117,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
_preferencesManager,
|
_preferencesManager,
|
||||||
characterButtonsGroup,
|
characterButtonsGroup,
|
||||||
character);
|
character);
|
||||||
_charactersVBox.AddChild(characterPickerButton);
|
Characters.AddChild(characterPickerButton);
|
||||||
|
|
||||||
var characterIndexCopy = slot;
|
var characterIndexCopy = slot;
|
||||||
characterPickerButton.OnPressed += args =>
|
characterPickerButton.OnPressed += args =>
|
||||||
@@ -139,7 +133,7 @@ namespace Content.Client.Preferences.UI
|
|||||||
|
|
||||||
_createNewCharacterButton.Disabled =
|
_createNewCharacterButton.Disabled =
|
||||||
numberOfFullSlots >= _preferencesManager.Settings.MaxCharacterSlots;
|
numberOfFullSlots >= _preferencesManager.Settings.MaxCharacterSlots;
|
||||||
_charactersVBox.AddChild(_createNewCharacterButton);
|
Characters.AddChild(_createNewCharacterButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CharacterPickerButton : ContainerButton
|
private class CharacterPickerButton : ContainerButton
|
||||||
|
|||||||
@@ -71,11 +71,14 @@
|
|||||||
Align="End"
|
Align="End"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
VerticalExpand="True">
|
VerticalExpand="True">
|
||||||
<Button Name="ServerSelectionButtonProtected"
|
<Button Name="ServerSelectionButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'research-console-menu-server-selection-button'}" />
|
Text="{Loc 'research-console-menu-server-selection-button'}" />
|
||||||
<Button Name="ServerSyncButtonProtected"
|
<Button Name="ServerSyncButton"
|
||||||
|
Access="Public"
|
||||||
Text="{Loc 'research-console-menu-server-sync-button'}" />
|
Text="{Loc 'research-console-menu-server-sync-button'}" />
|
||||||
<Button Name="UnlockButtonProtected"
|
<Button Name="UnlockButton"
|
||||||
|
Access="Public"
|
||||||
Disabled="True" />
|
Disabled="True" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ namespace Content.Client.Research.UI
|
|||||||
private readonly List<TechnologyPrototype> _unlockableTechnologyPrototypes = new();
|
private readonly List<TechnologyPrototype> _unlockableTechnologyPrototypes = new();
|
||||||
private readonly List<TechnologyPrototype> _futureTechnologyPrototypes = new();
|
private readonly List<TechnologyPrototype> _futureTechnologyPrototypes = new();
|
||||||
|
|
||||||
public Button UnlockButton => UnlockButtonProtected;
|
|
||||||
public Button ServerSelectionButton => ServerSelectionButtonProtected;
|
|
||||||
public Button ServerSyncButton => ServerSyncButtonProtected;
|
|
||||||
|
|
||||||
public TechnologyPrototype? TechnologySelected;
|
public TechnologyPrototype? TechnologySelected;
|
||||||
|
|
||||||
public ResearchConsoleMenu(ResearchConsoleBoundUserInterface owner)
|
public ResearchConsoleMenu(ResearchConsoleBoundUserInterface owner)
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
<BoxContainer Orientation="Horizontal">
|
<BoxContainer Orientation="Horizontal">
|
||||||
<Label Name="UplinkItemName"
|
<Label Name="UplinkItemName"
|
||||||
HorizontalExpand="True"/>
|
HorizontalExpand="True"/>
|
||||||
<Button Name="UplinkItemBuyButtonProtected"
|
<Button Name="UplinkItemBuyButton"
|
||||||
|
Access="Public"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
MinWidth="64"/>
|
MinWidth="64"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ namespace Content.Client.Traitor.Uplink
|
|||||||
[GenerateTypedNameReferences]
|
[GenerateTypedNameReferences]
|
||||||
public partial class UplinkListingControl : Control
|
public partial class UplinkListingControl : Control
|
||||||
{
|
{
|
||||||
public Button UplinkItemBuyButton => UplinkItemBuyButtonProtected;
|
|
||||||
|
|
||||||
public UplinkListingControl(string itemName, string itemDescription, int itemPrice, bool canBuy)
|
public UplinkListingControl(string itemName, string itemDescription, int itemPrice, bool canBuy)
|
||||||
{
|
{
|
||||||
RobustXamlLoader.Load(this);
|
RobustXamlLoader.Load(this);
|
||||||
@@ -18,8 +16,8 @@ namespace Content.Client.Traitor.Uplink
|
|||||||
UplinkItemName.Text = itemName;
|
UplinkItemName.Text = itemName;
|
||||||
UplinkItemDescription.SetMessage(itemDescription);
|
UplinkItemDescription.SetMessage(itemDescription);
|
||||||
|
|
||||||
UplinkItemBuyButtonProtected.Text = $"{itemPrice} TC";
|
UplinkItemBuyButton.Text = $"{itemPrice} TC";
|
||||||
UplinkItemBuyButtonProtected.Disabled = !canBuy;
|
UplinkItemBuyButton.Disabled = !canBuy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
VerticalExpand="True">
|
VerticalExpand="True">
|
||||||
<BoxContainer Orientation="Horizontal"
|
<BoxContainer Orientation="Horizontal"
|
||||||
Margin="4 4 4 4">
|
Margin="4 4 4 4">
|
||||||
<RichTextLabel Name="BalanceInfoProtected"
|
<RichTextLabel Name="BalanceInfo"
|
||||||
|
Access="Public"
|
||||||
HorizontalExpand="True"
|
HorizontalExpand="True"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ namespace Content.Client.Traitor.Uplink
|
|||||||
{
|
{
|
||||||
private readonly IPrototypeManager _prototypeManager;
|
private readonly IPrototypeManager _prototypeManager;
|
||||||
|
|
||||||
public RichTextLabel BalanceInfo => BalanceInfoProtected;
|
|
||||||
public event Action<BaseButton.ButtonEventArgs, UplinkListingData>? OnListingButtonPressed;
|
public event Action<BaseButton.ButtonEventArgs, UplinkListingData>? OnListingButtonPressed;
|
||||||
public event Action<BaseButton.ButtonEventArgs, UplinkCategory>? OnCategoryButtonPressed;
|
public event Action<BaseButton.ButtonEventArgs, UplinkCategory>? OnCategoryButtonPressed;
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
|
|||||||
Assert.NotNull(alertsUI);
|
Assert.NotNull(alertsUI);
|
||||||
|
|
||||||
// we should be seeing 3 alerts - our health, and the 2 debug alerts, in a specific order.
|
// we should be seeing 3 alerts - our health, and the 2 debug alerts, in a specific order.
|
||||||
Assert.That(alertsUI.Grid.ChildCount, Is.GreaterThanOrEqualTo(3));
|
Assert.That(alertsUI.AlertContainer.ChildCount, Is.GreaterThanOrEqualTo(3));
|
||||||
var alertControls = alertsUI.Grid.Children.Select(c => (AlertControl) c);
|
var alertControls = alertsUI.AlertContainer.Children.Select(c => (AlertControl) c);
|
||||||
var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray();
|
var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray();
|
||||||
var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug1, AlertType.Debug2};
|
var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug1, AlertType.Debug2};
|
||||||
Assert.That(alertIDs, Is.SupersetOf(expectedIDs));
|
Assert.That(alertIDs, Is.SupersetOf(expectedIDs));
|
||||||
@@ -96,8 +96,8 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
|
|||||||
Assert.NotNull(alertsUI);
|
Assert.NotNull(alertsUI);
|
||||||
|
|
||||||
// we should be seeing 2 alerts now because one was cleared
|
// we should be seeing 2 alerts now because one was cleared
|
||||||
Assert.That(alertsUI.Grid.ChildCount, Is.GreaterThanOrEqualTo(2));
|
Assert.That(alertsUI.AlertContainer.ChildCount, Is.GreaterThanOrEqualTo(2));
|
||||||
var alertControls = alertsUI.Grid.Children.Select(c => (AlertControl) c);
|
var alertControls = alertsUI.AlertContainer.Children.Select(c => (AlertControl) c);
|
||||||
var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray();
|
var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray();
|
||||||
var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug2};
|
var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug2};
|
||||||
Assert.That(alertIDs, Is.SupersetOf(expectedIDs));
|
Assert.That(alertIDs, Is.SupersetOf(expectedIDs));
|
||||||
|
|||||||
Reference in New Issue
Block a user