#include <SDL3/SDL.h>
#include "astring.h"
#include "bitvector.h"
#include "fcintl.h"
#include "log.h"
#include "game.h"
#include "movement.h"
#include "specialist.h"
#include "unitlist.h"
#include "client_main.h"
#include "climisc.h"
#include "control.h"
#include "text.h"
#include "cityrep.h"
#include "cma_fe.h"
#include "colors.h"
#include "dialogs.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "menu.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "wldlg.h"
#include "citydlg.h"
Go to the source code of this file.
|
static void | popdown_hurry_production_dialog (void) |
|
static void | disable_city_dlg_widgets (void) |
|
static void | redraw_city_dialog (struct city *pcity) |
|
static void | rebuild_imprm_list (struct city *pcity) |
|
static void | rebuild_citydlg_title_str (struct widget *pwindow, struct city *pcity) |
|
struct impr_type * | get_building_for_effect (enum effect_type effect_type) |
|
static void | popdown_city_menu_dlg (bool enable_city_dialog_widgets) |
|
static void | del_city_dialog (void) |
|
static int | city_dlg_callback (struct widget *pwindow) |
|
static int | cancel_units_orders_city_dlg_callback (struct widget *button) |
|
static int | activate_units_orders_city_dlg_callback (struct widget *button) |
|
static int | activate_and_exit_units_orders_city_dlg_callback (struct widget *button) |
|
static int | sentry_units_orders_city_dlg_callback (struct widget *button) |
|
static int | fortify_units_orders_city_dlg_callback (struct widget *button) |
|
static int | disband_units_orders_city_dlg_callback (struct widget *button) |
|
static int | homecity_units_orders_city_dlg_callback (struct widget *button) |
|
static int | upgrade_units_orders_city_dlg_callback (struct widget *button) |
|
static int | units_orders_dlg_callback (struct widget *button) |
|
static int | units_orders_city_dlg_callback (struct widget *button) |
|
static SDL_Surface * | create_unit_surface (struct unit *punit, bool support, int w, int h) |
|
static void | create_present_supported_units_widget_list (struct unit_list *units) |
|
void | free_city_units_lists (void) |
|
static int | army_city_dlg_callback (struct widget *button) |
|
static int | supported_unit_city_dlg_callback (struct widget *button) |
|
static int | info_city_dlg_callback (struct widget *button) |
|
static int | happy_city_dlg_callback (struct widget *button) |
|
static int | misc_panel_city_dlg_callback (struct widget *pwidget) |
|
static void | create_city_options_widget_list (struct city *pcity) |
|
static int | options_city_dlg_callback (struct widget *button) |
|
static int | cma_city_dlg_callback (struct widget *button) |
|
static int | exit_city_dlg_callback (struct widget *button) |
|
static int | cancel_buy_prod_city_dlg_callback (struct widget *button) |
|
static int | ok_buy_prod_city_dlg_callback (struct widget *button) |
|
static int | buy_prod_city_dlg_callback (struct widget *button) |
|
static int | hurry_production_window_callback (struct widget *pwindow) |
|
void | popup_hurry_production_dialog (struct city *pcity, SDL_Surface *pdest) |
|
static int | change_prod_dlg_callback (struct widget *button) |
|
static int | sell_imprvm_dlg_cancel_callback (struct widget *cancel_button) |
|
static int | sell_imprvm_dlg_ok_callback (struct widget *ok_button) |
|
static int | sell_imprvm_dlg_callback (struct widget *impr) |
|
void | enable_city_dlg_widgets (void) |
|
SDL_Surface * | get_scaled_city_map (struct city *pcity) |
|
static int | resource_map_city_dlg_callback (struct widget *map) |
|
static int | city_comp_by_turn_founded (const void *a, const void *b) |
|
static int | next_prev_city_dlg_callback (struct widget *button) |
|
static int | new_name_city_dlg_callback (struct widget *pedit) |
|
static void | refresh_city_names (struct city *pcity) |
|
static void | redraw_misc_city_dialog (struct widget *city_window, struct city *pcity) |
|
static void | redraw_supported_units_city_dialog (struct widget *city_window, struct city *pcity) |
|
static void | redraw_army_city_dialog (struct widget *city_window, struct city *pcity) |
|
static void | redraw_info_city_dialog (struct widget *city_window, struct city *pcity) |
|
static void | redraw_happiness_city_dialog (const struct widget *city_window, struct city *pcity) |
|
void | real_city_dialog_popup (struct city *pcity) |
|
void | popdown_city_dialog (struct city *pcity) |
|
void | popdown_all_city_dialogs (void) |
|
void | real_city_dialog_refresh (struct city *pcity) |
|
void | refresh_unit_city_dialogs (struct unit *punit) |
|
bool | city_dialog_is_open (struct city *pcity) |
|
◆ specialist_type
Enumerator |
---|
SP_ELVIS | |
SP_SCIENTIST | |
SP_TAXMAN | |
SP_LAST | |
Definition at line 105 of file citydlg.c.
◆ activate_and_exit_units_orders_city_dlg_callback()
Activate unit and popdow city dlg. + center on unit.
Definition at line 270 of file citydlg.c.
◆ activate_units_orders_city_dlg_callback()
Activate unit and del unit order dlg. widget group.
Definition at line 253 of file citydlg.c.
◆ army_city_dlg_callback()
Change to present units panel.
Definition at line 827 of file citydlg.c.
◆ buy_prod_city_dlg_callback()
Popup buy productions dlg.
Definition at line 1129 of file citydlg.c.
◆ cancel_buy_prod_city_dlg_callback()
Popdown buy productions dlg.
Definition at line 1086 of file citydlg.c.
◆ cancel_units_orders_city_dlg_callback()
Popdown unit city orders menu.
Definition at line 235 of file citydlg.c.
◆ change_prod_dlg_callback()
Popup the change production dialog.
Definition at line 1346 of file citydlg.c.
◆ city_comp_by_turn_founded()
Helper for switch_city_callback.
Definition at line 1651 of file citydlg.c.
◆ city_dialog_is_open()
Return whether the dialog for the given city is open.
Definition at line 3856 of file citydlg.c.
◆ city_dlg_callback()
Main City Dlg. window callback. This implements specialist change ( Elvis, Taxman, Scientist )
Definition at line 195 of file citydlg.c.
◆ cma_city_dlg_callback()
User interacted with Citizen Governor button.
Definition at line 1057 of file citydlg.c.
◆ create_city_options_widget_list()
Create city options widgets.
Definition at line 971 of file citydlg.c.
◆ create_present_supported_units_widget_list()
static void create_present_supported_units_widget_list |
( |
struct unit_list * |
units | ) |
|
|
static |
Create present/supported units widget list 207 pixels is panel width in city dlg. 220 - max y position pixel position belong to panel area.
Definition at line 701 of file citydlg.c.
◆ create_unit_surface()
Create unit icon with support icons.
Definition at line 615 of file citydlg.c.
◆ del_city_dialog()
◆ disable_city_dlg_widgets()
Disable all city dialog widgets
Definition at line 1591 of file citydlg.c.
◆ disband_units_orders_city_dlg_callback()
Disband unit and del unit order dlg. widget group.
Definition at line 327 of file citydlg.c.
◆ enable_city_dlg_widgets()
Enable city dialog widgets that can be enabled.
Definition at line 1528 of file citydlg.c.
◆ exit_city_dlg_callback()
◆ fortify_units_orders_city_dlg_callback()
Fortify unit and del unit order dlg. widget group.
Definition at line 310 of file citydlg.c.
◆ free_city_units_lists()
Free city present/supported units panel list.
Definition at line 814 of file citydlg.c.
◆ get_building_for_effect()
Return first building that has given effect.
FIXME: Some callers would work better if they got building actually provides the effect at the moment, and not just first potential one.
Definition at line 128 of file citydlg.c.
◆ get_scaled_city_map()
Return scaled city map.
Definition at line 1613 of file citydlg.c.
◆ happy_city_dlg_callback()
Change to happines panel.
Definition at line 890 of file citydlg.c.
◆ homecity_units_orders_city_dlg_callback()
Homecity unit and del unit order dlg. widget group.
Definition at line 342 of file citydlg.c.
◆ hurry_production_window_callback()
Main hurry productions dlg. callback
Definition at line 1157 of file citydlg.c.
◆ info_city_dlg_callback()
Change to info panel.
Definition at line 869 of file citydlg.c.
◆ misc_panel_city_dlg_callback()
City option callback
Definition at line 910 of file citydlg.c.
◆ new_name_city_dlg_callback()
New city name given for renaming it.
Definition at line 1736 of file citydlg.c.
◆ next_prev_city_dlg_callback()
Callback for next/prev city button
Definition at line 1662 of file citydlg.c.
◆ ok_buy_prod_city_dlg_callback()
◆ options_city_dlg_callback()
Change to city options panel.
Definition at line 1035 of file citydlg.c.
◆ popdown_all_city_dialogs()
Close all cities dialogs.
Definition at line 3817 of file citydlg.c.
◆ popdown_city_dialog()
Close the dialog for the given city.
Definition at line 3802 of file citydlg.c.
◆ popdown_city_menu_dlg()
Destroy City Menu Dlg but not undraw.
Definition at line 142 of file citydlg.c.
◆ popdown_hurry_production_dialog()
Popup buy productions dlg.
Definition at line 1144 of file citydlg.c.
◆ popup_hurry_production_dialog()
Popup buy production dlg.
Definition at line 1169 of file citydlg.c.
◆ real_city_dialog_popup()
Pop up (or bring to the front) a dialog for the given city. It may or may not be modal.
Definition at line 3546 of file citydlg.c.
◆ real_city_dialog_refresh()
Refresh (update) all data for the given city's dialog.
Definition at line 3827 of file citydlg.c.
◆ rebuild_citydlg_title_str()
Recreate citydialog title.
Definition at line 3506 of file citydlg.c.
◆ rebuild_imprm_list()
Recreate improvement list for city dialog.
Definition at line 3415 of file citydlg.c.
◆ redraw_army_city_dialog()
Redraw garrison panel 207 = max panel width
Definition at line 1873 of file citydlg.c.
◆ redraw_city_dialog()
◆ redraw_happiness_city_dialog()
Redraw (refresh/update) the happiness info for the dialog 207 - max panel width 180 - max citizens icons area width
Definition at line 2096 of file citydlg.c.
◆ redraw_info_city_dialog()
Redraw Info panel 207 = max panel width
Definition at line 1930 of file citydlg.c.
◆ redraw_misc_city_dialog()
Redraw city option panel 207 = max panel width
Definition at line 1781 of file citydlg.c.
◆ redraw_supported_units_city_dialog()
Redraw supported unit panel 207 = max panel width
Definition at line 1816 of file citydlg.c.
◆ refresh_city_names()
Refresh (update) the city names for the dialog
Definition at line 1761 of file citydlg.c.
◆ refresh_unit_city_dialogs()
Update city dialogs when the given unit's status changes. This typically means updating both the unit's home city (if any) and the city in which it is present (if any).
Definition at line 3840 of file citydlg.c.
◆ resource_map_city_dlg_callback()
City resource map: event callback
Definition at line 1627 of file citydlg.c.
◆ sell_imprvm_dlg_callback()
Popup Sell Imprvm. Dlg.
Definition at line 1417 of file citydlg.c.
◆ sell_imprvm_dlg_cancel_callback()
Popdown Sell Imprv. Dlg. and exit without sell.
Definition at line 1366 of file citydlg.c.
◆ sell_imprvm_dlg_ok_callback()
Popdown Sell Imprv. Dlg. and exit with sell.
Definition at line 1383 of file citydlg.c.
◆ sentry_units_orders_city_dlg_callback()
Sentry unit and del unit order dlg. widget group.
Definition at line 293 of file citydlg.c.
◆ supported_unit_city_dlg_callback()
Change to supported units panel.
Definition at line 847 of file citydlg.c.
◆ units_orders_city_dlg_callback()
Popup units orders menu.
Definition at line 382 of file citydlg.c.
◆ units_orders_dlg_callback()
Main unit order dlg. callback.
Definition at line 374 of file citydlg.c.
◆ upgrade_units_orders_city_dlg_callback()
Upgrade unit and del unit order dlg. widget group.
Definition at line 359 of file citydlg.c.
◆ city_map_zoom
◆ hurry_prog_dlg
◆ pcity_dlg