Freeciv-3.2
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
dialogs.c File Reference
#include <SDL3/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 "sex.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
 

Functions

void popdown_diplomat_dialog (void)
 
void popdown_incite_dialog (void)
 
void popdown_bribe_dialog (void)
 
void popdown_advanced_terrain_dialog (void)
 
int advanced_terrain_window_dlg_callback (struct widget *pwindow)
 
int exit_advanced_terrain_dlg_callback (struct widget *pwidget)
 
static void unit_select_dialog_popdown (void)
 
static void popdown_terrain_info_dialog (void)
 
static void popdown_pillage_dialog (void)
 
static void popdown_connect_dialog (void)
 
static void popdown_unit_upgrade_dlg (void)
 
static void popdown_unit_disband_dlg (void)
 
void put_window_near_map_tile (struct widget *pwindow, int window_width, int window_height, struct tile *ptile)
 
void popdown_all_game_dialogs (void)
 
static bool sdl_get_chance_to_win (int *att_chance, int *def_chance, struct unit *enemy_unit, struct unit *my_unit)
 
static void notify_goto_dialog_advance (struct notify_goto_dialog *pdialog)
 
static struct notify_goto_datanotify_goto_data_new (const char *headline, const char *lines, struct tile *ptile)
 
static void notify_goto_data_destroy (struct notify_goto_data *pdata)
 
static int notify_goto_dialog_callback (struct widget *widget)
 
static int notify_goto_dialog_close_callback (struct widget *widget)
 
static int notify_goto_dialog_goto_callback (struct widget *widget)
 
static struct notify_goto_dialognotify_goto_dialog_new (void)
 
static void notify_goto_dialog_destroy (struct notify_goto_dialog *pdialog)
 
static void notify_goto_dialog_update (struct notify_goto_dialog *pdialog)
 
void popup_notify_goto_dialog (const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
 
void popdown_notify_goto_dialog (void)
 
void popup_connect_msg (const char *headline, const char *message)
 
static int notify_dialog_window_callback (struct widget *pwindow)
 
static int exit_notify_dialog_callback (struct widget *pwidget)
 
void popup_notify_dialog (const char *caption, const char *headline, const char *lines)
 
static int upgrade_unit_window_callback (struct widget *pwindow)
 
static int cancel_upgrade_unit_callback (struct widget *pwidget)
 
static int ok_upgrade_unit_window_callback (struct widget *pwidget)
 
void popup_upgrade_dialog (struct unit_list *punits)
 
void popup_unit_upgrade_dlg (struct unit *punit, bool city)
 
static int disband_unit_window_callback (struct widget *pwindow)
 
static int cancel_disband_unit_callback (struct widget *pwidget)
 
static int ok_disband_unit_window_callback (struct widget *pwidget)
 
void popup_unit_disband_dlg (struct unit *punit, bool city)
 
static int unit_select_window_callback (struct widget *pwindow)
 
static int exit_unit_select_callback (struct widget *pwidget)
 
static int unit_select_callback (struct widget *pwidget)
 
void unit_select_dialog_popup (struct tile *ptile)
 
void unit_select_dialog_update_real (void *unused)
 
static int terrain_info_window_dlg_callback (struct widget *pwindow)
 
static int exit_terrain_info_dialog_callback (struct widget *button)
 
const charsdl_get_tile_defense_info_text (struct tile *ptile)
 
static void popup_terrain_info_dialog (SDL_Surface *pdest, struct tile *ptile)
 
static int terrain_info_callback (struct widget *pwidget)
 
static int zoom_to_city_callback (struct widget *pwidget)
 
static int change_production_callback (struct widget *pwidget)
 
static int hurry_production_callback (struct widget *pwidget)
 
static int cma_callback (struct widget *pwidget)
 
static int adv_unit_select_callback (struct widget *pwidget)
 
static int adv_unit_select_all_callback (struct widget *pwidget)
 
static int adv_unit_sentry_idle_callback (struct widget *pwidget)
 
static int goto_here_callback (struct widget *pwidget)
 
static int patrol_here_callback (struct widget *pwidget)
 
static int paradrop_here_callback (struct widget *pwidget)
 
static int unit_help_callback (struct widget *pwidget)
 
void popup_advanced_terrain_dialog (struct tile *ptile, Uint16 pos_x, Uint16 pos_y)
 
static int pillage_window_callback (struct widget *pwindow)
 
static int pillage_callback (struct widget *pwidget)
 
static int exit_pillage_dlg_callback (struct widget *pwidget)
 
void popup_pillage_dialog (struct unit *punit, bv_extras extras)
 
static void popdown_government_dialog (void)
 
static int government_dlg_callback (struct widget *gov_button)
 
static int move_government_dlg_callback (struct widget *pwindow)
 
void popup_government_dialog (void)
 
static int next_set_callback (struct widget *next_button)
 
static int prev_set_callback (struct widget *prev_button)
 
static int nations_dialog_callback (struct widget *pwindow)
 
static int nation_button_callback (struct widget *pnation)
 
static int races_dialog_ok_callback (struct widget *start_button)
 
static int races_dialog_cancel_callback (struct widget *button)
 
static int next_name_callback (struct widget *next_button)
 
static int prev_name_callback (struct widget *prev_button)
 
static int change_sex_callback (struct widget *sex)
 
static void select_random_leader (Nation_type_id nation)
 
static void change_nation_label (void)
 
static int style_callback (struct widget *pwidget)
 
static int help_dlg_callback (struct widget *pwindow)
 
static int cancel_help_dlg_callback (struct widget *pwidget)
 
static int leader_name_edit_callback (struct widget *pedit)
 
static int get_playable_nation_count (void)
 
void popup_races_dialog (struct player *pplayer)
 
void popdown_races_dialog (void)
 
void races_update_pickable (bool nationset_change)
 
void nationset_changed (void)
 
void races_toggles_set_sensitive (void)
 
void popup_tileset_suggestion_dialog (void)
 
void popup_soundset_suggestion_dialog (void)
 
void popup_musicset_suggestion_dialog (void)
 
bool popup_theme_suggestion_dialog (const char *theme_name)
 
void show_tech_gained_dialog (Tech_type_id tech)
 
void show_tileset_error (bool fatal, const char *tset_name, const char *msg)
 
bool handmade_scenario_warning (void)
 
void real_multipliers_dialog_update (void *unused)
 
bool request_transport (struct unit *pcargo, struct tile *ptile)
 
void popup_combat_info (int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
 
void request_action_confirmation (const char *expl, struct act_confirmation_data *data)
 
static int image_popup_window_callback (struct widget *pwindow)
 
static int exit_image_popup_callback (struct widget *pwidget)
 
void popup_image (const char *tag)
 

Variables

struct playerraces_player
 
bool is_unit_move_blocked
 
static charleader_name = NULL
 
static struct notify_goto_dialognotify_goto_dialog = NULL
 
struct advanced_dialognotify_dlg = NULL
 
static struct small_dialogunit_upgrade_dlg = NULL
 
static struct small_dialogunit_disband_dlg = NULL
 
static struct advanced_dialogunit_select_dlg = NULL
 
static struct small_dialogterrain_info_dlg = NULL
 
struct advanced_dialogadvanced_terrain_dlg = NULL
 
static struct small_dialogpillage_dlg = NULL
 
static struct small_dialogconnect_dlg = NULL
 
static struct small_dialoggov_dlg = NULL
 
static struct advanced_dialognation_dlg = NULL
 
static struct small_dialoghelp_dlg = NULL
 
struct advanced_dialogadvanced_image_popup = NULL
 

Macro Definition Documentation

◆ ADV_NUM_SEEN

#define ADV_NUM_SEEN   15

◆ NUM_SEEN

#define NUM_SEEN   20

◆ SPECLIST_TAG

#define SPECLIST_TAG   notify_goto

Definition at line 216 of file dialogs.c.

◆ SPECLIST_TYPE

#define SPECLIST_TYPE   struct notify_goto_data

Definition at line 217 of file dialogs.c.

◆ TARGETS_COL

#define TARGETS_COL   1

◆ TARGETS_ROW

#define TARGETS_ROW   5

Function Documentation

◆ adv_unit_select_all_callback()

static int adv_unit_select_all_callback ( struct widget pwidget)
static

User selected all units from tile.

Definition at line 1551 of file dialogs.c.

◆ adv_unit_select_callback()

static int adv_unit_select_callback ( struct widget pwidget)
static

User selected unit.

Definition at line 1532 of file dialogs.c.

◆ adv_unit_sentry_idle_callback()

static int adv_unit_sentry_idle_callback ( struct widget pwidget)
static

Sentry unit widget contains.

Definition at line 1569 of file dialogs.c.

◆ advanced_terrain_window_dlg_callback()

int advanced_terrain_window_dlg_callback ( struct widget pwindow)

User selected "Advanced Menu"

Definition at line 1428 of file dialogs.c.

◆ cancel_disband_unit_callback()

static int cancel_disband_unit_callback ( struct widget pwidget)
static

User interacted with disband unit dialog cancel -button

Definition at line 840 of file dialogs.c.

◆ cancel_help_dlg_callback()

static int cancel_help_dlg_callback ( struct widget pwidget)
static

User requested closing of help dialog.

Definition at line 2860 of file dialogs.c.

◆ cancel_upgrade_unit_callback()

static int cancel_upgrade_unit_callback ( struct widget pwidget)
static

User interacted with upgrade unit dialog cancel -button

Definition at line 631 of file dialogs.c.

◆ change_nation_label()

static void change_nation_label ( void  )
static

Update nation label.

Definition at line 3021 of file dialogs.c.

◆ change_production_callback()

static int change_production_callback ( struct widget pwidget)
static

User requested production change.

Definition at line 1486 of file dialogs.c.

◆ change_sex_callback()

static int change_sex_callback ( struct widget sex)
static

User requested leader gender change.

Definition at line 2634 of file dialogs.c.

◆ cma_callback()

static int cma_callback ( struct widget pwidget)
static

User requested opening of cma settings.

Definition at line 1517 of file dialogs.c.

◆ disband_unit_window_callback()

static int disband_unit_window_callback ( struct widget pwindow)
static

User interacted with disband unit widget.

Definition at line 828 of file dialogs.c.

◆ exit_advanced_terrain_dlg_callback()

int exit_advanced_terrain_dlg_callback ( struct widget pwidget)

User requested closing of advanced terrain dialog.

Definition at line 1440 of file dialogs.c.

◆ exit_image_popup_callback()

static int exit_image_popup_callback ( struct widget pwidget)
static

User interacted with image popup dialog close button.

Definition at line 3735 of file dialogs.c.

◆ exit_notify_dialog_callback()

static int exit_notify_dialog_callback ( struct widget pwidget)
static

User interacted with notify dialog close button.

Definition at line 489 of file dialogs.c.

◆ exit_pillage_dlg_callback()

static int exit_pillage_dlg_callback ( struct widget pwidget)
static

User requested closing of pillage dialog.

Definition at line 2255 of file dialogs.c.

◆ exit_terrain_info_dialog_callback()

static int exit_terrain_info_dialog_callback ( struct widget button)
static

Popdown terrain information dialog.

Definition at line 1289 of file dialogs.c.

◆ exit_unit_select_callback()

static int exit_unit_select_callback ( struct widget pwidget)
static

User requested unit select window to be closed.

Definition at line 1040 of file dialogs.c.

◆ get_playable_nation_count()

static int get_playable_nation_count ( void  )
static

Count available playable nations.

Definition at line 3094 of file dialogs.c.

◆ goto_here_callback()

static int goto_here_callback ( struct widget pwidget)
static

Initiate goto to selected tile.

Definition at line 1596 of file dialogs.c.

◆ government_dlg_callback()

static int government_dlg_callback ( struct widget gov_button)
static

User selected government button.

Definition at line 2423 of file dialogs.c.

◆ handmade_scenario_warning()

bool handmade_scenario_warning ( void  )

Give a warning when user is about to edit scenario with manually set properties.

Definition at line 3676 of file dialogs.c.

◆ help_dlg_callback()

static int help_dlg_callback ( struct widget pwindow)
static

User interacted with help dialog.

Definition at line 2852 of file dialogs.c.

◆ hurry_production_callback()

static int hurry_production_callback ( struct widget pwidget)
static

User requested hurry production.

Definition at line 1501 of file dialogs.c.

◆ image_popup_window_callback()

static int image_popup_window_callback ( struct widget pwindow)
static

User interacted with image popup dialog.

Definition at line 3723 of file dialogs.c.

◆ leader_name_edit_callback()

static int leader_name_edit_callback ( struct widget pedit)
static

User interacted with leader name edit widget.

Definition at line 3001 of file dialogs.c.

◆ move_government_dlg_callback()

static int move_government_dlg_callback ( struct widget pwindow)
static

User requested move of government dialog.

Definition at line 2437 of file dialogs.c.

◆ nation_button_callback()

static int nation_button_callback ( struct widget nation_button)
static

User selected nation.

Definition at line 2879 of file dialogs.c.

◆ nations_dialog_callback()

static int nations_dialog_callback ( struct widget pwindow)
static

User interacted with nations dialog.

Definition at line 2588 of file dialogs.c.

◆ nationset_changed()

void nationset_changed ( void  )

Nationset selection update

Definition at line 3563 of file dialogs.c.

◆ next_name_callback()

static int next_name_callback ( struct widget next)
static

User requested next leader name.

Definition at line 2663 of file dialogs.c.

◆ next_set_callback()

static int next_set_callback ( struct widget next_button)
static

User requested next nationset

Definition at line 2773 of file dialogs.c.

◆ notify_dialog_window_callback()

static int notify_dialog_window_callback ( struct widget pwindow)
static

User interacted with generic notify dialog.

Definition at line 477 of file dialogs.c.

◆ notify_goto_data_destroy()

static void notify_goto_data_destroy ( struct notify_goto_data pdata)
static

Destroy a notify goto data.

Definition at line 250 of file dialogs.c.

◆ notify_goto_data_new()

static struct notify_goto_data * notify_goto_data_new ( const char headline,
const char lines,
struct tile ptile 
)
static

Create a notify goto data.

Definition at line 234 of file dialogs.c.

◆ notify_goto_dialog_advance()

static void notify_goto_dialog_advance ( struct notify_goto_dialog pdialog)
static

Update a notify dialog.

Definition at line 418 of file dialogs.c.

◆ notify_goto_dialog_callback()

static int notify_goto_dialog_callback ( struct widget widget)
static

Move the notify dialog.

Definition at line 259 of file dialogs.c.

◆ notify_goto_dialog_close_callback()

static int notify_goto_dialog_close_callback ( struct widget widget)
static

Close the notify dialog.

Definition at line 274 of file dialogs.c.

◆ notify_goto_dialog_destroy()

static void notify_goto_dialog_destroy ( struct notify_goto_dialog pdialog)
static

Destroy a notify dialog.

Definition at line 353 of file dialogs.c.

◆ notify_goto_dialog_goto_callback()

static int notify_goto_dialog_goto_callback ( struct widget widget)
static

Goto callback.

Definition at line 289 of file dialogs.c.

◆ notify_goto_dialog_new()

static struct notify_goto_dialog * notify_goto_dialog_new ( void  )
static

Create a notify dialog.

Definition at line 314 of file dialogs.c.

◆ notify_goto_dialog_update()

static void notify_goto_dialog_update ( struct notify_goto_dialog pdialog)
static

Update a notify dialog.

Definition at line 372 of file dialogs.c.

◆ ok_disband_unit_window_callback()

static int ok_disband_unit_window_callback ( struct widget pwidget)
static

User interacted with unit disband dialog "Disband" -button.

Definition at line 855 of file dialogs.c.

◆ ok_upgrade_unit_window_callback()

static int ok_upgrade_unit_window_callback ( struct widget pwidget)
static

User interacted with unit upgrade dialog "Upgrade" -button.

Definition at line 646 of file dialogs.c.

◆ paradrop_here_callback()

static int paradrop_here_callback ( struct widget pwidget)
static

Initiate paradrop to selected tile.

Definition at line 1644 of file dialogs.c.

◆ patrol_here_callback()

static int patrol_here_callback ( struct widget pwidget)
static

Initiate patrol to selected tile.

Definition at line 1615 of file dialogs.c.

◆ pillage_callback()

static int pillage_callback ( struct widget pwidget)
static

User selected what to pillage.

Definition at line 2234 of file dialogs.c.

◆ pillage_window_callback()

static int pillage_window_callback ( struct widget pwindow)
static

User interacted with pillage dialog.

Definition at line 2222 of file dialogs.c.

◆ popdown_advanced_terrain_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 1413 of file dialogs.c.

◆ popdown_all_game_dialogs()

void popdown_all_game_dialogs ( void  )

This function is called when the client disconnects or the game is over. It should close all dialog windows for that game.

Definition at line 145 of file dialogs.c.

◆ popdown_bribe_dialog()

void popdown_bribe_dialog ( void  )
extern

Popdown a dialog asking a diplomatic unit if it wishes to bribe the given enemy unit.

Definition at line 1856 of file action_dialog.c.

Referenced by diplomat_bribe_yes_callback(), and exit_bribe_dlg_callback().

◆ popdown_connect_dialog()

static void popdown_connect_dialog ( void  )
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.

◆ popdown_diplomat_dialog()

void popdown_diplomat_dialog ( void  )
extern

◆ popdown_government_dialog()

static void popdown_government_dialog ( void  )
static

Close the government dialog.

Definition at line 2410 of file dialogs.c.

◆ popdown_incite_dialog()

void popdown_incite_dialog ( void  )
extern

Popdown a window asking a diplomatic unit if it wishes to incite the given enemy city.

Definition at line 1593 of file action_dialog.c.

Referenced by diplomat_incite_yes_callback(), and exit_incite_dlg_callback().

◆ popdown_notify_goto_dialog()

void popdown_notify_goto_dialog ( void  )

Popdown the notify goto dialog.

Definition at line 455 of file dialogs.c.

◆ popdown_pillage_dialog()

static void popdown_pillage_dialog ( void  )
static

Popdown a dialog asking the unit which improvement they would like to pillage.

Definition at line 2268 of file dialogs.c.

◆ popdown_races_dialog()

void popdown_races_dialog ( void  )

Close the nation selection dialog. This should allow the user to (at least) select a unit to activate.

Definition at line 3532 of file dialogs.c.

◆ popdown_terrain_info_dialog()

static void popdown_terrain_info_dialog ( void  )
static

Popdown terrain information dialog.

Definition at line 1276 of file dialogs.c.

◆ popdown_unit_disband_dlg()

static void popdown_unit_disband_dlg ( void  )
static

Close unit disband dialog.

Definition at line 1011 of file dialogs.c.

◆ popdown_unit_upgrade_dlg()

static void popdown_unit_upgrade_dlg ( void  )
static

Close unit upgrade dialog.

Definition at line 811 of file dialogs.c.

◆ popup_advanced_terrain_dialog()

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 1693 of file dialogs.c.

◆ popup_combat_info()

void popup_combat_info ( int  attacker_unit_id,
int  defender_unit_id,
int  attacker_hp,
int  defender_hp,
bool  make_att_veteran,
bool  make_def_veteran 
)

Popup detailed information about battle or save information for some kind of statistics

Definition at line 3702 of file dialogs.c.

◆ popup_connect_msg()

void popup_connect_msg ( const char headline,
const char message 
)

Popup a dialog to display connection message from server.

Definition at line 466 of file dialogs.c.

◆ popup_government_dialog()

void popup_government_dialog ( void  )

Popup a dialog asking the player what government to switch to.

Definition at line 2449 of file dialogs.c.

◆ popup_image()

void popup_image ( const char tag)

Popup image window

Definition at line 3753 of file dialogs.c.

◆ popup_musicset_suggestion_dialog()

void popup_musicset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain musicset. Confirm from user and load.

Definition at line 3642 of file dialogs.c.

◆ popup_notify_dialog()

void popup_notify_dialog ( const char caption,
const char headline,
const char lines 
)

Popup a generic dialog to display some generic information.

Definition at line 507 of file dialogs.c.

◆ popup_notify_goto_dialog()

void popup_notify_goto_dialog ( const char headline,
const char lines,
const struct text_tag_list tags,
struct tile ptile 
)

Popup a dialog to display information about an event that has a specific location. The user should be given the option to goto that location.

Definition at line 437 of file dialogs.c.

◆ popup_pillage_dialog()

void popup_pillage_dialog ( struct unit punit,
bv_extras  extras 
)

Popup a dialog asking the unit which improvement they would like to pillage.

Definition at line 2283 of file dialogs.c.

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 3110 of file dialogs.c.

◆ popup_soundset_suggestion_dialog()

void popup_soundset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain soundset. Confirm from user and load.

Definition at line 3634 of file dialogs.c.

◆ popup_terrain_info_dialog()

static void popup_terrain_info_dialog ( SDL_Surface pdest,
struct tile ptile 
)
static

Popup terrain information dialog.

Definition at line 1322 of file dialogs.c.

◆ popup_theme_suggestion_dialog()

bool popup_theme_suggestion_dialog ( const char theme_name)

Tileset (modpack) has suggested loading certain theme. Confirm from user and load.

Definition at line 3650 of file dialogs.c.

◆ popup_tileset_suggestion_dialog()

void popup_tileset_suggestion_dialog ( void  )

Ruleset (modpack) has suggested loading certain tileset. Confirm from user and load.

Definition at line 3626 of file dialogs.c.

◆ popup_unit_disband_dlg()

void popup_unit_disband_dlg ( struct unit punit,
bool  city 
)

Open unit disband dialog.

Definition at line 874 of file dialogs.c.

◆ popup_unit_upgrade_dlg()

void popup_unit_upgrade_dlg ( struct unit punit,
bool  city 
)

Open unit upgrade dialog.

Definition at line 679 of file dialogs.c.

◆ popup_upgrade_dialog()

void popup_upgrade_dialog ( struct unit_list *  punits)

Popup dialog for upgrade units

Definition at line 665 of file dialogs.c.

◆ prev_name_callback()

static int prev_name_callback ( struct widget prev)
static

User requested previous leader name.

Definition at line 2718 of file dialogs.c.

◆ prev_set_callback()

static int prev_set_callback ( struct widget prev_button)
static

User requested prev nationset

Definition at line 2793 of file dialogs.c.

◆ put_window_near_map_tile()

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 105 of file dialogs.c.

◆ races_dialog_cancel_callback()

static int races_dialog_cancel_callback ( struct widget button)
static

User cancelled nations dialog.

Definition at line 2812 of file dialogs.c.

◆ races_dialog_ok_callback()

static int races_dialog_ok_callback ( struct widget start_button)
static

User accepted nation.

Definition at line 2602 of file dialogs.c.

◆ races_toggles_set_sensitive()

void races_toggles_set_sensitive ( void  )

In the nation selection dialog, make already-taken nations unavailable. This information is contained in the packet_nations_used packet.

Definition at line 3575 of file dialogs.c.

◆ races_update_pickable()

void races_update_pickable ( bool  nationset_change)

The server has changed the set of selectable nations.

Definition at line 3550 of file dialogs.c.

◆ real_multipliers_dialog_update()

void real_multipliers_dialog_update ( void unused)

Update multipliers (policies) dialog.

Definition at line 3685 of file dialogs.c.

◆ request_action_confirmation()

void request_action_confirmation ( const char expl,
struct act_confirmation_data data 
)

Common code wants confirmation for an action.

Definition at line 3711 of file dialogs.c.

◆ request_transport()

bool request_transport ( struct unit pcargo,
struct tile ptile 
)

Unit wants to get into some transport on given tile.

Definition at line 3693 of file dialogs.c.

◆ sdl_get_chance_to_win()

static bool sdl_get_chance_to_win ( int att_chance,
int def_chance,
struct unit enemy_unit,
struct unit my_unit 
)
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 188 of file dialogs.c.

◆ sdl_get_tile_defense_info_text()

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 1302 of file dialogs.c.

◆ select_random_leader()

static void select_random_leader ( Nation_type_id  nation)
static

Selects a leader and the appropriate sex. Updates the gui elements and the selected_* variables.

Definition at line 3048 of file dialogs.c.

◆ show_tech_gained_dialog()

void show_tech_gained_dialog ( Tech_type_id  tech)

Player has gained a new tech.

Definition at line 3659 of file dialogs.c.

◆ show_tileset_error()

void show_tileset_error ( bool  fatal,
const char tset_name,
const char msg 
)

Show tileset error dialog.

Definition at line 3667 of file dialogs.c.

◆ style_callback()

static int style_callback ( struct widget pwidget)
static

User interacted with style widget.

Definition at line 2825 of file dialogs.c.

◆ terrain_info_callback()

static int terrain_info_callback ( struct widget pwidget)
static

User requested terrain info.

Definition at line 1453 of file dialogs.c.

◆ terrain_info_window_dlg_callback()

static int terrain_info_window_dlg_callback ( struct widget pwindow)
static

Popdown terrain information dialog.

Definition at line 1264 of file dialogs.c.

◆ unit_help_callback()

static int unit_help_callback ( struct widget pwidget)
static

Show help about unit type.

Definition at line 1677 of file dialogs.c.

◆ unit_select_callback()

static int unit_select_callback ( struct widget pwidget)
static

User selected unit from unit select window.

Definition at line 1053 of file dialogs.c.

◆ unit_select_dialog_popdown()

static void unit_select_dialog_popdown ( void  )
static

Popdown a dialog window to select units on a particular tile.

Definition at line 1072 of file dialogs.c.

◆ unit_select_dialog_popup()

void unit_select_dialog_popup ( struct tile ptile)

Popup a dialog window to select units on a particular tile.

Definition at line 1088 of file dialogs.c.

◆ unit_select_dialog_update_real()

void unit_select_dialog_update_real ( void unused)

Update the dialog window to select units on a particular tile.

Definition at line 1250 of file dialogs.c.

◆ unit_select_window_callback()

static int unit_select_window_callback ( struct widget pwindow)
static

User interacted with unit selection window.

Definition at line 1028 of file dialogs.c.

◆ upgrade_unit_window_callback()

static int upgrade_unit_window_callback ( struct widget pwindow)
static

User interacted with upgrade unit widget.

Definition at line 619 of file dialogs.c.

◆ zoom_to_city_callback()

static int zoom_to_city_callback ( struct widget pwidget)
static

User requested zoom to city.

Definition at line 1470 of file dialogs.c.

Variable Documentation

◆ advanced_image_popup

struct advanced_dialog* advanced_image_popup = NULL

Definition at line 3718 of file dialogs.c.

◆ advanced_terrain_dlg

struct advanced_dialog* advanced_terrain_dlg = NULL

Definition at line 1407 of file dialogs.c.

◆ connect_dlg

struct small_dialog* connect_dlg = NULL
static

Definition at line 2384 of file dialogs.c.

◆ gov_dlg

struct small_dialog* gov_dlg = NULL
static

Definition at line 2405 of file dialogs.c.

◆ help_dlg

struct small_dialog* help_dlg = NULL
static

Definition at line 2556 of file dialogs.c.

◆ is_unit_move_blocked

bool is_unit_move_blocked
extern

Definition at line 107 of file gui_main.c.

◆ leader_name

char* leader_name = NULL
static

Definition at line 93 of file dialogs.c.

◆ nation_dlg

struct advanced_dialog* nation_dlg = NULL
static

Definition at line 2555 of file dialogs.c.

◆ notify_dlg

struct advanced_dialog* notify_dlg = NULL

Definition at line 472 of file dialogs.c.

◆ notify_goto_dialog

Definition at line 227 of file dialogs.c.

◆ pillage_dlg

struct small_dialog* pillage_dlg = NULL
static

Definition at line 2217 of file dialogs.c.

◆ races_player

struct player* races_player

Definition at line 82 of file dialogs.c.

◆ terrain_info_dlg

struct small_dialog* terrain_info_dlg = NULL
static

Definition at line 1258 of file dialogs.c.

◆ unit_disband_dlg

struct small_dialog* unit_disband_dlg = NULL
static

Definition at line 823 of file dialogs.c.

◆ unit_select_dlg

struct advanced_dialog* unit_select_dlg = NULL
static

Definition at line 1023 of file dialogs.c.

◆ unit_upgrade_dlg

struct small_dialog* unit_upgrade_dlg = NULL
static

Definition at line 614 of file dialogs.c.