Skip to content

Commit

Permalink
fix(ui): Draw distance to the selected system after mission markers (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGoodIdea authored Apr 21, 2024
1 parent 46a392f commit acde3d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions source/MapPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,15 @@ void MapPanel::Draw()
DrawSystems();
DrawNames();
DrawMissions();
DrawSelectedSystem();
}



void MapPanel::FinishDrawing(const string &buttonCondition)
{
// Display the name of and distance to the selected system.
DrawSelectedSystem();

// Draw the buttons to switch to other map modes.

// Remember which buttons we're showing.
Expand Down Expand Up @@ -1210,7 +1212,7 @@ void MapPanel::DrawTravelPlan()



// Fill in the top-middle header bar that names the selected system, and indicates its distance.
// Display the name of and distance to the selected system.
void MapPanel::DrawSelectedSystem()
{
const Sprite *sprite = SpriteSet::Get("ui/selected system");
Expand Down
4 changes: 3 additions & 1 deletion source/MapPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ class MapPanel : public Panel {
virtual void Step() override;
virtual void Draw() override;

// Draw map mode buttons, escort/storage tooltips, and the non-routable system warning.
// Draw elements common for all map panels that need to be placed
// on top of everything else. This includes distance info, map mode buttons,
// escort/storage tooltips, and the non-routable system warning.
void FinishDrawing(const std::string &buttonCondition);

static void DrawMiniMap(const PlayerInfo &player, float alpha, const System *const jump[2], int step);
Expand Down

0 comments on commit acde3d2

Please sign in to comment.