21 QStringList patterns = {QStringLiteral(
"city.size_%1")};
29 std::vector<drawn_sprite>
32 const unit *punit)
const
44 std::vector<drawn_sprite> sprs;
69 _(
"Tileset \"%s\" doesn't support big city sizes, such as %d. "
70 "Size not displayed as expected."),
citizens city_size_get(const struct city *pcity)
Get the city size.
virtual bool has_size() const
Returns whether the city size is shown in the bar.
static citybar_painter * current()
Returns the current painter (never null).
bool m_warned
Did we warn the user?
std::vector< drawn_sprite > fill_sprite_array(const tile *ptile, const tile_edge *pedge, const tile_corner *pcorner, const unit *punit) const override
Fill in the given sprite array with any needed city size sprites.
void load_sprites() override
Loads all sprites that do not depend on the ruleset.
layer_city_size(struct tileset *ts, const QPoint &offset)
std::array< QPixmap *, NUM_TILES_DIGITS > m_hundreds
std::array< QPixmap *, NUM_TILES_DIGITS > m_tens
std::array< QPixmap *, NUM_TILES_DIGITS > m_units
A layer when drawing the map.
struct tileset * tileset() const
client_options * gui_options
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
const char * tileset_name_get(const struct tileset *t)
Return tileset name.
void assign_digit_sprites(struct tileset *t, QPixmap *units[NUM_TILES_DIGITS], QPixmap *tens[NUM_TILES_DIGITS], QPixmap *hundreds[NUM_TILES_DIGITS], const QStringList &patterns)
Assigns the digits for city or go-to orders, for units, tens, and hundreds (i.e.
void tileset_error(struct tileset *t, QtMsgType level, const char *format,...)
Called when ever there's problem in ruleset/tileset compatibility.