#include "fcintl.h"
#include "support.h"
#include "calendar.h"
#include "game.h"
#include "gui_stub.h"
#include "client_main.h"
#include "climisc.h"
#include "control.h"
#include "mapctrl_common.h"
#include "mapview.h"
Go to the source code of this file.
|
void | update_info_label (void) |
|
void | update_unit_info_label (struct unit_list *punitlist) |
|
void | update_mouse_cursor (enum cursor_type new_cursor_type) |
|
void | gui_update_timeout_label (void) |
|
void | update_turn_done_button (bool do_restore) |
|
void | set_indicator_icons (struct sprite *bulb, struct sprite *sol, struct sprite *flake, struct sprite *gov) |
|
struct canvas * | get_overview_window (void) |
|
void | dirty_rect (int canvas_x, int canvas_y, int pixel_width, int pixel_height) |
|
void | dirty_all (void) |
|
void | flush_dirty (void) |
|
void | gui_flush (void) |
|
void | update_map_canvas_scrollbars (void) |
|
void | update_map_canvas_scrollbars_size (void) |
|
void | update_city_descriptions (void) |
|
void | put_cross_overlay_tile (struct tile *ptile) |
|
void | draw_selection_rectangle (int canvas_x, int canvas_y, int w, int h) |
|
void | gui_map_canvas_size_refresh (void) |
|
void | tileset_changed (void) |
|
void | get_overview_area_dimensions (int *width, int *height) |
|
void | overview_size_changed (void) |
|
void | update_overview_scroll_window_pos (int x, int y) |
|
void | gui_start_turn (void) |
|
◆ dirty_all()
Mark the entire screen area as "dirty" so that we can flush it later.
Definition at line 154 of file mapview.c.
◆ dirty_rect()
void dirty_rect |
( |
int |
canvas_x, |
|
|
int |
canvas_y, |
|
|
int |
pixel_width, |
|
|
int |
pixel_height |
|
) |
| |
Mark the rectangular region as "dirty" so that we know to flush it later.
Definition at line 145 of file mapview.c.
◆ draw_selection_rectangle()
◆ flush_dirty()
Flush all regions that have been previously marked as dirty. See dirty_rect() and dirty_all(). This function is generally called after we've processed a batch of drawing operations.
Definition at line 164 of file mapview.c.
◆ get_overview_area_dimensions()
void get_overview_area_dimensions |
( |
int * |
width, |
|
|
int * |
height |
|
) |
| |
Return the dimensions of the area (container widget; maximum size) for the overview.
Definition at line 244 of file mapview.c.
◆ get_overview_window()
Return a canvas that is the overview window.
Definition at line 135 of file mapview.c.
◆ gui_flush()
Do any necessary synchronization to make sure the screen is up-to-date. The canvas should have already been flushed to screen via flush_dirty() - all this function does is make sure the hardware has caught up.
Definition at line 174 of file mapview.c.
◆ gui_map_canvas_size_refresh()
void gui_map_canvas_size_refresh |
( |
void |
| ) |
|
◆ gui_start_turn()
◆ gui_update_timeout_label()
Update the timeout display. The timeout is the time until the turn ends, in seconds.
Definition at line 92 of file mapview.c.
Referenced by setup_gui_funcs().
◆ overview_size_changed()
Called when the map size changes. This may be used to change the size of the GUI element holding the overview canvas. The overview.width and overview.height are updated if this function is called.
Definition at line 257 of file mapview.c.
◆ put_cross_overlay_tile()
Draw a cross-hair overlay on a tile.
Definition at line 207 of file mapview.c.
◆ set_indicator_icons()
Set information for the indicator icons typically shown in the main client window. The parameters tell which sprite to use for the indicator.
Definition at line 126 of file mapview.c.
◆ tileset_changed()
This function is called when the tileset is changed.
Definition at line 233 of file mapview.c.
◆ update_city_descriptions()
Update (refresh) all city descriptions on the mapview.
Definition at line 199 of file mapview.c.
◆ update_info_label()
Typically an info box is provided to tell the player about the state of their civilization. This function is called when the label is changed.
Definition at line 42 of file mapview.c.
◆ update_map_canvas_scrollbars()
void update_map_canvas_scrollbars |
( |
void |
| ) |
|
Update (refresh) the locations of the mapview scrollbars (if it uses them).
Definition at line 183 of file mapview.c.
◆ update_map_canvas_scrollbars_size()
void update_map_canvas_scrollbars_size |
( |
void |
| ) |
|
Update the size of the sliders on the scrollbars.
Definition at line 191 of file mapview.c.
◆ update_mouse_cursor()
Update the mouse cursor. Cursor type depends on what user is doing and pointing.
Definition at line 83 of file mapview.c.
◆ update_overview_scroll_window_pos()
void update_overview_scroll_window_pos |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Sets the position of the overview scroll window based on mapview position.
Definition at line 265 of file mapview.c.
◆ update_turn_done_button()
void update_turn_done_button |
( |
bool |
do_restore | ) |
|
If do_restore is FALSE it should change the turn button style (to draw the user's attention to it). If called regularly from a timer this will give a blinking turn done button. If do_restore is TRUE this should reset the turn done button to the default style.
Definition at line 105 of file mapview.c.
◆ update_unit_info_label()
void update_unit_info_label |
( |
struct unit_list * |
punitlist | ) |
|
Update the information label which gives info on the current unit and the tile under the current unit, for specified unit. Note that in practice punit is always the focus unit.
Clears label if punit is NULL.
Typically also updates the cursor for the map_canvas (this is related because the info label may includes "select destination" prompt etc). And it may call update_unit_pix_label() to update the icons for units on this tile.
Definition at line 74 of file mapview.c.