Remove encapsulation for previously protected XAML UI fields (#4975)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user