Freeciv-3.1
|
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "log.h"
#include "unit.h"
#include "unitlist.h"
#include "client_main.h"
#include "climisc.h"
#include "overview_common.h"
#include "update_queue.h"
#include "zoom.h"
#include "citydlg.h"
#include "cityrep.h"
#include "colors.h"
#include "dialogs.h"
#include "finddlg.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_mouse.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "menu.h"
#include "messagewin.h"
#include "optiondlg.h"
#include "pages.h"
#include "plrdlg.h"
#include "repodlgs.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "wldlg.h"
#include "mapctrl.h"
Go to the source code of this file.
Variables | |
int | overview_start_x |
int | overview_start_y |
bool | is_unit_move_blocked |
static char * | suggested_city_name = NULL |
static struct small_dialog * | new_city_dlg = NULL |
struct widget * | options_button |
static struct advanced_dialog * | minimap_dlg = NULL |
static struct advanced_dialog * | unit_info_dlg = NULL |
int | overview_w = 0 |
int | overview_h = 0 |
int | unitinfo_w = 0 |
int | unitinfo_h = 0 |
bool | draw_goto_patrol_lines = FALSE |
static struct widget * | new_turn_button = NULL |
static struct widget * | units_info_window = NULL |
static struct widget * | minimap_window = NULL |
static struct widget * | find_city_button = NULL |
static struct widget * | revolution_button = NULL |
static struct widget * | tax_button = NULL |
static struct widget * | research_button = NULL |
void button_down_on_map | ( | struct mouse_button_behavior * | button_behavior | ) |
Mouse click handler
Definition at line 2280 of file mapctrl.c.
Referenced by update_button_hold_state().
void button_up_on_map | ( | struct mouse_button_behavior * | button_behavior | ) |
Use released mouse button over map.
Definition at line 2351 of file mapctrl.c.
Referenced by main_mouse_button_up_handler().
|
static |
User interacted with cities button.
Definition at line 170 of file mapctrl.c.
Referenced by popup_minimap_window().
void close_game_page | ( | void | ) |
void create_line_at_mouse_pos | ( | void | ) |
void disable_main_widgets | ( | void | ) |
Disable game page widgets.
Definition at line 2102 of file mapctrl.c.
Referenced by popup_optiondlg().
|
static |
Make minimap window buttons disabled and redraw. TODO: Use disable_minimap_window_buttons() for disabling buttons.
Definition at line 2044 of file mapctrl.c.
Referenced by disable_main_widgets().
void disable_minimap_window_buttons | ( | void | ) |
Make minimap window buttons disabled.
Definition at line 1911 of file mapctrl.c.
Referenced by real_menus_update().
|
static |
Make unitinfo window buttons disabled and redraw. TODO: Use disable_unitinfo_window_buttons() for disabling buttons.
Definition at line 2089 of file mapctrl.c.
Referenced by disable_main_widgets().
void disable_unitinfo_window_buttons | ( | void | ) |
Make unitinfo buttons disabled.
Definition at line 1617 of file mapctrl.c.
Referenced by real_menus_update().
|
static |
User interacted with Economy button.
Definition at line 247 of file mapctrl.c.
Referenced by popup_unitinfo_window().
void enable_and_redraw_find_city_button | ( | void | ) |
Make Find City button available.
Definition at line 2235 of file mapctrl.c.
Referenced by city_report_dialog_popdown(), and popdown_find_dialog().
void enable_and_redraw_revolution_button | ( | void | ) |
Make Revolution button available.
Definition at line 2245 of file mapctrl.c.
Referenced by popdown_government_dialog().
void enable_main_widgets | ( | void | ) |
Enable game page widgets.
Definition at line 2180 of file mapctrl.c.
Referenced by popdown_optiondlg(), and real_set_client_page().
|
static |
Make minimap window buttons enabled and redraw.
Definition at line 2117 of file mapctrl.c.
Referenced by enable_main_widgets().
|
static |
Make unitinfo window buttons enabled and redraw.
Definition at line 2163 of file mapctrl.c.
Referenced by enable_main_widgets().
|
static |
User interacted with Turn Done button.
Definition at line 205 of file mapctrl.c.
Referenced by popup_minimap_window().
void finger_down_on_map | ( | struct finger_behavior * | finger_behavior | ) |
void finger_up_on_map | ( | struct finger_behavior * | finger_behavior | ) |
Finger up handler
Definition at line 2267 of file mapctrl.c.
Referenced by main_finger_up_handler().
struct widget * get_minimap_window_widget | ( | void | ) |
Get main minimap widget.
Definition at line 2203 of file mapctrl.c.
Referenced by disable_minimap_widgets(), disable_minimap_window_buttons(), hide_minimap_window_buttons(), redraw_minimap_window_buttons(), refresh_overview(), set_new_order_widget_start_pos(), and show_minimap_window_buttons().
struct widget * get_research_widget | ( | void | ) |
Get main research widget.
Definition at line 2219 of file mapctrl.c.
Referenced by science_report_dialog_popdown(), science_report_dialog_popup(), science_report_dialogs_popdown_all(), and set_indicator_icons().
struct widget * get_revolution_widget | ( | void | ) |
Get main revolution widget.
Definition at line 2227 of file mapctrl.c.
Referenced by set_indicator_icons().
struct widget * get_tax_rates_widget | ( | void | ) |
Get main tax rates widget.
Definition at line 2211 of file mapctrl.c.
Referenced by economy_report_dialog_popdown(), economy_report_dialog_popup(), exit_economy_dialog_callback(), and set_indicator_icons().
struct widget * get_unit_info_window_widget | ( | void | ) |
Get main unitinfo widget.
Definition at line 2195 of file mapctrl.c.
Referenced by disable_unitinfo_window_buttons(), hide_unitinfo_window_buttons(), redraw_unit_info_label(), set_new_order_widget_start_pos(), and show_unitinfo_window_buttons().
void hide_minimap_window_buttons | ( | void | ) |
Make minimap window buttons hidden.
Definition at line 1836 of file mapctrl.c.
Referenced by real_menus_update().
void hide_unitinfo_window_buttons | ( | void | ) |
Make unitinfo buttons hidden.
Definition at line 1593 of file mapctrl.c.
Referenced by real_menus_update().
bool map_event_handler | ( | SDL_Keysym | key | ) |
Toggle map drawing stuff.
Definition at line 2445 of file mapctrl.c.
Referenced by main_key_down_handler().
|
static |
User interacted with minimap window.
Definition at line 1262 of file mapctrl.c.
Referenced by popup_minimap_window().
|
static |
User interacted with the new city dialog.
Definition at line 2747 of file mapctrl.c.
Referenced by popup_newcity_dialog().
|
static |
User interacted with the Cancel button of the new city dialog.
Definition at line 2726 of file mapctrl.c.
Referenced by popup_newcity_dialog().
|
static |
User interacted with the edit button of the new city dialog.
Definition at line 2686 of file mapctrl.c.
Referenced by popup_newcity_dialog().
|
static |
User interacted with the Ok button of the new city dialog.
Definition at line 2704 of file mapctrl.c.
Referenced by popup_newcity_dialog().
|
static |
User interacted with nations button.
Definition at line 123 of file mapctrl.c.
Referenced by popup_minimap_window().
void popdown_minimap_window | ( | void | ) |
Close minimap window.
Definition at line 1945 of file mapctrl.c.
Referenced by close_game_page(), and resize_minimap().
void popdown_newcity_dialog | ( | void | ) |
Close new city dialog.
Definition at line 2897 of file mapctrl.c.
Referenced by popdown_all_game_dialogs().
void popdown_unitinfo_window | ( | void | ) |
void popup_minimap_window | ( | void | ) |
Open minimap area.
Definition at line 1650 of file mapctrl.c.
Referenced by resize_minimap(), and show_game_page().
void popup_newcity_dialog | ( | struct unit * | punit, |
const char * | suggest_name | ||
) |
void popup_unitinfo_window | ( | void | ) |
void redraw_minimap_window_buttons | ( | void | ) |
Redraw minimap window buttons.
Definition at line 1874 of file mapctrl.c.
Referenced by toggle_map_window_callback().
|
static |
User interacted with Research button.
Definition at line 235 of file mapctrl.c.
Referenced by popup_unitinfo_window().
int resize_minimap | ( | void | ) |
Update the size of the minimap
Definition at line 554 of file mapctrl.c.
Referenced by overview_size_changed().
|
static |
User interacted with Revolution button.
Definition at line 220 of file mapctrl.c.
Referenced by popup_unitinfo_window().
void set_new_minimap_window_pos | ( | void | ) |
This Function is used when resize main_data.screen. We must set new MiniMap start position.
Definition at line 1386 of file mapctrl.c.
Referenced by popup_minimap_window(), real_resize_window_callback(), and toggle_map_window_callback().
void set_new_unitinfo_window_pos | ( | void | ) |
This Function is used when resize main_data.screen. We must set new Units Info Win. start position.
Definition at line 1332 of file mapctrl.c.
Referenced by popup_unitinfo_window(), real_resize_window_callback(), and toggle_unit_info_window_callback().
void set_turn_done_button_state | ( | bool | state | ) |
void show_game_page | ( | void | ) |
Create and show game page.
Definition at line 1958 of file mapctrl.c.
Referenced by real_set_client_page().
void show_minimap_window_buttons | ( | void | ) |
Make minimap window buttons visible.
Definition at line 1798 of file mapctrl.c.
Referenced by real_menus_update().
void show_unitinfo_window_buttons | ( | void | ) |
Make unitinfo buttons visible.
Definition at line 1569 of file mapctrl.c.
Referenced by real_menus_update().
|
static |
|
static |
User interacted with messages toggling button.
Definition at line 529 of file mapctrl.c.
Referenced by popup_minimap_window().
|
static |
Show/Hide Units Info Window
Definition at line 261 of file mapctrl.c.
Referenced by popup_unitinfo_window().
|
static |
User interacted with unitinfo window.
Definition at line 1298 of file mapctrl.c.
Referenced by popup_unitinfo_window().
|
static |
User interacted with units button.
Definition at line 155 of file mapctrl.c.
Referenced by popup_minimap_window().
void update_rect_at_mouse_pos | ( | void | ) |
The Area Selection rectangle. Called by center_tile_mapcanvas() and when the mouse pointer moves.
Definition at line 104 of file mapctrl.c.
Referenced by button_down_on_map(), button_up_on_map(), create_line_at_mouse_pos(), main_mouse_motion_handler(), map_event_handler(), and remove_net_input().
|
static |
Definition at line 108 of file mapctrl.c.
Referenced by enable_and_redraw_find_city_button(), and popup_minimap_window().
|
extern |
Definition at line 103 of file gui_main.c.
Referenced by map_event_handler(), and ui_main().
|
static |
Definition at line 96 of file mapctrl.c.
Referenced by popdown_minimap_window(), and popup_minimap_window().
|
static |
Definition at line 107 of file mapctrl.c.
Referenced by enable_minimap_widgets(), get_minimap_window_widget(), minimap_window_callback(), popup_minimap_window(), set_new_minimap_window_pos(), toggle_map_window_callback(), and toggle_unit_info_window_callback().
|
static |
Definition at line 81 of file mapctrl.c.
Referenced by move_new_city_dlg_callback(), newcity_cancel_callback(), newcity_name_edit_callback(), newcity_ok_callback(), popdown_newcity_dialog(), and popup_newcity_dialog().
|
static |
Definition at line 105 of file mapctrl.c.
Referenced by popup_minimap_window(), and set_turn_done_button_state().
|
extern |
Definition at line 103 of file optiondlg.c.
Referenced by close_game_page(), and popup_minimap_window().
int overview_h = 0 |
Definition at line 100 of file mapctrl.c.
Referenced by minimap_window_callback(), popup_minimap_window(), and resize_minimap().
|
extern |
Definition at line 73 of file mapview.c.
Referenced by minimap_window_callback(), refresh_overview(), and resize_minimap().
|
extern |
Definition at line 74 of file mapview.c.
Referenced by minimap_window_callback(), refresh_overview(), and resize_minimap().
int overview_w = 0 |
Definition at line 99 of file mapctrl.c.
Referenced by minimap_window_callback(), popup_minimap_window(), resize_minimap(), and toggle_map_window_callback().
|
static |
Definition at line 111 of file mapctrl.c.
Referenced by get_research_widget(), and popup_unitinfo_window().
|
static |
Definition at line 109 of file mapctrl.c.
Referenced by enable_and_redraw_revolution_button(), get_revolution_widget(), and popup_unitinfo_window().
|
static |
Definition at line 80 of file mapctrl.c.
Referenced by newcity_cancel_callback(), newcity_name_edit_callback(), newcity_ok_callback(), and popup_newcity_dialog().
|
static |
Definition at line 110 of file mapctrl.c.
Referenced by get_tax_rates_widget(), popup_unitinfo_window(), and set_new_unitinfo_window_pos().
|
static |
Definition at line 97 of file mapctrl.c.
Referenced by popdown_unitinfo_window(), and popup_unitinfo_window().
int unitinfo_h = 0 |
Definition at line 102 of file mapctrl.c.
Referenced by popup_unitinfo_window().
int unitinfo_w = 0 |
Definition at line 101 of file mapctrl.c.
Referenced by popup_unitinfo_window().
|
static |
Definition at line 106 of file mapctrl.c.
Referenced by disable_unitinfo_widgets(), enable_unitinfo_widgets(), get_unit_info_window_widget(), popup_unitinfo_window(), set_new_unitinfo_window_pos(), toggle_map_window_callback(), and toggle_unit_info_window_callback().