Adds Gas Analyzer (#1591)

* -Started Gas Analyzer
-TemperatureHelpers

* Formatting

* Adds PopupTooltip to NotifyManager

* Revert Tooltip fuckery

* Gas Analyzer gives proper error messages

* Localization

* Added a very wip gas analyzer ui

* UI works, doesn't look good but hey

* Safety checks

* Fancy WIP gas mix bar

* Gas Color

* Gas Amount shows only 2 decimal places

* -Made bar full width
-Moved gas list into a table
-Some gas bar things

* IDropped something

* Description

* -Percentage
-Padding

* ItemStatus

* -Proper Danger Warnings
-Added Warning danger state

* Pressure unit

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
Exp
2020-08-08 18:24:41 +02:00
committed by GitHub
parent 5b3b2e3207
commit cc9f16e738
14 changed files with 750 additions and 13 deletions

View File

@@ -0,0 +1,45 @@
using Robust.Client.GameObjects.Components.UserInterface;
using Robust.Shared.GameObjects.Components.UserInterface;
using System;
using System.Collections.Generic;
using System.Text;
using static Content.Shared.GameObjects.Components.SharedGasAnalyzerComponent;
namespace Content.Client.GameObjects.Components.Atmos
{
public class GasAnalyzerBoundUserInterface : BoundUserInterface
{
public GasAnalyzerBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
{
}
private GasAnalyzerWindow _menu;
protected override void Open()
{
base.Open();
_menu = new GasAnalyzerWindow(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
_menu.Populate((GasAnalyzerBoundUserInterfaceState) state);
}
public void Refresh()
{
SendMessage(new GasAnalyzerRefreshMessage());
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_menu.Close();
}
}
}