From 4223131cb43494075864e2b19ed2f140f2eeb43a Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 10 Feb 2008 18:31:33 +0000 Subject: (svn r12104) -Fix (r12103): remember loading indicators transparency settings and make in switchable by Ctrl+9 --- src/lang/english.txt | 2 +- src/main_gui.cpp | 1 + src/road_map.h | 2 +- src/settings.cpp | 4 ++-- src/transparency.h | 2 -- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2