Uplink UI icons and withdraw button (#4929)
* Uplink menu has icons now * Add item icons * Add few descriptions * Better withdraw window * Finished with withdraw window * Refactored withdraw ui and fix some bugs * Basic withdraw * Quick fixes * Removed uplink listing for TCs * Move slider to separate control * Final touches * A bit more * Not again... * Fixed names * Address review * Fixed robust * Non necessary check
This commit is contained in:
34
Content.Client/Traitor/Uplink/UplinkWithdrawWindow.xaml.cs
Normal file
34
Content.Client/Traitor/Uplink/UplinkWithdrawWindow.xaml.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Client.Traitor.Uplink
|
||||
{
|
||||
/// <summary>
|
||||
/// Window to select amount TC to withdraw from Uplink account
|
||||
/// Used as sub-window in Uplink UI
|
||||
/// </summary>
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class UplinkWithdrawWindow : SS14Window
|
||||
{
|
||||
public event System.Action<int>? OnWithdrawAttempt;
|
||||
|
||||
public UplinkWithdrawWindow(int tcCount)
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
|
||||
// setup withdraw slider
|
||||
WithdrawSlider.MinValue = 1;
|
||||
WithdrawSlider.MaxValue = tcCount;
|
||||
|
||||
// and buttons
|
||||
ApplyButton.OnButtonDown += _ =>
|
||||
{
|
||||
OnWithdrawAttempt?.Invoke(WithdrawSlider.Value);
|
||||
Close();
|
||||
};
|
||||
CancelButton.OnButtonDown += _ => Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user