equal
deleted
inserted
replaced
5 #include "gui.h" |
5 #include "gui.h" |
6 #include "window_gui.h" |
6 #include "window_gui.h" |
7 #include "variables.h" |
7 #include "variables.h" |
8 #include "transparency.h" |
8 #include "transparency.h" |
9 #include "sound_func.h" |
9 #include "sound_func.h" |
|
10 #include "settings_type.h" |
10 |
11 |
11 #include "table/sprites.h" |
12 #include "table/sprites.h" |
12 #include "table/strings.h" |
13 #include "table/strings.h" |
13 |
14 |
14 TransparencyOptionBits _transparency_opt; |
15 TransparencyOptionBits _transparency_opt; |
35 /* must be sure that the widgets show the transparency variable changes |
36 /* must be sure that the widgets show the transparency variable changes |
36 * also when we use shortcuts */ |
37 * also when we use shortcuts */ |
37 for (uint i = TTW_WIDGET_SIGNS; i < TTW_WIDGET_END; i++) { |
38 for (uint i = TTW_WIDGET_SIGNS; i < TTW_WIDGET_END; i++) { |
38 w->SetWidgetLoweredState(i, IsTransparencySet((TransparencyOption)(i - TTW_WIDGET_SIGNS))); |
39 w->SetWidgetLoweredState(i, IsTransparencySet((TransparencyOption)(i - TTW_WIDGET_SIGNS))); |
39 } |
40 } |
|
41 |
|
42 /* Disabling the trees button allows to make it very evident that it has no effect |
|
43 * upon current situation */ |
|
44 w->SetWidgetDisabledState(TTW_WIDGET_TREES, _patches.invisible_trees && IsTransparencySet(TO_HOUSES)); |
|
45 |
40 DrawWindowWidgets(w); |
46 DrawWindowWidgets(w); |
41 break; |
47 break; |
42 |
48 |
43 case WE_CLICK: |
49 case WE_CLICK: |
44 if (e->we.click.widget >= TTW_WIDGET_SIGNS) { |
50 if (e->we.click.widget >= TTW_WIDGET_SIGNS) { |