MP tooltips: allow line breaks between hexagons by using Unicode zero width space
This commit is contained in:
parent
490434bc3c
commit
d01aabc81f
2 changed files with 4 additions and 2 deletions
|
@ -196,7 +196,8 @@ static inline std::string get_mp_tooltip(int total_movement, std::function<int (
|
|||
const int movement_hexes_per_turn = total_movement / tm.moves;
|
||||
tooltip << " ";
|
||||
for(int i = 0; i < movement_hexes_per_turn; ++i) {
|
||||
tooltip << "\u2b23"; // Unicode horizontal black hexagon
|
||||
// Unicode horizontal black hexagon and Unicode zero width space (to allow a line break)
|
||||
tooltip << "\u2b23\u200b";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -709,7 +709,8 @@ static config unit_moves(reports::context & rc, const unit* u, bool is_visible_u
|
|||
const int movement_hexes_per_turn = u->total_movement() / tm.moves;
|
||||
tooltip << " ";
|
||||
for(int i = 0; i < movement_hexes_per_turn; ++i) {
|
||||
tooltip << "\u2b23"; // Unicode horizontal black hexagon
|
||||
// Unicode horizontal black hexagon and Unicode zero width space (to allow a line break)
|
||||
tooltip << "\u2b23\u200b";
|
||||
}
|
||||
}
|
||||
tooltip << naps << '\n';
|
||||
|
|
Loading…
Add table
Reference in a new issue