Freeciv-3.1
|
#include <SDL2/SDL.h>
#include "astring.h"
#include "bitvector.h"
#include "fcintl.h"
#include "log.h"
#include "rand.h"
#include "combat.h"
#include "game.h"
#include "government.h"
#include "movement.h"
#include "unitlist.h"
#include "client_main.h"
#include "climap.h"
#include "goto.h"
#include "helpdata.h"
#include "packhand.h"
#include "text.h"
#include "zoom.h"
#include "chatline.h"
#include "citydlg.h"
#include "cityrep.h"
#include "cma_fe.h"
#include "colors.h"
#include "finddlg.h"
#include "gotodlg.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "helpdlg.h"
#include "inteldlg.h"
#include "mapctrl.h"
#include "mapview.h"
#include "menu.h"
#include "messagewin.h"
#include "optiondlg.h"
#include "plrdlg.h"
#include "ratesdlg.h"
#include "repodlgs.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "wldlg.h"
#include "dialogs.h"
#include "speclist.h"
Go to the source code of this file.
Data Structures | |
struct | notify_goto_data |
struct | notify_goto_dialog |
struct | nation_info |
Macros | |
#define | SPECLIST_TAG notify_goto |
#define | SPECLIST_TYPE struct notify_goto_data |
#define | NUM_SEEN 20 |
#define | ADV_NUM_SEEN 15 |
#define | TARGETS_ROW 5 |
#define | TARGETS_COL 1 |
Variables | |
struct player * | races_player |
bool | is_unit_move_blocked |
static char * | leader_name = NULL |
static struct notify_goto_dialog * | notify_goto_dialog = NULL |
struct advanced_dialog * | notify_dlg = NULL |
static struct small_dialog * | unit_upgrade_dlg = NULL |
static struct small_dialog * | unit_disband_dlg = NULL |
static struct advanced_dialog * | unit_select_dlg = NULL |
static struct small_dialog * | terrain_info_dlg = NULL |
struct advanced_dialog * | advanced_terrain_dlg = NULL |
static struct small_dialog * | pillage_dlg = NULL |
static struct small_dialog * | connect_dlg = NULL |
static struct small_dialog * | gov_dlg = NULL |
static struct advanced_dialog * | nation_dlg = NULL |
static struct small_dialog * | help_dlg = NULL |
#define ADV_NUM_SEEN 15 |
#define NUM_SEEN 20 |
#define SPECLIST_TAG notify_goto |
#define SPECLIST_TYPE struct notify_goto_data |
#define TARGETS_COL 1 |
#define TARGETS_ROW 5 |
|
static |
User selected all units from tile.
Definition at line 1552 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User selected unit.
Definition at line 1533 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
Sentry unit widget contains.
Definition at line 1570 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
int advanced_terrain_window_dlg_callback | ( | struct widget * | pwindow | ) |
User selected "Advanced Menu"
Definition at line 1429 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User interacted with disband unit dialog cancel -button
Definition at line 841 of file dialogs.c.
Referenced by popup_unit_disband_dlg().
|
static |
User requested closing of help dialog.
Definition at line 2858 of file dialogs.c.
Referenced by nation_button_callback(), and popdown_races_dialog().
|
static |
User interacted with upgrade unit dialog cancel -button
Definition at line 632 of file dialogs.c.
Referenced by popup_unit_upgrade_dlg().
|
static |
Update nation label.
Definition at line 3019 of file dialogs.c.
Referenced by nation_button_callback(), and races_toggles_set_sensitive().
|
static |
User requested production change.
Definition at line 1487 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User requested leader gender change.
Definition at line 2634 of file dialogs.c.
Referenced by next_name_callback(), popup_races_dialog(), and prev_name_callback().
|
static |
User requested opening of cma settings.
Definition at line 1518 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User interacted with disband unit widget.
Definition at line 829 of file dialogs.c.
Referenced by popup_unit_disband_dlg().
int exit_advanced_terrain_dlg_callback | ( | struct widget * | pwidget | ) |
User requested closing of advanced terrain dialog.
Definition at line 1441 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User interacted with notify dialog close button.
Definition at line 490 of file dialogs.c.
Referenced by popup_notify_dialog().
|
static |
User requested closing of pillage dialog.
Definition at line 2255 of file dialogs.c.
Referenced by popup_pillage_dialog().
|
static |
Popdown terrain information dialog.
Definition at line 1290 of file dialogs.c.
Referenced by popup_terrain_info_dialog().
|
static |
User requested unit select window to be closed.
Definition at line 1041 of file dialogs.c.
Referenced by unit_select_dialog_popup().
|
static |
Count available playable nations.
Definition at line 3090 of file dialogs.c.
Referenced by popup_races_dialog(), and races_toggles_set_sensitive().
|
static |
Initiate goto to selected tile.
Definition at line 1597 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User selected government button.
Definition at line 2423 of file dialogs.c.
Referenced by popup_government_dialog().
bool handmade_scenario_warning | ( | void | ) |
|
static |
User interacted with help dialog.
Definition at line 2850 of file dialogs.c.
Referenced by nation_button_callback().
|
static |
User requested hurry production.
Definition at line 1502 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User interacted with leader name edit widget.
Definition at line 2999 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User requested move of government dialog.
Definition at line 2437 of file dialogs.c.
Referenced by popup_government_dialog().
|
static |
User selected nation.
Definition at line 2877 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User interacted with nations dialog.
Definition at line 2588 of file dialogs.c.
Referenced by popup_races_dialog().
void nationset_changed | ( | void | ) |
Nationset selection update
Definition at line 3556 of file dialogs.c.
Referenced by option_gui_update(), and races_dialog::races_dialog().
|
static |
User requested next leader name.
Definition at line 2661 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User requested next nationset
Definition at line 2771 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User interacted with generic notify dialog.
Definition at line 478 of file dialogs.c.
Referenced by popup_notify_dialog().
|
static |
Destroy a notify goto data.
Definition at line 251 of file dialogs.c.
Referenced by notify_goto_dialog_new().
|
static |
Create a notify goto data.
Definition at line 235 of file dialogs.c.
Referenced by popup_notify_goto_dialog().
|
static |
Update a notify dialog.
Definition at line 419 of file dialogs.c.
Referenced by notify_goto_dialog_close_callback().
|
static |
Move the notify dialog.
Definition at line 260 of file dialogs.c.
Referenced by notify_goto_dialog_new().
|
static |
Close the notify dialog.
Definition at line 275 of file dialogs.c.
Referenced by notify_goto_dialog_new().
|
static |
Destroy a notify dialog.
Definition at line 354 of file dialogs.c.
Referenced by notify_goto_dialog_advance(), and popdown_notify_goto_dialog().
|
static |
|
static |
Create a notify dialog.
Definition at line 315 of file dialogs.c.
Referenced by popup_notify_goto_dialog().
|
static |
Update a notify dialog.
Definition at line 373 of file dialogs.c.
Referenced by notify_goto_dialog_advance(), and popup_notify_goto_dialog().
|
static |
User interacted with unit disband dialog "Disband" -button.
Definition at line 856 of file dialogs.c.
Referenced by popup_unit_disband_dlg().
|
static |
User interacted with unit upgrade dialog "Upgrade" -button.
Definition at line 647 of file dialogs.c.
Referenced by popup_unit_upgrade_dlg().
|
static |
Initiate paradrop to selected tile.
Definition at line 1645 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
Initiate patrol to selected tile.
Definition at line 1616 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
|
static |
User interacted with pillage dialog.
Definition at line 2222 of file dialogs.c.
Referenced by popup_pillage_dialog().
void popdown_advanced_terrain_dialog | ( | void | ) |
Popdown a generic dialog to display some generic information about terrain : tile, units , cities, etc.
Definition at line 1414 of file dialogs.c.
Referenced by adv_unit_select_all_callback(), adv_unit_select_callback(), adv_unit_sentry_idle_callback(), change_production_callback(), cma_callback(), exit_advanced_terrain_dlg_callback(), goto_here_callback(), hurry_production_callback(), paradrop_here_callback(), patrol_here_callback(), popdown_all_game_dialogs(), terrain_info_callback(), unit_help_callback(), and zoom_to_city_callback().
void popdown_all_game_dialogs | ( | void | ) |
|
extern |
Popdown a dialog asking a diplomatic unit if it wishes to bribe the given enemy unit.
Definition at line 1855 of file action_dialog.c.
Referenced by diplomat_bribe_yes_callback(), exit_bribe_dlg_callback(), and popdown_all_game_dialogs().
|
static |
Popdown a dialog asking the unit how they want to "connect" their location to the destination.
Definition at line 2390 of file dialogs.c.
Referenced by popdown_all_game_dialogs().
|
extern |
Popdown a dialog giving a diplomatic unit some options when moving into the target tile.
Definition at line 825 of file action_dialog.c.
Referenced by action_selection_close(), diplomat_bribe_callback(), diplomat_close_callback(), diplomat_incite_callback(), exit_spy_tgt_dlg_callback(), found_city_callback(), popdown_all_game_dialogs(), sabotage_impr_callback(), simple_action_callback(), spy_incite_callback(), spy_sabotage_esc_request(), spy_sabotage_request(), spy_steal_callback(), spy_steal_popup_shared(), spy_strike_bld_request(), and upgrade_callback().
|
static |
Close the government dialog.
Definition at line 2410 of file dialogs.c.
Referenced by government_dlg_callback().
|
extern |
Popdown a window asking a diplomatic unit if it wishes to incite the given enemy city.
Definition at line 1592 of file action_dialog.c.
Referenced by diplomat_incite_yes_callback(), exit_incite_dlg_callback(), and popdown_all_game_dialogs().
void popdown_notify_goto_dialog | ( | void | ) |
Popdown the notify goto dialog.
Definition at line 456 of file dialogs.c.
Referenced by popdown_all_game_dialogs().
|
static |
Popdown a dialog asking the unit which improvement they would like to pillage.
Definition at line 2268 of file dialogs.c.
Referenced by exit_pillage_dlg_callback(), pillage_callback(), and popdown_all_game_dialogs().
void popdown_races_dialog | ( | void | ) |
|
static |
Popdown terrain information dialog.
Definition at line 1277 of file dialogs.c.
Referenced by exit_terrain_info_dialog_callback(), and popdown_all_game_dialogs().
|
static |
Close unit disband dialog.
Definition at line 1012 of file dialogs.c.
Referenced by cancel_disband_unit_callback(), ok_disband_unit_window_callback(), and popdown_all_game_dialogs().
|
static |
Close unit upgrade dialog.
Definition at line 812 of file dialogs.c.
Referenced by cancel_upgrade_unit_callback(), ok_upgrade_unit_window_callback(), and popdown_all_game_dialogs().
void popup_advanced_terrain_dialog | ( | struct tile * | ptile, |
Uint16 | pos_x, | ||
Uint16 | pos_y | ||
) |
Popup a generic dialog to display some generic information about terrain : tile, units , cities, etc.
Definition at line 1694 of file dialogs.c.
Referenced by button_down_on_map(), and button_up_on_map().
void popup_connect_msg | ( | const char * | headline, |
const char * | message | ||
) |
void popup_government_dialog | ( | void | ) |
Popup a dialog asking the player what government to switch to.
Definition at line 2449 of file dialogs.c.
Referenced by revolution_callback().
void popup_musicset_suggestion_dialog | ( | void | ) |
void popup_notify_dialog | ( | const char * | caption, |
const char * | headline, | ||
const char * | lines | ||
) |
void popup_notify_goto_dialog | ( | const char * | headline, |
const char * | lines, | ||
const struct text_tag_list * | tags, | ||
struct tile * | ptile | ||
) |
void popup_pillage_dialog | ( | struct unit * | punit, |
bv_extras | extras | ||
) |
void popup_races_dialog | ( | struct player * | pplayer | ) |
void popup_soundset_suggestion_dialog | ( | void | ) |
|
static |
Popup terrain information dialog.
Definition at line 1323 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog(), and terrain_info_callback().
bool popup_theme_suggestion_dialog | ( | const char * | theme_name | ) |
void popup_tileset_suggestion_dialog | ( | void | ) |
Open unit disband dialog.
Definition at line 875 of file dialogs.c.
Referenced by disband_units_orders_city_dlg_callback(), and unit_order_callback().
Open unit upgrade dialog.
Definition at line 680 of file dialogs.c.
Referenced by popup_upgrade_dialog(), unit_order_callback(), upgrade_callback(), and upgrade_units_orders_city_dlg_callback().
void popup_upgrade_dialog | ( | struct unit_list * | punits | ) |
|
static |
User requested previous leader name.
Definition at line 2716 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User requested prev nationset
Definition at line 2791 of file dialogs.c.
Referenced by popup_races_dialog().
void put_window_near_map_tile | ( | struct widget * | pwindow, |
int | window_width, | ||
int | window_height, | ||
struct tile * | ptile | ||
) |
Place window near given tile on screen.
Definition at line 108 of file dialogs.c.
Referenced by popup_action_selection(), popup_bribe_dialog(), popup_hurry_production_dialog(), popup_incite_dialog(), popup_pillage_dialog(), popup_sabotage_dialog(), popup_terrain_info_dialog(), popup_unit_disband_dlg(), popup_unit_upgrade_dlg(), and unit_select_dialog_popup().
|
static |
User cancelled nations dialog.
Definition at line 2810 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User accepted nation.
Definition at line 2602 of file dialogs.c.
Referenced by popup_races_dialog().
void races_toggles_set_sensitive | ( | void | ) |
void races_update_pickable | ( | bool | nationset_change | ) |
void real_multipliers_dialog_update | ( | void * | unused | ) |
|
static |
Find my unit's (focus) chance of success at attacking/defending the given enemy unit. Return FALSE if the values cannot be determined (e.g., no units given).
Definition at line 191 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog(), and unit_select_dialog_popup().
const char * sdl_get_tile_defense_info_text | ( | struct tile * | ptile | ) |
Return a (static) string with terrain defense bonus. This does not include bonuses some units may get out of bases.
Definition at line 1303 of file dialogs.c.
Referenced by redraw_unit_info_label().
|
static |
Selects a leader and the appropriate sex. Updates the gui elements and the selected_* variables.
Definition at line 3046 of file dialogs.c.
Referenced by nation_button_callback(), popup_races_dialog(), and races_toggles_set_sensitive().
void show_tech_gained_dialog | ( | Tech_type_id | tech | ) |
void show_tileset_error | ( | bool | fatal, |
const char * | tset_name, | ||
const char * | msg | ||
) |
|
static |
User interacted with style widget.
Definition at line 2823 of file dialogs.c.
Referenced by popup_races_dialog().
|
static |
User requested terrain info.
Definition at line 1454 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
Popdown terrain information dialog.
Definition at line 1265 of file dialogs.c.
Referenced by popup_terrain_info_dialog().
|
static |
Show help about unit type.
Definition at line 1678 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
|
static |
User selected unit from unit select window.
Definition at line 1054 of file dialogs.c.
Referenced by unit_select_dialog_popup().
|
static |
void unit_select_dialog_popup | ( | struct tile * | ptile | ) |
void unit_select_dialog_update_real | ( | void * | unused | ) |
|
static |
User interacted with unit selection window.
Definition at line 1029 of file dialogs.c.
Referenced by unit_select_dialog_popup().
|
static |
User interacted with upgrade unit widget.
Definition at line 620 of file dialogs.c.
Referenced by popup_unit_upgrade_dlg().
|
static |
User requested zoom to city.
Definition at line 1471 of file dialogs.c.
Referenced by popup_advanced_terrain_dialog().
struct advanced_dialog* advanced_terrain_dlg = NULL |
Definition at line 1408 of file dialogs.c.
Referenced by advanced_terrain_window_dlg_callback(), popdown_advanced_terrain_dialog(), and popup_advanced_terrain_dialog().
|
static |
Definition at line 2384 of file dialogs.c.
Referenced by popdown_connect_dialog().
|
static |
Definition at line 2405 of file dialogs.c.
Referenced by move_government_dlg_callback(), popdown_government_dialog(), and popup_government_dialog().
|
static |
Definition at line 2556 of file dialogs.c.
Referenced by cancel_help_dlg_callback(), and nation_button_callback().
|
extern |
Definition at line 103 of file gui_main.c.
Referenced by exit_unit_select_callback(), popdown_advanced_terrain_dialog(), popdown_connect_dialog(), popdown_pillage_dialog(), popup_advanced_terrain_dialog(), popup_pillage_dialog(), unit_select_dialog_popdown(), and unit_select_dialog_popup().
|
static |
Definition at line 96 of file dialogs.c.
Referenced by aifill(), create_command_pregame(), leader_name_edit_callback(), next_name_callback(), popdown_races_dialog(), populate_leader_list(), prev_name_callback(), receive_packet_ruleset_nation_100(), and select_random_leader().
|
static |
Definition at line 2555 of file dialogs.c.
Referenced by change_nation_label(), change_sex_callback(), nation_button_callback(), nations_dialog_callback(), nationset_changed(), next_name_callback(), next_set_callback(), popdown_races_dialog(), popup_races_dialog(), prev_name_callback(), prev_set_callback(), races_dialog_ok_callback(), races_toggles_set_sensitive(), races_update_pickable(), select_random_leader(), and style_callback().
struct advanced_dialog* notify_dlg = NULL |
Definition at line 473 of file dialogs.c.
Referenced by exit_notify_dialog_callback(), notify_dialog_window_callback(), and popup_notify_dialog().
|
static |
|
static |
Definition at line 2217 of file dialogs.c.
Referenced by pillage_window_callback(), popdown_pillage_dialog(), and popup_pillage_dialog().
|
static |
Definition at line 1259 of file dialogs.c.
Referenced by popdown_terrain_info_dialog(), popup_terrain_info_dialog(), and terrain_info_window_dlg_callback().
|
static |
Definition at line 824 of file dialogs.c.
Referenced by disband_unit_window_callback(), popdown_unit_disband_dlg(), and popup_unit_disband_dlg().
|
static |
Definition at line 1024 of file dialogs.c.
Referenced by unit_select_dialog_popdown(), unit_select_dialog_popup(), and unit_select_window_callback().
|
static |
Definition at line 615 of file dialogs.c.
Referenced by popdown_unit_upgrade_dlg(), popup_unit_upgrade_dlg(), and upgrade_unit_window_callback().