Use font::unicode_bullet instead of manually writing •
This commit is contained in:
parent
3236a4b085
commit
71bb216352
5 changed files with 16 additions and 16 deletions
|
@ -128,7 +128,7 @@ size_t context_manager::modified_maps(std::string& message) {
|
|||
}
|
||||
}
|
||||
for (std::string& str : modified) {
|
||||
message += "\n" + std::string("• ") + str;
|
||||
message += "\n" + font::unicode_bullet + " " + str;
|
||||
}
|
||||
return modified.size();
|
||||
}
|
||||
|
|
|
@ -907,7 +907,7 @@ static bool handle_addon_requirements_gui(CVideo& v, const std::vector<mp::game_
|
|||
|
||||
for(const mp::game_info::required_addon & a : reqs) {
|
||||
if (a.outcome == mp::game_info::CANNOT_SATISFY) {
|
||||
err_msg += "• " + a.message + "\n";
|
||||
err_msg += font::unicode_bullet + " " + a.message + "\n";
|
||||
}
|
||||
}
|
||||
gui2::show_message(v, e_title, err_msg, message::auto_close);
|
||||
|
@ -924,7 +924,7 @@ static bool handle_addon_requirements_gui(CVideo& v, const std::vector<mp::game_
|
|||
std::vector<std::string> needs_download;
|
||||
for(const mp::game_info::required_addon & a : reqs) {
|
||||
if(a.outcome == mp::game_info::NEED_DOWNLOAD) {
|
||||
err_msg += "• " + a.message + "\n";
|
||||
err_msg += font::unicode_bullet + " " + a.message + "\n";
|
||||
|
||||
needs_download.push_back(a.addon_id);
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ void faction_select::on_faction_select(window& window)
|
|||
|
||||
for(const auto& recruit : recruit_list) {
|
||||
if(const unit_type* rt = unit_types.find(recruit)) {
|
||||
recruit_names.push_back("• " + rt->type_name());
|
||||
recruit_names.push_back(font::unicode_bullet + " " + rt->type_name());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ void password_box::set_value(const std::string& text)
|
|||
size_t sz = utf8::size(text);
|
||||
utf8::string passwd;
|
||||
for(size_t i = 0; i < sz; i++) {
|
||||
passwd.append("•");
|
||||
passwd.append(font::unicode_bullet);
|
||||
}
|
||||
text_box::set_value(passwd);
|
||||
}
|
||||
|
@ -76,11 +76,11 @@ void password_box::insert_char(const utf8::string& unicode)
|
|||
|
||||
size_t sz = utf8::size(unicode);
|
||||
if(sz == 1) {
|
||||
text_box::insert_char("•");
|
||||
text_box::insert_char(font::unicode_bullet);
|
||||
} else {
|
||||
utf8::string passwd;
|
||||
for(size_t i = 0; i < sz; i++) {
|
||||
passwd.append("•");
|
||||
passwd.append(font::unicode_bullet);
|
||||
}
|
||||
text_box::insert_char(passwd);
|
||||
set_cursor(sel + sz, false);
|
||||
|
|
|
@ -475,7 +475,7 @@ std::vector<topic> generate_weapon_special_topics(const bool sort_generated)
|
|||
text << "\n\n" << _("<header>text='Units with this special attack'</header>") << "\n";
|
||||
std::set<std::string, string_less> &units = special_units[s->first];
|
||||
for (std::set<std::string, string_less>::iterator u = units.begin(); u != units.end(); ++u) {
|
||||
text << "• " << (*u) << "\n";
|
||||
text << font::unicode_bullet << " " << (*u) << "\n";
|
||||
}
|
||||
|
||||
topics.push_back( topic(s->first, id, text.str()) );
|
||||
|
@ -541,7 +541,7 @@ std::vector<topic> generate_ability_topics(const bool sort_generated)
|
|||
text << "\n\n" << _("<header>text='Units with this ability'</header>") << "\n";
|
||||
std::set<std::string, string_less> &units = ability_units[a->first];
|
||||
for (std::set<std::string, string_less>::iterator u = units.begin(); u != units.end(); ++u) {
|
||||
text << "• " << (*u) << "\n";
|
||||
text << font::unicode_bullet << " " << (*u) << "\n";
|
||||
}
|
||||
|
||||
topics.push_back( topic(a->first, id, text.str()) );
|
||||
|
@ -578,7 +578,7 @@ std::vector<topic> generate_era_topics(const bool sort_generated, const std::str
|
|||
|
||||
std::sort(faction_links.begin(), faction_links.end());
|
||||
for (const std::string &link : faction_links) {
|
||||
text << "• " << link << "\n";
|
||||
text << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
|
||||
topic era_topic(era["name"], ".." + era_prefix + era["id"].str(), text.str());
|
||||
|
@ -643,7 +643,7 @@ std::vector<topic> generate_faction_topics(const config & era, const bool sort_g
|
|||
const std::vector<std::string> leaders =
|
||||
make_unit_links_list( utils::split(f["leader"]), true );
|
||||
for (const std::string &link : leaders) {
|
||||
text << "• " << link << "\n";
|
||||
text << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
|
||||
text << "\n";
|
||||
|
@ -652,7 +652,7 @@ std::vector<topic> generate_faction_topics(const config & era, const bool sort_g
|
|||
const std::vector<std::string> recruit_links =
|
||||
make_unit_links_list( recruit_ids, true );
|
||||
for (const std::string &link : recruit_links) {
|
||||
text << "• " << link << "\n";
|
||||
text << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
|
||||
const std::string name = f["name"];
|
||||
|
@ -987,7 +987,7 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
|
|||
|
||||
text << _("<header>text='Units of this race'</header>") << "\n";
|
||||
for (std::set<std::string, string_less>::iterator u = race_units.begin(); u != race_units.end(); ++u) {
|
||||
text << "• " << (*u) << "\n";
|
||||
text << font::unicode_bullet << " " << (*u) << "\n";
|
||||
}
|
||||
|
||||
topics.push_back(topic(race_name, race_id, text.str()) );
|
||||
|
@ -1056,7 +1056,7 @@ std::string generate_contents_links(const std::string& section_name, config cons
|
|||
std::vector<link>::iterator l;
|
||||
for (l = topics_links.begin(); l != topics_links.end(); ++l) {
|
||||
std::string link = make_link(l->first, l->second);
|
||||
res << "• " << link << "\n";
|
||||
res << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
|
||||
return res.str();
|
||||
|
@ -1070,7 +1070,7 @@ std::string generate_contents_links(const section &sec, const std::vector<topic>
|
|||
for (s = sec.sections.begin(); s != sec.sections.end(); ++s) {
|
||||
if (is_visible_id((*s)->id)) {
|
||||
std::string link = make_link((*s)->title, ".."+(*s)->id);
|
||||
res << "• " << link << "\n";
|
||||
res << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ std::string generate_contents_links(const section &sec, const std::vector<topic>
|
|||
for (t = topics.begin(); t != topics.end(); ++t) {
|
||||
if (is_visible_id(t->id)) {
|
||||
std::string link = make_link(t->title, t->id);
|
||||
res << "• " << link << "\n";
|
||||
res << font::unicode_bullet << " " << link << "\n";
|
||||
}
|
||||
}
|
||||
return res.str();
|
||||
|
|
Loading…
Add table
Reference in a new issue