Remove encapsulation for previously protected XAML UI fields (#4975)

This commit is contained in:
Visne
2021-10-28 14:23:17 +02:00
committed by GitHub
parent aed66cfc48
commit ac78145b94
49 changed files with 158 additions and 202 deletions

View File

@@ -16,9 +16,9 @@ namespace Content.Client.Chemistry.UI
base.Open();
_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)));
_window.Close();

View File

@@ -4,8 +4,8 @@
<BoxContainer Orientation="Vertical" SeparationOverride="4" MinSize="240 80">
<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>
<Button Name="ApplyButton" Text="{Loc 'ui-transfer-amount-apply'}"/>
<Button Name="ApplyButton" Access="Public" Text="{Loc 'ui-transfer-amount-apply'}"/>
</BoxContainer>
</SS14Window>

View File

@@ -8,9 +8,6 @@ namespace Content.Client.Chemistry.UI
[GenerateTypedNameReferences]
public partial class TransferAmountWindow : SS14Window
{
public Button applyButton => ApplyButton;
public LineEdit amountLineEdit => AmountLineEdit;
public TransferAmountWindow()
{
RobustXamlLoader.Load(this);