Skip to content

Commit

Permalink
feat(ui): Hide the mission description pane if no mission is selected (
Browse files Browse the repository at this point in the history
  • Loading branch information
nickshanks authored Jun 2, 2024
1 parent d1ddd0f commit c7997bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data/_ui/interfaces.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1293,9 +1293,14 @@ interface "bank"


interface "mission" bottom
visible if "has description"
sprite "ui/mission"
align bottom

visible if "!has description"
sprite "ui/mission empty"
align bottom

visible
label "cargo space free:"
center -130 -85
string "cargo free"
Expand Down
Binary file added images/ui/mission empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions source/MissionPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,9 @@ void MissionPanel::DrawMissionInfo()
else if(acceptedIt != accepted.end())
info.SetCondition("can abort");

if(availableIt != available.end() || acceptedIt != accepted.end())
info.SetCondition("has description");

info.SetString("cargo free", to_string(player.Cargo().Free()) + " tons");
info.SetString("bunks free", to_string(player.Cargo().BunksFree()) + " bunks");

Expand Down

0 comments on commit c7997bf

Please sign in to comment.