(svn r12018) -Fix(FS#1721,r9563): Restore initial intent on the invisible tree while transparent building patch setting
--- a/src/main_gui.cpp Tue Jan 29 21:43:22 2008 +0000
+++ b/src/main_gui.cpp Wed Jan 30 03:34:24 2008 +0000
@@ -176,10 +176,7 @@
case 9: ToggleBit(_display_opt, DO_WAYPOINTS); break;
case 10: ToggleBit(_display_opt, DO_FULL_ANIMATION); break;
case 11: ToggleBit(_display_opt, DO_FULL_DETAIL); break;
- case 12:
- ToggleTransparency(TO_TREES);
- ToggleTransparency(TO_HOUSES);
- break;
+ case 12: ToggleTransparency(TO_HOUSES); break;
case 13: ToggleTransparency(TO_SIGNS); break;
}
MarkWholeScreenDirty();
--- a/src/transparency_gui.cpp Tue Jan 29 21:43:22 2008 +0000
+++ b/src/transparency_gui.cpp Wed Jan 30 03:34:24 2008 +0000
@@ -7,6 +7,7 @@
#include "variables.h"
#include "transparency.h"
#include "sound_func.h"
+#include "settings_type.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -37,6 +38,11 @@
for (uint i = TTW_WIDGET_SIGNS; i < TTW_WIDGET_END; i++) {
w->SetWidgetLoweredState(i, IsTransparencySet((TransparencyOption)(i - TTW_WIDGET_SIGNS)));
}
+
+ /* Disabling the trees button allows to make it very evident that it has no effect
+ * upon current situation */
+ w->SetWidgetDisabledState(TTW_WIDGET_TREES, _patches.invisible_trees && IsTransparencySet(TO_HOUSES));
+
DrawWindowWidgets(w);
break;
--- a/src/tree_cmd.cpp Tue Jan 29 21:43:22 2008 +0000
+++ b/src/tree_cmd.cpp Wed Jan 30 03:34:24 2008 +0000
@@ -428,7 +428,8 @@
StartSpriteCombine();
- if (!(IsTransparencySet(TO_TREES) && _patches.invisible_trees)) {
+ /* Do not draw trees when buildings are transparent and when the invisile trees patch is on */
+ if (!(_patches.invisible_trees && IsTransparencySet(TO_HOUSES))) {
TreeListEnt te[4];
uint i;