Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-sdl3/gotodlg.c Source File

Freeciv-3.3

Loading...
Searching...
No Matches
gotodlg.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <stdlib.h>
19
20/* SDL3 */
21#include <SDL3/SDL.h>
22
23/* utility */
24#include "bitvector.h"
25#include "fcintl.h"
26#include "log.h"
27
28/* common */
29#include "game.h"
30#include "fc_types.h" /* bv_player */
31#include "nation.h"
32#include "unitlist.h"
33
34/* client */
35#include "client_main.h"
36#include "control.h"
37#include "goto.h"
38
39/* gui-sdl3 */
40#include "colors.h"
41#include "graphics.h"
42#include "gui_id.h"
43#include "gui_main.h"
44#include "gui_tilespec.h"
45#include "mapview.h"
46#include "sprite.h"
47#include "widget.h"
48
49#include "gotodlg.h"
50
51 static struct advanced_dialog *goto_dlg = NULL;
52 bv_player all_players;
53 static bool GOTO = TRUE;
54
55static void update_goto_dialog(void);
56
57/**********************************************************************/
60 static int goto_dialog_window_callback(struct widget *pwindow)
61{
62 if (PRESSED_EVENT(main_data.event)) {
63 move_window_group(goto_dlg->begin_widget_list, pwindow);
64 }
65
66 return -1;
67}
68
69/**********************************************************************/
72 static int exit_goto_dialog_callback(struct widget *pwidget)
73{
74 if (PRESSED_EVENT(main_data.event)) {
75 popdown_goto_airlift_dialog();
76 flush_dirty();
77 }
78
79 return -1;
80}
81
82/**********************************************************************/
85 static int toggle_goto_nations_cities_dialog_callback(struct widget *pwidget)
86{
87 if (PRESSED_EVENT(main_data.event)) {
88 int plr_id = player_index(player_by_number(MAX_ID - pwidget->id));
89
90 if (BV_ISSET(all_players, plr_id)) {
91 BV_CLR(all_players, plr_id);
92 } else {
93 BV_SET(all_players, plr_id);
94 }
95 update_goto_dialog();
96 }
97
98 return -1;
99}
100
101/**********************************************************************/
104 static int goto_city_callback(struct widget *pwidget)
105{
106 if (PRESSED_EVENT(main_data.event)) {
107 struct city *pdestcity = game_city_by_number(MAX_ID - pwidget->id);
108
109 if (pdestcity) {
110 struct unit *punit = head_of_units_in_focus();
111
112 if (punit) {
113 if (GOTO) {
114 send_goto_tile(punit, pdestcity->tile);
115 } else {
116 request_unit_airlift(punit, pdestcity);
117 }
118 }
119 }
120
121 popdown_goto_airlift_dialog();
122 flush_dirty();
123 }
124
125 return -1;
126}
127
128/**********************************************************************/
131 static void update_goto_dialog(void)
132{
133 struct widget *buf = NULL, *add_dock, *last;
134 SDL_Surface *logo = NULL;
135 utf8_str *pstr;
136 char cbuf[128];
137 int n = 0;
138 struct player *owner = NULL;
139
140 if (goto_dlg->end_active_widget_list) {
141 add_dock = goto_dlg->end_active_widget_list->next;
142 goto_dlg->begin_widget_list = add_dock;
143 del_group(goto_dlg->begin_active_widget_list,
144 goto_dlg->end_active_widget_list);
145 goto_dlg->active_widget_list = NULL;
146 } else {
147 add_dock = goto_dlg->begin_widget_list;
148 }
149
150 last = add_dock;
151
152 players_iterate(pplayer) {
153 if (!BV_ISSET(all_players, player_index(pplayer))) {
154 continue;
155 }
156
157 city_list_iterate(pplayer->cities, pcity) {
158
159 /* FIXME: Should use unit_can_airlift_to(). */
160 if (!GOTO && !pcity->airlift) {
161 continue;
162 }
163
164 fc_snprintf(cbuf, sizeof(cbuf), "%s (%d)", city_name_get(pcity),
165 city_size_get(pcity));
166
167 pstr = create_utf8_from_char_fonto(cbuf, FONTO_ATTENTION);
168 pstr->style |= TTF_STYLE_BOLD;
169
170 if (!player_owns_city(owner, pcity)) {
171 logo = get_nation_flag_surface(nation_of_player(city_owner(pcity)));
172 logo = crop_visible_part_from_surface(logo);
173 }
174
175 buf = create_iconlabel(logo, goto_dlg->end_widget_list->dst, pstr,
176 (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE));
177
178 if (!player_owns_city(owner, pcity)) {
179 set_wflag(buf, WF_FREE_THEME);
180 owner = city_owner(pcity);
181 }
182
183 buf->string_utf8->fgcol =
184 *(get_player_color(tileset, city_owner(pcity))->color);
185 buf->action = goto_city_callback;
186
187 if (GOTO || pcity->airlift) {
188 set_wstate(buf, FC_WS_NORMAL);
189 }
190
191 fc_assert((MAX_ID - pcity->id) > 0);
192 buf->id = MAX_ID - pcity->id;
193
194 widget_add_as_prev(buf, add_dock);
195 add_dock = buf;
196
197 if (n > (goto_dlg->scroll->active - 1)) {
198 set_wflag(buf, WF_HIDDEN);
199 }
200
201 n++;
202 } city_list_iterate_end;
203 } players_iterate_end;
204
205 if (n > 0) {
206 goto_dlg->begin_widget_list = buf;
207
208 goto_dlg->begin_active_widget_list = goto_dlg->begin_widget_list;
209 goto_dlg->end_active_widget_list = last->prev;
210 goto_dlg->active_widget_list = goto_dlg->end_active_widget_list;
211 goto_dlg->scroll->count = n;
212
213 if (n > goto_dlg->scroll->active) {
214 show_scrollbar(goto_dlg->scroll);
215 goto_dlg->scroll->pscroll_bar->size.y = goto_dlg->end_widget_list->area.y +
216 goto_dlg->scroll->up_left_button->size.h;
217 goto_dlg->scroll->pscroll_bar->size.h = scrollbar_size(goto_dlg->scroll);
218 } else {
219 hide_scrollbar(goto_dlg->scroll);
220 }
221
222 setup_vertical_widgets_position(1,
223 goto_dlg->end_widget_list->area.x,
224 goto_dlg->end_widget_list->area.y,
225 goto_dlg->scroll->up_left_button->size.x -
226 goto_dlg->end_widget_list->area.x - adj_size(2),
227 0, goto_dlg->begin_active_widget_list,
228 goto_dlg->end_active_widget_list);
229
230 } else {
231 hide_scrollbar(goto_dlg->scroll);
232 }
233
234 /* Redraw */
235 redraw_group(goto_dlg->begin_widget_list, goto_dlg->end_widget_list, 0);
236 widget_flush(goto_dlg->end_widget_list);
237}
238
239/**********************************************************************/
242 static void popup_goto_airlift_dialog(void)
243{
244 SDL_Color bg_color = {0, 0, 0, 96};
245 struct widget *buf, *pwindow;
246 utf8_str *pstr;
247 SDL_Surface *flag, *enabled, *disabled;
248 SDL_Rect dst;
249 int i, col, block_x, x, y;
250 SDL_Rect area;
251
252 if (goto_dlg) {
253 return;
254 }
255
256 goto_dlg = fc_calloc(1, sizeof(struct advanced_dialog));
257
258 pstr = create_utf8_from_char_fonto(_("Select destination"),
259 FONTO_ATTENTION);
260 pstr->style |= TTF_STYLE_BOLD;
261
262 pwindow = create_window_skeleton(NULL, pstr, 0);
263
264 pwindow->action = goto_dialog_window_callback;
265 set_wstate(pwindow, FC_WS_NORMAL);
266
267 add_to_gui_list(ID_WINDOW, pwindow);
268 goto_dlg->end_widget_list = pwindow;
269
270 area = pwindow->area;
271
272 /* ---------- */
273 /* Create exit button */
274 buf = create_themeicon(current_theme->small_cancel_icon, pwindow->dst,
275 WF_WIDGET_HAS_INFO_LABEL | WF_RESTORE_BACKGROUND);
276 buf->info_label = create_utf8_from_char_fonto(_("Close Dialog (Esc)"),
277 FONTO_ATTENTION);
278 buf->action = exit_goto_dialog_callback;
279 set_wstate(buf, FC_WS_NORMAL);
280 buf->key = SDLK_ESCAPE;
281 area.w = MAX(area.w, buf->size.w) + adj_size(10);
282
283 add_to_gui_list(ID_BUTTON, buf);
284
285 col = 0;
286 /* --------------------------------------------- */
287 players_iterate(pplayer) {
288 if (pplayer != client.conn.playing
289 && DS_NO_CONTACT == player_diplstate_get(client.conn.playing, pplayer)->type) {
290 continue;
291 }
292
293 flag = resize_surface_box(get_nation_flag_surface(pplayer->nation),
294 adj_size(30), adj_size(30), 1, TRUE, FALSE);
295
296 enabled = create_icon_theme_surf(flag);
297 fill_rect_alpha(flag, NULL, &bg_color);
298 disabled = create_icon_theme_surf(flag);
299 FREESURFACE(flag);
300
301 buf = create_checkbox(pwindow->dst,
302 BV_ISSET(all_players, player_index(pplayer)),
303 WF_FREE_THEME | WF_RESTORE_BACKGROUND
304 | WF_WIDGET_HAS_INFO_LABEL);
305 set_new_checkbox_theme(buf, enabled, disabled);
306
307 buf->info_label
308 = create_utf8_from_char_fonto(nation_adjective_for_player(pplayer),
309 FONTO_ATTENTION);
310 buf->info_label->style &= ~SF_CENTER;
311 set_wstate(buf, FC_WS_NORMAL);
312
313 buf->action = toggle_goto_nations_cities_dialog_callback;
314 add_to_gui_list(MAX_ID - player_number(pplayer), buf);
315 col++;
316 } players_iterate_end;
317
318 goto_dlg->begin_widget_list = buf;
319
320 create_vertical_scrollbar(goto_dlg, 1, adj_size(320) / adj_size(30), TRUE, TRUE);
321 hide_scrollbar(goto_dlg->scroll);
322
323 area.w = MAX(area.w, adj_size(300));
324 area.h = adj_size(320);
325
326 resize_window(pwindow, NULL, NULL,
327 (pwindow->size.w - pwindow->area.w) + area.w,
328 (pwindow->size.h - pwindow->area.h) + area.h);
329
330 /* background */
331 col = (col + 15) / 16; /* number of flag columns */
332
333 flag = resize_surface(current_theme->block,
334 (col * buf->size.w + (col - 1) * adj_size(5) + adj_size(10)),
335 area.h, 1);
336
337 block_x = dst.x = area.x + area.w - flag->w;
338 dst.y = area.y;
339 alphablit(flag, NULL, pwindow->theme, &dst, 255);
340 FREESURFACE(flag);
341
342 widget_set_position(pwindow,
343 (main_window_width() - pwindow->size.w) / 2,
344 (main_window_height() - pwindow->size.h) / 2);
345
346 /* exit button */
347 buf = pwindow->prev;
348 buf->size.x = area.x + area.w - buf->size.w - 1;
349 buf->size.y = pwindow->size.y + adj_size(2);
350
351 /* nations buttons */
352 buf = buf->prev;
353 i = 0;
354 x = block_x + adj_size(5);
355 y = area.y + adj_size(1);
356 fc_assert(col > 0);
357 if (col > 0) {
358 while (buf) {
359 buf->size.x = x;
360 buf->size.y = y;
361
362 if (!((i + 1) % col)) {
363 x = block_x + adj_size(5);
364 y += buf->size.h + adj_size(1);
365 } else {
366 x += buf->size.w + adj_size(5);
367 }
368
369 if (buf == goto_dlg->begin_widget_list) {
370 break;
371 }
372
373 i++;
374 buf = buf->prev;
375 }
376 }
377
378 setup_vertical_scrollbar_area(goto_dlg->scroll,
379 block_x, area.y,
380 area.h, TRUE);
381
382 update_goto_dialog();
383}
384
385
386/**********************************************************************/
389 void popup_goto_dialog(void)
390{
391 if (!can_client_issue_orders() || 0 == get_num_units_in_focus()) {
392 return;
393 }
394
395 BV_CLR_ALL(all_players);
396 BV_SET(all_players, player_index(client.conn.playing));
397 /* FIXME: Should we include allies in all_players */
398 popup_goto_airlift_dialog();
399}
400
401/**********************************************************************/
404 void popup_airlift_dialog(void)
405{
406 if (!can_client_issue_orders() || 0 == get_num_units_in_focus()) {
407 return;
408 }
409
410 BV_CLR_ALL(all_players);
411 BV_SET(all_players, player_index(client.conn.playing));
412 /* FIXME: Should we include allies in all_players */
413 GOTO = FALSE;
414 popup_goto_airlift_dialog();
415}
416
417/**********************************************************************/
420 void popdown_goto_airlift_dialog(void)
421{
422 if (goto_dlg) {
423 popdown_window_group_dialog(goto_dlg->begin_widget_list,
424 goto_dlg->end_widget_list);
425 FC_FREE(goto_dlg->scroll);
426 FC_FREE(goto_dlg);
427 }
428 GOTO = TRUE;
429}
n
#define n
Definition astring.c:77
bitvector.h
BV_CLR_ALL
#define BV_CLR_ALL(bv)
Definition bitvector.h:95
BV_SET
#define BV_SET(bv, bit)
Definition bitvector.h:81
BV_ISSET
#define BV_ISSET(bv, bit)
Definition bitvector.h:78
BV_CLR
#define BV_CLR(bv, bit)
Definition bitvector.h:86
city_name_get
const char * city_name_get(const struct city *pcity)
Definition city.c:1128
city_list_iterate
#define city_list_iterate(citylist, pcity)
Definition city.h:508
city_size_get
static citizens city_size_get(const struct city *pcity)
Definition city.h:569
city_owner
#define city_owner(_pcity_)
Definition city.h:563
city_list_iterate_end
#define city_list_iterate_end
Definition city.h:510
client
struct civclient client
Definition client_main.c:150
can_client_issue_orders
bool can_client_issue_orders(void)
Definition client_main.c:1264
client_main.h
get_player_color
struct color * get_player_color(const struct tileset *t, const struct player *pplayer)
Definition colors_common.c:125
incite_cost
char * incite_cost
Definition comments.c:74
request_unit_airlift
void request_unit_airlift(struct unit *punit, struct city *pcity)
Definition control.c:1517
head_of_units_in_focus
struct unit * head_of_units_in_focus(void)
Definition control.c:405
get_num_units_in_focus
int get_num_units_in_focus(void)
Definition control.c:185
control.h
punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
current_theme
QString current_theme
Definition fc_client.cpp:64
fc_types.h
fcintl.h
_
#define _(String)
Definition fcintl.h:67
game_city_by_number
struct city * game_city_by_number(int id)
Definition game.c:107
game.h
send_goto_tile
bool send_goto_tile(struct unit *punit, struct tile *ptile)
Definition goto.c:1559
goto.h
owner
struct city * owner
Definition citydlg.c:220
popup_goto_dialog
void popup_goto_dialog(void)
Definition gotodlg.c:258
flush_dirty
void flush_dirty(void)
Definition mapview.c:468
popup_goto_airlift_dialog
static void popup_goto_airlift_dialog(void)
Definition gotodlg.c:246
popdown_goto_airlift_dialog
void popdown_goto_airlift_dialog(void)
Definition gotodlg.c:424
goto_dialog_window_callback
static int goto_dialog_window_callback(struct widget *pwindow)
Definition gotodlg.c:64
exit_goto_dialog_callback
static int exit_goto_dialog_callback(struct widget *pwidget)
Definition gotodlg.c:76
goto_city_callback
static int goto_city_callback(struct widget *pwidget)
Definition gotodlg.c:108
goto_dlg
static struct advanced_dialog * goto_dlg
Definition gotodlg.c:55
popup_airlift_dialog
void popup_airlift_dialog(void)
Definition gotodlg.c:408
all_players
bv_player all_players
Definition gotodlg.c:56
toggle_goto_nations_cities_dialog_callback
static int toggle_goto_nations_cities_dialog_callback(struct widget *pwidget)
Definition gotodlg.c:89
GOTO
static bool GOTO
Definition gotodlg.c:57
update_goto_dialog
static void update_goto_dialog(void)
Definition gotodlg.c:135
resize_surface
SDL_Surface * resize_surface(const SDL_Surface *psrc, Uint16 new_width, Uint16 new_height, int smooth)
Definition graphics.c:1237
main_window_width
int main_window_width(void)
Definition graphics.c:685
fill_rect_alpha
int fill_rect_alpha(SDL_Surface *surf, SDL_Rect *prect, SDL_Color *pcolor)
Definition graphics.c:865
crop_visible_part_from_surface
SDL_Surface * crop_visible_part_from_surface(SDL_Surface *psrc)
Definition graphics.c:1225
alphablit
int alphablit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect, unsigned char alpha_mod)
Definition graphics.c:199
main_data
struct sdl2_data main_data
Definition graphics.c:57
main_window_height
int main_window_height(void)
Definition graphics.c:693
resize_surface_box
SDL_Surface * resize_surface_box(const SDL_Surface *psrc, Uint16 new_width, Uint16 new_height, int smooth, bool scale_up, bool absolute_dimensions)
Definition graphics.c:1257
FREESURFACE
#define FREESURFACE(ptr)
Definition graphics.h:322
ID_BUTTON
@ ID_BUTTON
Definition gui_id.h:29
ID_WINDOW
@ ID_WINDOW
Definition gui_id.h:30
adj_size
#define adj_size(size)
Definition gui_main.h:141
PRESSED_EVENT
#define PRESSED_EVENT(event)
Definition gui_main.h:71
FONTO_ATTENTION
@ FONTO_ATTENTION
Definition gui_string.h:67
create_utf8_from_char_fonto
#define create_utf8_from_char_fonto(string_in, fonto)
Definition gui_string.h:108
get_nation_flag_surface
static SDL_Surface * get_nation_flag_surface(const struct nation_type *pnation)
Definition gui_tilespec.h:227
add_to_gui_list
void add_to_gui_list(Uint16 id, struct widget *gui)
Definition widget.c:586
widget_add_as_prev
void widget_add_as_prev(struct widget *new_widget, struct widget *add_dock)
Definition widget.c:602
setup_vertical_widgets_position
int setup_vertical_widgets_position(int step, Sint16 start_x, Sint16 start_y, Uint16 w, Uint16 h, struct widget *begin, struct widget *end)
Definition widget.c:1051
redraw_group
Uint16 redraw_group(const struct widget *begin_group_widget_list, const struct widget *end_group_widget_list, int add_to_update)
Definition widget.c:720
popdown_window_group_dialog
void popdown_window_group_dialog(struct widget *begin_group_widget_list, struct widget *end_group_widget_list)
Definition widget.c:983
move_window_group
void move_window_group(struct widget *begin_widget_list, struct widget *pwindow)
Definition widget.c:1039
widget_set_position
static void widget_set_position(struct widget *pwidget, int x, int y)
Definition widget.h:266
MAX_ID
#define MAX_ID
Definition widget.h:38
FC_WS_NORMAL
@ FC_WS_NORMAL
Definition widget.h:96
widget_flush
static void widget_flush(struct widget *pwidget)
Definition widget.h:291
set_wstate
void set_wstate(struct widget *pwidget, enum widget_state state)
Definition widget_core.c:36
WF_WIDGET_HAS_INFO_LABEL
@ WF_WIDGET_HAS_INFO_LABEL
Definition widget.h:88
WF_RESTORE_BACKGROUND
@ WF_RESTORE_BACKGROUND
Definition widget.h:85
WF_HIDDEN
@ WF_HIDDEN
Definition widget.h:68
WF_FREE_THEME
@ WF_FREE_THEME
Definition widget.h:72
WF_DRAW_TEXT_LABEL_WITH_SPACE
@ WF_DRAW_TEXT_LABEL_WITH_SPACE
Definition widget.h:87
set_wflag
void set_wflag(struct widget *pwidget, enum widget_flag flag)
Definition widget_core.c:54
del_group
#define del_group(begin_group_widget_list, end_group_widget_list)
Definition widget.h:389
set_new_checkbox_theme
int set_new_checkbox_theme(struct widget *cbox, SDL_Surface *true_surf, SDL_Surface *false_surf)
Definition widget_checkbox.c:195
create_checkbox
struct widget * create_checkbox(struct gui_layer *pdest, bool state, Uint32 flags)
Definition widget_checkbox.c:115
create_themeicon
struct widget * create_themeicon(SDL_Surface *icon_theme, struct gui_layer *pdest, Uint32 flags)
Definition widget_icon.c:212
create_icon_theme_surf
SDL_Surface * create_icon_theme_surf(SDL_Surface *icon)
Definition widget_icon.c:158
create_iconlabel
struct widget * create_iconlabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint32 flags)
Definition widget_label.c:215
setup_vertical_scrollbar_area
void setup_vertical_scrollbar_area(struct scroll_bar *scroll, Sint16 start_x, Sint16 start_y, Uint16 height, bool swap_start_x)
Definition widget_scrollbar.c:567
create_vertical_scrollbar
Uint32 create_vertical_scrollbar(struct advanced_dialog *dlg, Uint8 step, Uint8 active, bool create_scrollbar, bool create_buttons)
Definition widget_scrollbar.c:486
hide_scrollbar
#define hide_scrollbar(scrollbar)
Definition widget_scrollbar.h:36
show_scrollbar
#define show_scrollbar(scrollbar)
Definition widget_scrollbar.h:59
scrollbar_size
#define scrollbar_size(scroll)
Definition widget_scrollbar.h:32
resize_window
bool resize_window(struct widget *pwindow, SDL_Surface *bcgd, SDL_Color *pcolor, Uint16 new_w, Uint16 new_h)
Definition widget_window.c:255
create_window_skeleton
struct widget * create_window_skeleton(struct gui_layer *pdest, utf8_str *title, Uint32 flags)
Definition widget_window.c:180
gui_id.h
gui_tilespec.h
widget.h
colors.h
gotodlg.h
graphics.h
gui_main.h
mapview.h
sprite.h
log.h
fc_assert
#define fc_assert(condition)
Definition log.h:176
fc_calloc
#define fc_calloc(n, esz)
Definition mem.h:38
FC_FREE
#define FC_FREE(ptr)
Definition mem.h:41
nation_adjective_for_player
const char * nation_adjective_for_player(const struct player *pplayer)
Definition nation.c:169
nation_of_player
struct nation_type * nation_of_player(const struct player *pplayer)
Definition nation.c:444
nation.h
player_by_number
struct player * player_by_number(const int player_id)
Definition player.c:849
player_number
int player_number(const struct player *pplayer)
Definition player.c:837
player_index
int player_index(const struct player *pplayer)
Definition player.c:829
player_diplstate_get
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Definition player.c:324
player_owns_city
bool player_owns_city(const struct player *pplayer, const struct city *pcity)
Definition player.c:261
players_iterate_end
#define players_iterate_end
Definition player.h:539
players_iterate
#define players_iterate(_pplayer)
Definition player.h:534
MAX
#define MAX(x, y)
Definition shared.h:54
y
struct sprite int int y
Definition sprite_g.h:31
x
struct sprite int x
Definition sprite_g.h:31
advanced_dialog
Definition widget.h:180
advanced_dialog::begin_active_widget_list
struct widget * begin_active_widget_list
Definition widget.h:184
advanced_dialog::end_widget_list
struct widget * end_widget_list
Definition widget.h:182
advanced_dialog::end_active_widget_list
struct widget * end_active_widget_list
Definition widget.h:185
advanced_dialog::active_widget_list
struct widget * active_widget_list
Definition widget.h:186
advanced_dialog::scroll
struct scroll_bar * scroll
Definition widget.h:187
advanced_dialog::begin_widget_list
struct widget * begin_widget_list
Definition widget.h:181
city
Definition city.h:320
civclient::conn
struct connection conn
Definition client_main.h:96
color::color
GdkRGBA color
Definition colors.h:22
connection::playing
struct player * playing
Definition connection.h:151
player_diplstate::type
enum diplstate_type type
Definition player.h:199
player
Definition player.h:249
scroll_bar::active
Uint8 active
Definition widget_scrollbar.h:24
scroll_bar::up_left_button
struct widget * up_left_button
Definition widget_scrollbar.h:21
scroll_bar::count
Uint16 count
Definition widget_scrollbar.h:27
scroll_bar::pscroll_bar
struct widget * pscroll_bar
Definition widget_scrollbar.h:22
sdl2_data::event
SDL_Event event
Definition graphics.h:217
tileset
Definition tilespec.c:481
unit
Definition unit.h:140
unit::tile
struct tile * tile
Definition unit.h:142
utf8_str
Definition gui_string.h:52
widget
Definition widget.h:112
widget::theme
SDL_Surface * theme
Definition widget.h:118
widget::prev
struct widget * prev
Definition widget.h:114
widget::dst
struct gui_layer * dst
Definition widget.h:116
widget::action
int(* action)(struct widget *)
Definition widget.h:157
widget::area
SDL_Rect area
Definition widget.h:149
widget::next
struct widget * next
Definition widget.h:113
widget::id
Uint16 id
Definition widget.h:155
widget::size
SDL_Rect size
Definition widget.h:145
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:960
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
unitlist.h