Skip to content

Commit

Permalink
CHG: The minimap factory link is displayed based on the topmost facto…
Browse files Browse the repository at this point in the history
…ry info dialog
  • Loading branch information
Ranran-the-JuicyPork committed Mar 9, 2022
1 parent 789f920 commit fae1da9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui/minimap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2096,13 +2096,14 @@ void minimap_t::draw(scr_coord pos)
display_ddd_proportional_clip(boxpos.x, boxpos.y, name_width, 0, color_idx_to_rgb(10), color_idx_to_rgb(COL_WHITE), name, true);
}

for (uint32 i = 0; i < win_get_open_count(); i++) {
for (int i = win_get_open_count()-1; i>=0; i--) {
gui_frame_t *g = win_get_index(i);
if(g->get_rdwr_id()== magic_factory_info) {
// is a factory info window
const fabrik_t * const fab = dynamic_cast<fabrik_info_t *>(g)->get_factory();
draw_factory_connections(fab, true, pos);
draw_factory_connections(fab, false, pos);
break;
}
}

Expand Down

0 comments on commit fae1da9

Please sign in to comment.