diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-21 22:00:23 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-21 22:22:54 -0800 |
commit | 98e00e2ae1ef6c5980d753a12c209e9c68dcca17 (patch) | |
tree | f14e85f780e6991657fcb152cd501a43f7e85dc6 /crawl-ref/source/spl-book.cc | |
parent | b232c1bc260f956250c7f75f9b9fe4516410a97c (diff) | |
download | crawl-ref-98e00e2ae1ef6c5980d753a12c209e9c68dcca17.tar.gz crawl-ref-98e00e2ae1ef6c5980d753a12c209e9c68dcca17.zip |
tiles: show spell tile for lookup and memorization
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r-- | crawl-ref/source/spl-book.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index bed2cf7b3c..c69bdce331 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1529,8 +1529,15 @@ static spell_type _choose_mem_spell(spell_list &spells, { std::sort(spells.begin(), spells.end(), _sort_mem_spells); +#ifdef USE_TILE + const bool text_only = false; +#else + const bool text_only = true; +#endif + Menu spell_menu(MF_SINGLESELECT | MF_ANYPRINTABLE - | MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING); + | MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING, + "", text_only); #ifdef USE_TILE { // [enne] - Hack. Make title an item so that it's aligned. @@ -1609,6 +1616,11 @@ static spell_type _choose_mem_spell(spell_list &spells, MenuEntry* me = new MenuEntry(desc.str(), MEL_ITEM, 1, index_to_letter(i % 52)); + +#ifdef USE_TILE + me->add_tile(tile_def(tileidx_spell(spell), TEX_GUI)); +#endif + me->data = &spells[i]; spell_menu.add_entry(me); } |