Freeciv-3.2
Loading...
Searching...
No Matches
Functions
dialogs.c File Reference
#include "game.h"
#include "government.h"
#include "control.h"
#include "gui_stub.h"
#include "dialogs.h"

Go to the source code of this file.

Functions

void popup_notify_goto_dialog (const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
 
void popup_connect_msg (const char *headline, const char *message)
 
void popup_notify_dialog (const char *caption, const char *headline, const char *lines)
 
void popup_races_dialog (struct player *pplayer)
 
void popdown_races_dialog (void)
 
void unit_select_dialog_popup (struct tile *ptile)
 
void unit_select_dialog_update_real (void *unused)
 
void races_update_pickable (bool nationset_change)
 
void races_toggles_set_sensitive (void)
 
void popup_revolution_dialog (void)
 
void popup_action_selection (struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
 
void popup_incite_dialog (struct unit *actor, struct city *pcity, int cost, const struct action *paction)
 
void popup_bribe_dialog (struct unit *actor, struct unit *punit, int cost, const struct action *paction)
 
void popup_sabotage_dialog (struct unit *actor, struct city *pcity, const struct action *paction)
 
void popup_upgrade_dialog (struct unit_list *punits)
 
void popup_pillage_dialog (struct unit *punit, bv_extras may_pillage)
 
void popup_disband_dialog (struct unit_list *punits)
 
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 popdown_all_game_dialogs (void)
 
int action_selection_actor_unit (void)
 
int action_selection_target_city (void)
 
int action_selection_target_unit (void)
 
int action_selection_target_tile (void)
 
int action_selection_target_extra (void)
 
void action_selection_refresh (struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
 
void action_selection_close (void)
 
void action_selection_no_longer_in_progress_gui_specific (int actor_id)
 
void show_tech_gained_dialog (Tech_type_id tech)
 
void show_tileset_error (bool fatal, const char *tset_name, const char *msg)
 
bool gui_handmade_scenario_warning (void)
 
bool gui_request_transport (struct unit *pcargo, struct tile *ptile)
 
void gui_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 gui_request_action_confirmation (const char *expl, struct act_confirmation_data *data)
 
void gui_popup_image (const char *tag)
 

Function Documentation

◆ action_selection_actor_unit()

int action_selection_actor_unit ( void  )

Returns the id of the actor unit currently handled in action selection dialog when the action selection dialog is open. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open.

Definition at line 237 of file dialogs.c.

◆ action_selection_close()

void action_selection_close ( void  )

Closes the action selection dialog

Definition at line 307 of file dialogs.c.

◆ action_selection_no_longer_in_progress_gui_specific()

void action_selection_no_longer_in_progress_gui_specific ( int  actor_id)

Let the non shared client code know that the action selection process no longer is in progress for the specified unit.

This allows the client to clean up any client specific assumptions.

Definition at line 318 of file dialogs.c.

◆ action_selection_refresh()

void action_selection_refresh ( struct unit actor_unit,
struct city target_city,
struct unit target_unit,
struct tile target_tile,
struct extra_type target_extra,
const struct act_prob act_probs 
)

Updates the action selection dialog with new information.

Definition at line 294 of file dialogs.c.

◆ action_selection_target_city()

int action_selection_target_city ( void  )

Returns id of the target city of the actions currently handled in action selection dialog when the action selection dialog is open and it has a city target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open or no city target is present in the action selection dialog.

Definition at line 249 of file dialogs.c.

◆ action_selection_target_extra()

int action_selection_target_extra ( void  )

Returns id of the target extra of the actions currently handled in action selection dialog when the action selection dialog is open and it has an extra target. Returns EXTRA_NONE if no action selection dialog is open or no extra target is present in the action selection dialog.

Definition at line 285 of file dialogs.c.

◆ action_selection_target_tile()

int action_selection_target_tile ( void  )

Returns id of the target tile of the actions currently handled in action selection dialog when the action selection dialog is open and it has a tile target. Returns TILE_INDEX_NONE if no action selection dialog is open.

Definition at line 273 of file dialogs.c.

◆ action_selection_target_unit()

int action_selection_target_unit ( void  )

Returns id of the target unit of the actions currently handled in action selection dialog when the action selection dialog is open and it has a unit target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open or no unit target is present in the action selection dialog.

Definition at line 261 of file dialogs.c.

◆ gui_handmade_scenario_warning()

bool gui_handmade_scenario_warning ( void  )

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

Definition at line 343 of file dialogs.c.

Referenced by setup_gui_funcs().

◆ gui_popup_combat_info()

void gui_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 361 of file dialogs.c.

Referenced by setup_gui_funcs().

◆ gui_popup_image()

void gui_popup_image ( const char tag)

Popup image window

Definition at line 380 of file dialogs.c.

Referenced by setup_gui_funcs().

◆ gui_request_action_confirmation()

void gui_request_action_confirmation ( const char expl,
struct act_confirmation_data data 
)

Common code wants confirmation for an action.

Definition at line 370 of file dialogs.c.

◆ gui_request_transport()

bool gui_request_transport ( struct unit pcargo,
struct tile ptile 
)

Unit wants to get into some transport on given tile.

Definition at line 352 of file dialogs.c.

Referenced by setup_gui_funcs().

◆ 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 227 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 71 of file dialogs.c.

◆ popup_action_selection()

void popup_action_selection ( struct unit actor_unit,
struct city target_city,
struct unit target_unit,
struct tile target_tile,
struct extra_type target_extra,
const struct act_prob act_probs 
)

Popup a dialog that allows the player to select what action a unit should take.

Definition at line 121 of file dialogs.c.

◆ popup_bribe_dialog()

void popup_bribe_dialog ( struct unit actor,
struct unit punit,
int  cost,
const struct action paction 
)

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

Definition at line 145 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 45 of file dialogs.c.

◆ popup_disband_dialog()

void popup_disband_dialog ( struct unit_list *  punits)

Pops up a dialog to confirm disband of the unit(s).

Definition at line 181 of file dialogs.c.

◆ popup_incite_dialog()

void popup_incite_dialog ( struct unit actor,
struct city pcity,
int  cost,
const struct action paction 
)

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

Definition at line 135 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 208 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 53 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 35 of file dialogs.c.

◆ popup_pillage_dialog()

void popup_pillage_dialog ( struct unit punit,
bv_extras  may_pillage 
)

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

Definition at line 173 of file dialogs.c.

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 62 of file dialogs.c.

◆ popup_revolution_dialog()

void popup_revolution_dialog ( void  )

Popup a dialog asking if the player wants to start a revolution.

Definition at line 112 of file dialogs.c.

Referenced by gov_menu::change_gov(), government_callback(), government_callback(), gov_menu::revolution(), and revolution_callback().

◆ popup_sabotage_dialog()

void popup_sabotage_dialog ( struct unit actor,
struct city pcity,
const struct action paction 
)

Popup a dialog asking a diplomatic unit if it wishes to sabotage the given enemy city.

Definition at line 155 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 199 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 217 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 190 of file dialogs.c.

◆ popup_upgrade_dialog()

void popup_upgrade_dialog ( struct unit_list *  punits)

Popup dialog for upgrade units

Definition at line 164 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 104 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 95 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 326 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 334 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 79 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 87 of file dialogs.c.