summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-04-11 20:14:11 +0000
committerpeter1138 <peter1138@openttd.org>2007-04-11 20:14:11 +0000
commit91c407bd3795f4904c1ac3a2feac56a8a88af34f (patch)
tree5f2d04d94603d0efc79ebb4dc85014f53f4ef555 /src
parent23d9d6cfb40dea39446844a566c80ab149248933 (diff)
downloadopenttd-91c407bd3795f4904c1ac3a2feac56a8a88af34f.tar.xz
(svn r9597) -Codechange: Exclude sign transparency when toggling all options on/off
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index a2af5eb22..e23e8bddd 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -2350,12 +2350,13 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
break;
case 'X': {
+ /* Toggle all transparency options except for signs */
static byte trans_opt = ~0;
- if (_transparent_opt == 0) {
- _transparent_opt = trans_opt;
+ if (GB(_transparent_opt, 1, 7) == 0) {
+ SB(_transparent_opt, 1, 7, GB(trans_opt, 1, 7));
} else {
trans_opt = _transparent_opt;
- _transparent_opt = 0;
+ SB(_transparent_opt, 1, 7, 0);
}
MarkWholeScreenDirty();
break;