Skip to content

Commit

Permalink
feat(ui): Display selected ship's category under its info in the shop (
Browse files Browse the repository at this point in the history
  • Loading branch information
mOctave authored Oct 22, 2023
1 parent 0fa4a63 commit e33d332
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/ShipInfoDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ void ShipInfoDisplay::UpdateAttributes(const Ship &ship, const PlayerInfo &playe

attributeHeaderLabels.push_back("model:");
attributeHeaderValues.push_back(ship.DisplayModelName());

// Only show the ship category on scrolling panels with no risk of overflow.
if(scrollingPanel)
{
attributeHeaderLabels.push_back("category:");
const string &category = ship.BaseAttributes().Category();
attributeHeaderValues.push_back(category.empty() ? "???" : category);
}

attributesHeight = 20;

attributeLabels.clear();
Expand Down

0 comments on commit e33d332

Please sign in to comment.