91 const size_t min_msg_len = 50;
92 size_t msg_len = qstrlen(
message);
94 char *s =
new char[
MAX(msg_len, min_msg_len) + 1];
107 nspc = min_msg_len - qstrlen(s);
109 strncat(s,
" ", nspc);
203 if (
messages[message_index]->location_ok) {
void popup_city_dialog(struct city *pcity)
void center_on_tile(tile *tile, bool animate=true)
Centers the view on a tile.
static update_queue * uq()
void add(uq_callback_t callback, void *data)
bool client_has_player()
Either controlling or observing.
struct player * client_player()
Either controlling or observing.
bool can_client_change_view()
Return TRUE if the client can change the view; i.e.
#define text_tag_list_copy(tags)
#define fc_assert_ret(condition)
void real_meswin_dialog_update(void *unused)
Do the work of updating (populating) the message dialog.
static void meswin_dialog_update()
Update the message dialog if needed.
void meswin_popup_city(int message_index)
Called from messagewin.c if the user clicks on the popup-city button.
void meswin_goto(int message_index)
Called from messagewin.c if the user clicks on the goto button.
void meswin_clear_older(int turn, int phase)
Clear all messages.
static int messages_alloc
static int messages_total
void meswin_add(const char *message, const struct text_tag_list *tags, struct tile *ptile, enum event_type event, int turn, int phase)
Add a message.
int meswin_get_num_messages()
Returns the number of message in the window.
static struct message ** messages
const struct message * meswin_get_message(int message_index)
Returns the pointer to a message.
void meswin_set_visited_state(int message_index, bool state)
Sets the visited-state of a message.
client_options * gui_options
pageGame * queen()
Return game instandce.
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
Return TRUE iff the player can see units in the city.
bool can_player_see_city_internals(const struct player *pplayer, const struct city *pcity)
Return TRUE iff the player can see the city's internals.
bool show_previous_turn_messages
bool center_when_popup_city
struct text_tag_list * tags
#define fc_realloc(ptr, sz)
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.