Freeciv21
Develop your civilization from humble roots to a global empire
dialogs_g.h File Reference
#include "support.h"
#include "actions.h"
#include "fc_types.h"
#include "featured_text.h"
#include "nation.h"
#include "terrain.h"
#include "unitlist.h"
+ Include dependency graph for dialogs_g.h:
+ This graph shows which files directly or indirectly include this file:

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)
 Popup a dialog to display information about an event that has a specific location. More...
 
void popup_notify_dialog (const char *caption, const char *headline, const char *lines)
 Popup a generic dialog to display some generic information. More...
 
void popup_connect_msg (const char *headline, const char *message)
 Popup a dialog to display connection message from server. More...
 
void popup_races_dialog (struct player *pplayer)
 Popup the nation selection dialog. More...
 
void popdown_races_dialog (void)
 Close the nation selection dialog. More...
 
void unit_select_dialog_popup (struct tile *ptile)
 Popup a dialog window to select units on a particular tile. More...
 
void unit_select_dialog_update ()
 
void unit_select_dialog_update_real (void *unused)
 Update the dialog window to select units on a particular tile. More...
 
void races_toggles_set_sensitive (void)
 In the nation selection dialog, make already-taken nations unavailable. More...
 
void races_update_pickable (bool nationset_change)
 The server has changed the set of selectable nations. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void action_selection_close (void)
 Closes the action selection dialog. More...
 
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. More...
 
void action_selection_no_longer_in_progress_gui_specific (int actor_unit_id)
 Let the non shared client code know that the action selection process no longer is in progress for the specified unit. More...
 
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. More...
 
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. More...
 
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. More...
 
void popup_pillage_dialog (struct unit *punit, bv_extras extras)
 Popup a dialog asking the unit which improvement they would like to pillage. More...
 
void popup_tileset_suggestion_dialog (void)
 Ruleset (modpack) has suggested loading certain tileset. More...
 
void popup_soundset_suggestion_dialog (void)
 Ruleset (modpack) has suggested loading certain soundset. More...
 
void popup_musicset_suggestion_dialog (void)
 Ruleset (modpack) has suggested loading certain musicset. More...
 
bool popup_theme_suggestion_dialog (const char *theme_name)
 Tileset (modpack) has suggested loading certain theme. More...
 
void show_tech_gained_dialog (Tech_type_id tech)
 Player has gained a new tech. More...
 
void popdown_all_game_dialogs (void)
 This function is called when the client disconnects or the game is over. More...
 

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 3528 of file dialogs.cpp.

Referenced by action_selection_refresh(), can_ask_server_for_actions(), handle_city_info(), handle_player_diplstate(), handle_unit_actions(), handle_unit_remove(), and unit_focus_set().

◆ action_selection_close()

void action_selection_close ( void  )

Closes the action selection dialog.

Definition at line 3740 of file dialogs.cpp.

Referenced by handle_unit_remove(), and unit_focus_set().

◆ 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 1697 of file dialogs.cpp.

Referenced by action_selection_no_longer_in_progress().

◆ 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 3610 of file dialogs.cpp.

Referenced by handle_unit_actions(), and choice_dialog::update_dialog().

◆ 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 3545 of file dialogs.cpp.

Referenced by handle_city_info(), and handle_player_diplstate().

◆ 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 3579 of file dialogs.cpp.

Referenced by base(), clean_fallout(), clean_pollution(), handle_city_info(), handle_player_diplstate(), irrigate(), mine(), pillage(), road(), and choice_dialog::switch_target().

◆ 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 3562 of file dialogs.cpp.

Referenced by handle_player_diplstate().

◆ 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 3596 of file dialogs.cpp.

Referenced by handle_city_info(), and handle_player_diplstate().

◆ 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 3496 of file dialogs.cpp.

Referenced by client_state().

◆ 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 1011 of file dialogs.cpp.

Referenced by client_state(), close_socket_nomessage(), and handle_ruleset_control().

◆ 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 1708 of file dialogs.cpp.

Referenced by handle_unit_actions().

◆ 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 3068 of file dialogs.cpp.

Referenced by handle_unit_action_answer().

◆ 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 956 of file dialogs.cpp.

Referenced by handle_connect_msg().

◆ 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 3007 of file dialogs.cpp.

Referenced by handle_unit_action_answer().

◆ 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 3461 of file dialogs.cpp.

Referenced by handle_ruleset_control().

◆ 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 970 of file dialogs.cpp.

Referenced by handle_page_msg_part().

◆ 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 944 of file dialogs.cpp.

Referenced by handle_event().

◆ 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 3321 of file dialogs.cpp.

Referenced by request_unit_pillage().

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 997 of file dialogs.cpp.

Referenced by pregame_options::pick_nation(), and page_pregame::start_page_menu().

◆ 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 3263 of file dialogs.cpp.

Referenced by handle_city_sabotage_list().

◆ 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 3436 of file dialogs.cpp.

Referenced by handle_ruleset_control().

◆ 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 3486 of file dialogs.cpp.

◆ 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 3405 of file dialogs.cpp.

Referenced by handle_ruleset_control().

◆ 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 1061 of file dialogs.cpp.

Referenced by handle_player_info().

◆ races_update_pickable()

void races_update_pickable ( bool  nationset_change)

The server has changed the set of selectable nations.

Definition at line 1049 of file dialogs.cpp.

Referenced by handle_nation_availability().

◆ show_tech_gained_dialog()

void show_tech_gained_dialog ( Tech_type_id  tech)

Player has gained a new tech.

Definition at line 3754 of file dialogs.cpp.

Referenced by handle_research_info().

◆ 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 1022 of file dialogs.cpp.

Referenced by do_map_click().

◆ unit_select_dialog_update()

void unit_select_dialog_update ( )

Definition at line 465 of file update_queue.cpp.

Referenced by handle_unit_packet_common().

◆ 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 1034 of file dialogs.cpp.

Referenced by unit_select_dialog_update().