3 /** @file town_gui.cpp */ |
3 /** @file town_gui.cpp */ |
4 |
4 |
5 #include "stdafx.h" |
5 #include "stdafx.h" |
6 #include "openttd.h" |
6 #include "openttd.h" |
7 #include "debug.h" |
7 #include "debug.h" |
8 #include "table/sprites.h" |
|
9 #include "table/strings.h" |
|
10 #include "town.h" |
8 #include "town.h" |
11 #include "viewport_func.h" |
9 #include "viewport_func.h" |
12 #include "gfx_func.h" |
10 #include "gfx_func.h" |
13 #include "gui.h" |
11 #include "gui.h" |
14 #include "window_gui.h" |
12 #include "window_gui.h" |
15 #include "textbuf_gui.h" |
13 #include "textbuf_gui.h" |
16 #include "command_func.h" |
14 #include "command_func.h" |
17 #include "player.h" |
15 #include "player_func.h" |
|
16 #include "player_base.h" |
|
17 #include "player_gui.h" |
18 #include "network/network.h" |
18 #include "network/network.h" |
19 #include "variables.h" |
19 #include "variables.h" |
20 #include "strings_func.h" |
20 #include "strings_func.h" |
21 #include "economy_func.h" |
21 #include "economy_func.h" |
22 #include "core/alloc_func.hpp" |
22 #include "core/alloc_func.hpp" |
|
23 #include "settings_type.h" |
|
24 |
|
25 #include "table/sprites.h" |
|
26 #include "table/strings.h" |
23 |
27 |
24 enum TownAuthorityWidget { |
28 enum TownAuthorityWidget { |
25 TWA_CLOSEBOX = 0, |
29 TWA_CLOSEBOX = 0, |
26 TWA_CAPTION, |
30 TWA_CAPTION, |
27 TWA_RATING_INFO, |
31 TWA_RATING_INFO, |
472 } |
476 } |
473 |
477 |
474 SetVScrollCount(w, _num_town_sort); |
478 SetVScrollCount(w, _num_town_sort); |
475 |
479 |
476 DrawWindowWidgets(w); |
480 DrawWindowWidgets(w); |
477 DoDrawString(_town_sort_order & 1 ? DOWNARROW : UPARROW, (_town_sort_order <= 1) ? 88 : 187, 15, TC_BLACK); |
481 DrawSortButtonState(w, (_town_sort_order <= 1) ? 3 : 4, _town_sort_order & 1 ? SBS_DOWN : SBS_UP); |
478 |
482 |
479 { |
483 { |
480 int n = 0; |
484 int n = 0; |
481 uint16 i = w->vscroll.pos; |
485 uint16 i = w->vscroll.pos; |
482 int y = 28; |
486 int y = 28; |