tab changing
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Content.Client.Atmos.Monitor.UI
|
||||
_window.AtmosAlarmThresholdChanged += OnThresholdChanged;
|
||||
_window.AirAlarmModeChanged += OnAirAlarmModeChanged;
|
||||
_window.ResyncAllRequested += ResyncAllDevices;
|
||||
_window.AirAlarmTabChange += OnTabChanged;
|
||||
}
|
||||
|
||||
private void ResyncAllDevices()
|
||||
@@ -52,6 +53,11 @@ namespace Content.Client.Atmos.Monitor.UI
|
||||
SendMessage(new AirAlarmUpdateAlarmThresholdMessage(address, type, threshold, gas));
|
||||
}
|
||||
|
||||
private void OnTabChanged(AirAlarmTab tab)
|
||||
{
|
||||
SendMessage(new AirAlarmTabSetMessage(tab));
|
||||
}
|
||||
|
||||
protected override void UpdateState(BoundUserInterfaceState state)
|
||||
{
|
||||
base.UpdateState(state);
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace Content.Client.Atmos.Monitor.UI
|
||||
private RichTextLabel _alarmState => CStatusLabel;
|
||||
|
||||
private TabContainer _tabContainer => CTabContainer;
|
||||
private BoxContainer _gasReadout => CGasContainer;
|
||||
private BoxContainer _ventDevices => CVentContainer;
|
||||
private BoxContainer _scrubberDevices => CScrubberContainer;
|
||||
|
||||
@@ -61,12 +60,14 @@ namespace Content.Client.Atmos.Monitor.UI
|
||||
AirAlarmModeChanged!.Invoke((AirAlarmMode) args.Id);
|
||||
};
|
||||
|
||||
/*
|
||||
foreach (var gas in Enum.GetValues<Gas>())
|
||||
{
|
||||
var gasLabel = new Label();
|
||||
_gasReadout.AddChild(gasLabel);
|
||||
_gasLabels.Add(gas, gasLabel);
|
||||
}
|
||||
*/
|
||||
|
||||
_tabContainer.SetTabTitle(0, Loc.GetString("air-alarm-ui-window-tab-vents"));
|
||||
_tabContainer.SetTabTitle(1, Loc.GetString("air-alarm-ui-window-tab-scrubbers"));
|
||||
|
||||
Reference in New Issue
Block a user