Skip to content

Commit

Permalink
Merge branch 'space-syndicate:master' into borg-locale
Browse files Browse the repository at this point in the history
  • Loading branch information
lzk228 authored Dec 21, 2023
2 parents 2665ca0 + 25e869c commit 6f67965
Show file tree
Hide file tree
Showing 320 changed files with 61,632 additions and 49,562 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ jobs:
key: ${{ secrets.BUILDS_SSH_KEY }}
script: node ~/scripts/push_to_manifest.js -fork ${{ vars.FORK_ID }} -id ${{ github.sha }}

- name: Publish changelog (Discord)
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
TRANSLATION_API_URL: ${{ secrets.CHANGELOG_TRANSLATION_API_URL }}
# - name: Publish changelog (Discord)
# run: Tools/actions_changelogs_since_last_run.py
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
# TRANSLATION_API_URL: ${{ secrets.CHANGELOG_TRANSLATION_API_URL }}

# - name: Publish changelog (RSS)
# run: Tools/actions_changelog_rss.py
Expand Down
34 changes: 30 additions & 4 deletions Content.Client/Atmos/UI/GasAnalyzerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ private void GenerateGasDisplay(GasMixEntry gasMix, Control parent)
{
Orientation = BoxContainer.LayoutOrientation.Vertical
};
var tablePercent = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical
};
dataContainer.AddChild(new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
Expand All @@ -252,14 +256,21 @@ private void GenerateGasDisplay(GasMixEntry gasMix, Control parent)
MinSize = new Vector2(10, 0),
HorizontalExpand = true
},
tableVal
tableVal,
new Control
{
MinSize = new Vector2(10, 0),
HorizontalExpand = true
},
tablePercent
}
});
// This is the gas bar thingy
var height = 30;
var gasBar = new SplitBar
{
MinHeight = height,
MinBarSize = new Vector2(12, 0)
};
// Separator
dataContainer.AddChild(new Control
Expand All @@ -274,6 +285,17 @@ private void GenerateGasDisplay(GasMixEntry gasMix, Control parent)
totalGasAmount += gas.Amount;
}

tableKey.AddChild(new Label
{ Text = Loc.GetString("gas-analyzer-window-gas-column-name"), Align = Label.AlignMode.Center });
tableVal.AddChild(new Label
{ Text = Loc.GetString("gas-analyzer-window-molarity-column-name"), Align = Label.AlignMode.Center });
tablePercent.AddChild(new Label
{ Text = Loc.GetString("gas-analyzer-window-percentage-column-name"), Align = Label.AlignMode.Center });

tableKey.AddChild(new StripeBack());
tableVal.AddChild(new StripeBack());
tablePercent.AddChild(new StripeBack());

for (var j = 0; j < gasMix.Gases.Length; j++)
{
var gas = gasMix.Gases[j];
Expand All @@ -286,10 +308,14 @@ private void GenerateGasDisplay(GasMixEntry gasMix, Control parent)
tableVal.AddChild(new Label
{
Text = Loc.GetString("gas-analyzer-window-molarity-text",
("mol", $"{gas.Amount:0.##}"),
("percentage", $"{(gas.Amount / totalGasAmount * 100):0.#}")),
("mol", $"{gas.Amount:0.00}")),
Align = Label.AlignMode.Right,
HorizontalExpand = true
});
tablePercent.AddChild(new Label
{
Text = Loc.GetString("gas-analyzer-window-percentage-text",
("percentage", $"{(gas.Amount / totalGasAmount * 100):0.0}")),
Align = Label.AlignMode.Right
});

// Add to the gas bar //TODO: highlight the currently hover one
Expand Down
Loading

0 comments on commit 6f67965

Please sign in to comment.