Skip to content

Commit

Permalink
Add visible text when no bounties have been completed yet
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryNorfolk committed Jan 15, 2025
1 parent f86c801 commit fdeaef9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Content.Client/Cargo/UI/CargoBountyMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<ScrollContainer HScrollEnabled="False"
HorizontalExpand="True"
VerticalExpand="True">
<Label Name="NoHistoryLabel"
Text="{Loc 'bounty-console-history-empty-label'}"
Visible="False"
Align="Center" />
<BoxContainer Name="BountyHistoryContainer"
Orientation="Vertical"
VerticalExpand="True"
Expand Down
13 changes: 10 additions & 3 deletions Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ public void UpdateEntries(List<CargoBountyData> bounties, List<CargoBountyHistor
});

BountyHistoryContainer.Children.Clear();
foreach (var h in history)
if (history.Count == 0)
{
var entry = new BountyHistoryEntry(h);
BountyHistoryContainer.AddChild(entry);
NoHistoryLabel.Visible = true;
}
else
{
NoHistoryLabel.Visible = false;
foreach (var h in history)
{
BountyHistoryContainer.AddChild(new BountyHistoryEntry(h));
}
}
}
}
1 change: 1 addition & 0 deletions Resources/Locale/en-US/cargo/cargo-bounty-console.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ bounty-manifest-list-start = Item manifest:
bounty-console-tab-available-label = Available
bounty-console-tab-history-label = History
bounty-console-history-empty-label = No bounty history found
bounty-console-history-notice-completed-label = [color=limegreen]Completed[/color]
bounty-console-history-notice-skipped-label = [color=red]Skipped[/color] by {$id}

0 comments on commit fdeaef9

Please sign in to comment.