43#define HAPPINESS_PIX_WIDTH 30
45#define FEELING_WIDTH (HAPPINESS_PIX_WIDTH * tileset_small_sprite_width(tileset))
46#define FEELING_HEIGHT (tileset_small_sprite_height(tileset))
48#define NUM_HAPPINESS_MODIFIERS 6
63#define SPECLIST_TAG dialog
64#define SPECLIST_TYPE struct happiness_dialog
67#define dialog_list_iterate(dialoglist, pdialog) \
68 TYPED_LIST_ITERATE(struct happiness_dialog, dialoglist, pdialog)
69#define dialog_list_iterate_end LIST_ITERATE_END
105 if (pdialog->pcity ==
pcity) {
123 if (
ev->button == 1) {
272 _(
"Additional information is available%svia left "
273 "click on the citizens."),
low_dlg ?
"\n" :
" ");
335 if (pdialog ==
NULL) {
int get_city_citizen_types(struct city *pcity, enum citizen_feeling idx, enum citizen_category *categories)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
void intl_slist(int n, const char **s, bool *done)
void happiness_dialog_init(void)
void close_happiness_dialog(struct city *pcity)
static struct happiness_dialog * get_happiness_dialog(struct city *pcity)
void happiness_dialog_done(void)
static struct happiness_dialog * create_happiness_dialog(struct city *pcity, bool low_dlg, GtkWidget *win)
#define dialog_list_iterate_end
static gboolean show_happiness_popup(GtkWidget *w, GdkEventButton *ev, gpointer data)
void refresh_happiness_dialog(struct city *pcity)
static gboolean show_happiness_button_release(GtkWidget *w, GdkEventButton *ev, gpointer data)
#define dialog_list_iterate(dialoglist, pdialog)
static struct dialog_list * dialog_list
GtkWidget * get_top_happiness_display(struct city *pcity, bool low_dlg, GtkWidget *win)
static void refresh_feeling_surface(cairo_surface_t *dst, struct city *pcity, enum citizen_feeling index)
#define NUM_HAPPINESS_MODIFIERS
#define NUM_HAPPINESS_MODIFIERS
const char * text_happiness_cities(const struct city *pcity)
GtkWidget * cityname_label
GtkWidget * happiness_label[NUM_HAPPINESS_MODIFIERS]
cairo_surface_t * feeling_surfaces[NUM_HAPPINESS_MODIFIERS]
GtkWidget * happiness_ebox[NUM_HAPPINESS_MODIFIERS]
int fc_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
const char * text_happiness_nationality(const struct city *pcity)
const char * text_happiness_wonders(const struct city *pcity)
const char * text_happiness_units(const struct city *pcity)
const char * text_happiness_luxuries(const struct city *pcity)
const char * text_happiness_buildings(const struct city *pcity)
int tileset_small_sprite_width(const struct tileset *t)
struct sprite * get_citizen_sprite(const struct tileset *t, enum citizen_category type, int citizen_index, const struct city *pcity)