void ttent::add_row_to_heros(tlistbox& list, int h, int leader, int city, int stratum) { // Add list item string_map list_item; std::map<std::string, string_map> list_item_item; if (!rpg_mode_) { list_item["label"] = heros_[h].image(); list_item_item.insert(std::make_pair("icon", list_item)); } if (h != player_hero_->number_) { list_item["label"] = heros_[h].name(); } else { list_item["label"] = player_hero_->name(); } list_item_item.insert(std::make_pair("name", list_item)); if (leader != -1) { list_item["label"] = heros_[leader].name(); } else { list_item["label"] = "---"; } list_item_item.insert(std::make_pair("side", list_item)); if (city != -1) { list_item["label"] = heros_[city].name(); } else { list_item["label"] = "---"; } list_item_item.insert(std::make_pair("city", list_item)); list_item["label"] = hero::stratum_str(stratum); list_item_item.insert(std::make_pair("stratum", list_item)); list.add_row(list_item_item); if (rpg_mode_) { tgrid* grid_ptr = list.get_row_grid(mem_vsize_); tcontrol* control = dynamic_cast<tcontrol*>(grid_ptr->find("icon", true)); control->set_visible(twidget::INVISIBLE); } rows_mem_[mem_vsize_].hero_ = h; rows_mem_[mem_vsize_].leader_ = leader; rows_mem_[mem_vsize_].city_ = city; rows_mem_[mem_vsize_ ++].stratum_ = stratum; }