4 |
4 |
5 #include "stdafx.h" |
5 #include "stdafx.h" |
6 #include <stdarg.h> |
6 #include <stdarg.h> |
7 #include "openttd.h" |
7 #include "openttd.h" |
8 #include "debug.h" |
8 #include "debug.h" |
9 #include "player.h" |
9 #include "player_func.h" |
10 #include "gfx_func.h" |
10 #include "gfx_func.h" |
11 #include "console.h" |
11 #include "console.h" |
12 #include "viewport_func.h" |
12 #include "viewport_func.h" |
13 #include "variables.h" |
13 #include "variables.h" |
14 #include "table/sprites.h" |
|
15 #include "genworld.h" |
14 #include "genworld.h" |
16 #include "blitter/factory.hpp" |
15 #include "blitter/factory.hpp" |
17 #include "window_gui.h" |
16 #include "window_gui.h" |
18 #include "zoom_func.h" |
17 #include "zoom_func.h" |
19 #include "core/alloc_func.hpp" |
18 #include "core/alloc_func.hpp" |
20 #include "map_func.h" |
19 #include "map_func.h" |
21 #include "vehicle_base.h" |
20 #include "vehicle_base.h" |
|
21 #include "settings_type.h" |
|
22 |
|
23 #include "table/sprites.h" |
22 |
24 |
23 /* delta between mouse cursor and upper left corner of dragged window */ |
25 /* delta between mouse cursor and upper left corner of dragged window */ |
24 static Point _drag_delta; |
26 static Point _drag_delta; |
25 |
27 |
26 static Window _windows[MAX_NUMBER_OF_WINDOWS]; |
28 static Window _windows[MAX_NUMBER_OF_WINDOWS]; |
27 Window *_z_windows[lengthof(_windows)]; |
29 Window *_z_windows[lengthof(_windows)]; |
28 Window **_last_z_window; ///< always points to the next free space in the z-array |
30 Window **_last_z_window; ///< always points to the next free space in the z-array |
|
31 |
|
32 Point _cursorpos_drag_start; |
|
33 |
|
34 int _scrollbar_start_pos; |
|
35 int _scrollbar_size; |
|
36 byte _scroller_click_timeout; |
|
37 |
|
38 bool _scrolling_scrollbar; |
|
39 bool _scrolling_viewport; |
|
40 bool _popup_menu_active; |
|
41 |
|
42 byte _special_mouse_mode; |
|
43 |
29 |
44 |
30 void CDECL Window::SetWidgetsDisabledState(bool disab_stat, int widgets, ...) |
45 void CDECL Window::SetWidgetsDisabledState(bool disab_stat, int widgets, ...) |
31 { |
46 { |
32 va_list wdg_list; |
47 va_list wdg_list; |
33 |
48 |