diff options
author | Florian Diebold <flodiebold@gmail.com> | 2011-12-16 00:05:51 +0100 |
---|---|---|
committer | Florian Diebold <flodiebold@gmail.com> | 2011-12-16 00:06:15 +0100 |
commit | e3782132eb94a82f5e6d207e5482e245386a1ce3 (patch) | |
tree | 143849b27f5262aa40db7908550cda24304090a8 /crawl-ref/source/tileweb.h | |
parent | afe45422f6408046e81f0b85cfbef748684b7345 (diff) | |
download | crawl-ref-e3782132eb94a82f5e6d207e5482e245386a1ce3.tar.gz crawl-ref-e3782132eb94a82f5e6d207e5482e245386a1ce3.zip |
Make the X level map use the full window in Webtiles, similar to the console.
There are no feature markers like in console though (yet).
Diffstat (limited to 'crawl-ref/source/tileweb.h')
-rw-r--r-- | crawl-ref/source/tileweb.h | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/crawl-ref/source/tileweb.h b/crawl-ref/source/tileweb.h index 63fa90f7e9..a8cabe538f 100644 --- a/crawl-ref/source/tileweb.h +++ b/crawl-ref/source/tileweb.h @@ -23,6 +23,13 @@ enum WebtilesCRTMode CRT_MENU }; +enum WebtilesUIState +{ + UI_NORMAL, + UI_CRT, + UI_VIEW_MAP, +}; + class TilesFramework { public: @@ -127,6 +134,10 @@ public: WebtilesCRTMode m_crt_mode; void clear_crt_menu() { m_text_menu.clear(); } + + void set_ui_state(WebtilesUIState state); + WebtilesUIState get_ui_state() { return m_ui_state; } + protected: int m_sock; int m_max_msg_size; @@ -150,14 +161,7 @@ protected: }; std::vector<MenuInfo> m_menu_stack; - enum LayerID - { - LAYER_NORMAL, - LAYER_CRT, - LAYER_TILE_CONTROL, - LAYER_MAX, - }; - LayerID m_active_layer; + WebtilesUIState m_ui_state; unsigned int m_last_tick_redraw; bool m_need_redraw; @@ -251,4 +255,24 @@ private: WebtilesCRTMode m_old_mode; }; +class tiles_ui_control +{ +public: + tiles_ui_control(WebtilesUIState state) + : m_new_state(state), m_old_state(tiles.get_ui_state()) + { + tiles.set_ui_state(state); + } + + ~tiles_ui_control() + { + if (tiles.get_ui_state() == m_new_state) + tiles.set_ui_state(m_old_state); + } + +private: + WebtilesUIState m_new_state; + WebtilesUIState m_old_state; +}; + #endif |