summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-10 18:31:33 +0000
committersmatz <smatz@openttd.org>2008-02-10 18:31:33 +0000
commit9e0a93d28683dacc7d557720461dfdd6f54f36fd (patch)
treeaad3ef7d96bbdf9c9a37139b885a53148af94616
parent8a768652c89b068c405c436ffe093d7b08d6c9b9 (diff)
downloadopenttd-9e0a93d28683dacc7d557720461dfdd6f54f36fd.tar.xz
(svn r12104) -Fix (r12103): remember loading indicators transparency settings and make in switchable by Ctrl+9
-rw-r--r--src/lang/english.txt2
-rw-r--r--src/main_gui.cpp1
-rw-r--r--src/road_map.h2
-rw-r--r--src/settings.cpp4
-rw-r--r--src/transparency.h2
5 files changed, 5 insertions, 6 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 2785e2067..7e76c89cb 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -3344,8 +3344,8 @@ STR_TRANSPARENT_INDUSTRIES_DESC :{BLACK}Toggle t
STR_TRANSPARENT_BUILDINGS_DESC :{BLACK}Toggle transparency for buildables like stations, depots and waypoints. CTRL+click to lock.
STR_TRANSPARENT_BRIDGES_DESC :{BLACK}Toggle transparency for bridges. CTRL+click to lock.
STR_TRANSPARENT_STRUCTURES_DESC :{BLACK}Toggle transparency for structures like lighthouses and antennas. CTRL+click to lock.
-STR_TRANSPARENT_LOADING_DESC :{BLACK}Toggle transparency for loading indicators. CTRL+click to lock.
STR_TRANSPARENT_CATENARY_DESC :{BLACK}Toggle transparency for catenary. CTRL+click to lock.
+STR_TRANSPARENT_LOADING_DESC :{BLACK}Toggle transparency for loading indicators. CTRL+click to lock.
STR_PERCENT_UP_SMALL :{TINYFONT}{WHITE}{NUM}%{UPARROW}
STR_PERCENT_UP :{WHITE}{NUM}%{UPARROW}
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 100082285..5b443da8f 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -1914,6 +1914,7 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
case '6' | WKC_CTRL:
case '7' | WKC_CTRL:
case '8' | WKC_CTRL:
+ case '9' | WKC_CTRL:
/* Transparency toggle hot keys */
ToggleTransparency((TransparencyOption)(e->we.keypress.keycode - ('1' | WKC_CTRL)));
MarkWholeScreenDirty();
diff --git a/src/road_map.h b/src/road_map.h
index 705961b95..997040057 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -19,7 +19,7 @@ enum RoadTileType {
};
static inline RoadTileType GetRoadTileType(TileIndex t)
- {
+{
assert(IsTileType(t, MP_ROAD));
return (RoadTileType)GB(_m[t].m5, 6, 2);
}
diff --git a/src/settings.cpp b/src/settings.cpp
index 6e4aba91a..03a6afd1c 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1282,8 +1282,8 @@ static const SettingDescGlobVarList _misc_settings[] = {
#endif
SDTG_VAR("sprite_cache_size",SLE_UINT, S, 0, _sprite_cache_size, 4, 1, 64, 0, STR_NULL, NULL),
SDTG_VAR("player_face", SLE_UINT32, S, 0, _player_face, 0,0,0xFFFFFFFF,0, STR_NULL, NULL),
- SDTG_VAR("transparency_options", SLE_UINT, S, 0, _transparency_opt, 0, 0,0xFF,0, STR_NULL, NULL),
- SDTG_VAR("transparency_locks", SLE_UINT, S, 0, _transparency_lock, 0, 0,0xFF,0, STR_NULL, NULL),
+ SDTG_VAR("transparency_options", SLE_UINT, S, 0, _transparency_opt, 0,0,0x1FF,0, STR_NULL, NULL),
+ SDTG_VAR("transparency_locks", SLE_UINT, S, 0, _transparency_lock, 0,0,0x1FF,0, STR_NULL, NULL),
SDTG_END()
};
diff --git a/src/transparency.h b/src/transparency.h
index c0de807ce..b69a16300 100644
--- a/src/transparency.h
+++ b/src/transparency.h
@@ -11,8 +11,6 @@
* Transparency option bits: which position in _transparency_opt stands for which transparency.
* If you change the order, change the order of the ShowTransparencyToolbar() stuff in transparency_gui.cpp too.
* If you add or remove an option don't forget to change the transparency 'hot keys' in main_gui.cpp.
- * If you add an option and have more then 8, change the typedef TransparencyOptionBits and
- * the save stuff (e.g. SLE_UINT8 to SLE_UINT16) in settings.cpp .
*/
enum TransparencyOption {
TO_SIGNS = 0, ///< signs