Freeciv-3.1
Loading...
Searching...
No Matches
Functions
dialogs.c File Reference
#include "game.h"
#include "government.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)
 

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

◆ action_selection_close()

void action_selection_close ( void  )

Closes the action selection dialog

Definition at line 304 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 315 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 291 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 246 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 282 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 270 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 258 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 340 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 358 of file dialogs.c.

Referenced by setup_gui_funcs().

◆ 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 349 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 224 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 68 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 118 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 142 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 42 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 178 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 132 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 205 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 50 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 32 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 170 of file dialogs.c.

◆ popup_races_dialog()

void popup_races_dialog ( struct player pplayer)

Popup the nation selection dialog.

Definition at line 59 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 109 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 152 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 196 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 214 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 187 of file dialogs.c.

◆ popup_upgrade_dialog()

void popup_upgrade_dialog ( struct unit_list *  punits)

Popup dialog for upgrade units

Definition at line 161 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 101 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 92 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 323 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 331 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 76 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 84 of file dialogs.c.