Adjust power monitor power display (#28487)
This commit is contained in:
@@ -102,7 +102,8 @@ public sealed partial class PowerMonitoringWindow
|
|||||||
button.ToolTip = Loc.GetString(name);
|
button.ToolTip = Loc.GetString(name);
|
||||||
|
|
||||||
// Update power value
|
// Update power value
|
||||||
button.PowerValue.Text = Loc.GetString("power-monitoring-window-value", ("value", entry.PowerValue));
|
// Don't use SI prefixes, just give the number in W, so that it is readily apparent which consumer is using a lot of power.
|
||||||
|
button.PowerValue.Text = Loc.GetString("power-monitoring-window-button-value", ("value", Math.Round(entry.PowerValue).ToString("N0")));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateEntrySourcesOrLoads(BoxContainer masterContainer, BoxContainer currentContainer, PowerMonitoringConsoleEntry[]? entries, SpriteSpecifier.Texture icon)
|
private void UpdateEntrySourcesOrLoads(BoxContainer masterContainer, BoxContainer currentContainer, PowerMonitoringConsoleEntry[]? entries, SpriteSpecifier.Texture icon)
|
||||||
@@ -480,6 +481,7 @@ public sealed class PowerMonitoringButton : Button
|
|||||||
PowerValue = new Label()
|
PowerValue = new Label()
|
||||||
{
|
{
|
||||||
HorizontalAlignment = HAlignment.Right,
|
HorizontalAlignment = HAlignment.Right,
|
||||||
|
Align = Label.AlignMode.Right,
|
||||||
SetWidth = 72f,
|
SetWidth = 72f,
|
||||||
Margin = new Thickness(10, 0, 0, 0),
|
Margin = new Thickness(10, 0, 0, 0),
|
||||||
ClipText = true,
|
ClipText = true,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ power-monitoring-window-total-sources = Total generator output
|
|||||||
power-monitoring-window-total-battery-usage = Total battery usage
|
power-monitoring-window-total-battery-usage = Total battery usage
|
||||||
power-monitoring-window-total-loads = Total network loads
|
power-monitoring-window-total-loads = Total network loads
|
||||||
power-monitoring-window-value = { POWERWATTS($value) }
|
power-monitoring-window-value = { POWERWATTS($value) }
|
||||||
|
power-monitoring-window-button-value = {$value} W
|
||||||
power-monitoring-window-show-inactive-consumers = Show Inactive Consumers
|
power-monitoring-window-show-inactive-consumers = Show Inactive Consumers
|
||||||
|
|
||||||
power-monitoring-window-show-cable-networks = Toggle cable networks
|
power-monitoring-window-show-cable-networks = Toggle cable networks
|
||||||
|
|||||||
Reference in New Issue
Block a user