From c28fafa1244fefd5bbfa6f7f59ea44b62fc923b4 Mon Sep 17 00:00:00 2001 From: hreintke Date: Fri, 7 Dec 2018 16:36:05 +0100 Subject: [PATCH] Haltdetail lineinfo 2 --- gui/halt_detail.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gui/halt_detail.cc b/gui/halt_detail.cc index 17fe1a063..fdc2dd3e2 100644 --- a/gui/halt_detail.cc +++ b/gui/halt_detail.cc @@ -21,6 +21,7 @@ #include "../dataobj/translator.h" #include "../dataobj/loadsave.h" +#include "../dataobj/schedule.h" #include "../player/simplay.h" @@ -236,8 +237,17 @@ void halt_detail_t::halt_detail_info() cont.add_component( b ); } - // Line labels with color of player - label_names.append( strdup(halt->registered_lines[i]->get_name()) ); + // Line information with color of player + cbuffer_t b; + schedule_t *fpl = halt->registered_lines[i]->get_schedule(); + b.printf("%s <%d> ", halt->registered_lines[i]->get_name(), halt->registered_lines[i]->count_convoys()); + for (uint8 ii = 0; ii < fpl->get_count(); ii++) { + halthandle_t fpl_halt = haltestelle_t::get_halt(fpl->entries[ii].pos, welt->get_active_player()); + if (fpl_halt.is_bound() && (fpl_halt == halt)) { + b.printf("(%d,%d) ", fpl->entries[ii].minimum_loading, fpl->entries[ii].waiting_time_shift); + } + } + label_names.append(strdup(b)); gui_label_t *l = new gui_label_t( label_names.back(), PLAYER_FLAG|color_idx_to_rgb(halt->registered_lines[i]->get_owner()->get_player_color1()+0) ); l->set_pos( scr_coord(D_MARGIN_LEFT+D_BUTTON_HEIGHT+D_H_SPACE, offset_y) ); linelabels.append( l ); -- 2.13.2.windows.1