Freeciv-3.1
|
#include "astring.h"
#include "fcintl.h"
#include "log.h"
#include "actions.h"
#include "game.h"
#include "movement.h"
#include "research.h"
#include "traderoutes.h"
#include "unitlist.h"
#include "client_main.h"
#include "climisc.h"
#include "control.h"
#include "text.h"
#include "citydlg.h"
#include "colors.h"
#include "dialogs.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "repodlgs.h"
#include "themespec.h"
#include "widget.h"
#include "dialogs_g.h"
Go to the source code of this file.
Data Structures | |
struct | diplomat_dialog |
struct | small_diplomat_dialog |
Typedefs | |
typedef int(* | act_func) (struct widget *) |
Variables | |
bool | is_unit_move_blocked |
static struct diplomat_dialog * | diplomat_dlg = NULL |
static bool | is_more_user_input_needed = FALSE |
static bool | did_not_decide = FALSE |
static const act_func | af_map [ACTION_COUNT] |
static struct small_diplomat_dialog * | incite_dlg = NULL |
static struct small_diplomat_dialog * | bribe_dlg = NULL |
typedef int(* act_func) (struct widget *) |
Definition at line 51 of file action_dialog.c.
|
static |
The action selection is done.
Definition at line 82 of file action_dialog.c.
Referenced by act_sel_done_secondary(), and popdown_diplomat_dialog().
|
static |
A follow up question about the selected action is done.
Definition at line 121 of file action_dialog.c.
Referenced by exit_spy_tgt_dlg_callback(), popdown_bribe_dialog(), popdown_incite_dialog(), popup_bribe_dialog(), popup_incite_dialog(), popup_sabotage_dialog(), sabotage_impr_callback(), spy_steal_callback(), and spy_steal_popup_shared().
|
static |
Delay selection of what action to take.
Definition at line 634 of file action_dialog.c.
|
static |
Add an entry for an action in the action choice dialog.
Definition at line 870 of file action_dialog.c.
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 1157 of file action_dialog.c.
void action_selection_close | ( | void | ) |
Closes the action selection dialog
Definition at line 1246 of file action_dialog.c.
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 134 of file action_dialog.c.
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 1229 of file action_dialog.c.
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 1172 of file action_dialog.c.
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 1217 of file action_dialog.c.
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 1202 of file action_dialog.c.
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 1187 of file action_dialog.c.
|
static |
User interacted with bribe dialog window.
Definition at line 1813 of file action_dialog.c.
Referenced by popup_bribe_dialog().
|
static |
Ask the server how much the bribe costs
Definition at line 649 of file action_dialog.c.
|
static |
User confirmed bribe.
Definition at line 1825 of file action_dialog.c.
Referenced by popup_bribe_dialog().
|
static |
Close diplomat dialog.
Definition at line 812 of file action_dialog.c.
Referenced by popup_action_selection().
|
static |
User interacted with diplomat dialog.
Definition at line 187 of file action_dialog.c.
Referenced by popup_action_selection(), and popup_sabotage_dialog().
|
static |
Ask the server how much the revolt is going to cost us
Definition at line 590 of file action_dialog.c.
|
static |
User confirmed incite
Definition at line 1561 of file action_dialog.c.
Referenced by popup_incite_dialog().
|
static |
Close bribe dialog.
Definition at line 1842 of file action_dialog.c.
Referenced by popup_bribe_dialog().
|
static |
Close incite dialog.
Definition at line 1579 of file action_dialog.c.
Referenced by popup_incite_dialog().
|
static |
Exit spy's steal or sabotage dialog.
Definition at line 277 of file action_dialog.c.
Referenced by popup_sabotage_dialog(), and spy_steal_popup_shared().
|
static |
User clicked "Found City"
Definition at line 671 of file action_dialog.c.
Get the non targeted version of an action so it, if enabled, can appear in the target selection dialog.
Definition at line 144 of file action_dialog.c.
Get the production targeted version of an action so it, if enabled, can appear in the target selection dialog.
Definition at line 167 of file action_dialog.c.
|
static |
User interacted with Incite Revolt dialog window.
Definition at line 1549 of file action_dialog.c.
Referenced by popup_incite_dialog().
void popdown_bribe_dialog | ( | void | ) |
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().
void popdown_diplomat_dialog | ( | void | ) |
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().
void popdown_incite_dialog | ( | void | ) |
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 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 939 of file action_dialog.c.
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 1873 of file action_dialog.c.
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 1610 of file action_dialog.c.
void popup_sabotage_dialog | ( | struct unit * | actor, |
struct city * | pcity, | ||
const struct action * | paction | ||
) |
Pops-up the Spy sabotage dialog, upon return of list of available improvements requested by the above function.
Definition at line 1304 of file action_dialog.c.
|
static |
User selected what to sabotage.
Definition at line 1259 of file action_dialog.c.
Referenced by popup_sabotage_dialog().
|
static |
User selected an action from the choice dialog and the action has no special needs.
Definition at line 707 of file action_dialog.c.
|
static |
Ask the server how much the revolt is going to cost us
Definition at line 612 of file action_dialog.c.
|
static |
Requests up-to-date list of improvements, the return of which will trigger the popup_sabotage_dialog() function. (Escape version)
Definition at line 243 of file action_dialog.c.
|
static |
Requests up-to-date list of improvements, the return of which will trigger the popup_sabotage_dialog() function.
Definition at line 221 of file action_dialog.c.
|
static |
User selected which tech spy steals.
Definition at line 293 of file action_dialog.c.
Referenced by spy_steal_popup_shared().
|
static |
User interacted with spy's steal dialog window.
Definition at line 265 of file action_dialog.c.
Referenced by spy_steal_popup_shared().
|
static |
Popup spy tech stealing dialog for "Targeted Steal Tech Escape Expected".
Definition at line 581 of file action_dialog.c.
|
static |
Popup spy tech stealing dialog for "Targeted Steal Tech".
Definition at line 572 of file action_dialog.c.
|
static |
Popup spy tech stealing dialog.
Definition at line 329 of file action_dialog.c.
|
static |
Requests up-to-date list of improvements, the return of which will trigger the popup_sabotage_dialog() function.
Definition at line 200 of file action_dialog.c.
|
static |
User clicked "Upgrade Unit"
Definition at line 687 of file action_dialog.c.
|
static |
Definition at line 842 of file action_dialog.c.
|
static |
Definition at line 1808 of file action_dialog.c.
Referenced by bribe_dlg_window_callback(), diplomat_bribe_yes_callback(), popdown_bribe_dialog(), and popup_bribe_dialog().
Definition at line 77 of file action_dialog.c.
|
static |
Definition at line 75 of file action_dialog.c.
Referenced by action_selection_actor_unit(), action_selection_target_city(), action_selection_target_extra(), action_selection_target_tile(), action_selection_target_unit(), diplomat_bribe_callback(), diplomat_dlg_window_callback(), diplomat_incite_callback(), exit_spy_tgt_dlg_callback(), found_city_callback(), popdown_diplomat_dialog(), popup_action_selection(), popup_sabotage_dialog(), simple_action_callback(), spy_incite_callback(), spy_sabotage_esc_request(), spy_sabotage_request(), spy_steal_callback(), spy_steal_dlg_window_callback(), spy_steal_esc_popup(), spy_steal_popup(), spy_steal_popup_shared(), spy_strike_bld_request(), and upgrade_callback().
|
static |
Definition at line 1544 of file action_dialog.c.
Referenced by diplomat_incite_yes_callback(), incite_dlg_window_callback(), popdown_incite_dialog(), and popup_incite_dialog().
Definition at line 76 of file action_dialog.c.
|
extern |
Definition at line 103 of file gui_main.c.
Referenced by popdown_bribe_dialog(), popdown_diplomat_dialog(), popdown_incite_dialog(), popup_action_selection(), popup_bribe_dialog(), popup_incite_dialog(), and popup_sabotage_dialog().