summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-21 21:50:55 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-21 22:22:54 -0800
commitb232c1bc260f956250c7f75f9b9fe4516410a97c (patch)
tree74b62780da6dbe2156b7688778e1d0ee756719c9 /crawl-ref/source/spl-cast.cc
parentc54cc580ef092fa14345400a96c45e731f7d3bfc (diff)
downloadcrawl-ref-b232c1bc260f956250c7f75f9b9fe4516410a97c.tar.gz
crawl-ref-b232c1bc260f956250c7f75f9b9fe4516410a97c.zip
tiles: spell_list() now shows spell tiles
Also, spell_list() now always displays in tiles mode for tiles builds.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index b2ed7ad242..1c970443ff 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -231,11 +231,17 @@ static bool _spell_no_hostile_in_range(spell_type spell, int minRange)
}
int list_spells(bool toggle_with_I, bool viewing, int minRange,
- spell_selector selector, bool text_only)
+ spell_selector selector)
{
if (toggle_with_I && get_spell_by_letter('I') != SPELL_NO_SPELL)
toggle_with_I = false;
+#ifdef USE_TILE
+ const bool text_only = false;
+#else
+ const bool text_only = true;
+#endif
+
ToggleableMenu spell_menu(MF_SINGLESELECT | MF_ANYPRINTABLE
| MF_ALWAYS_SHOW_MORE | MF_ALLOW_FORMATTING,
text_only);
@@ -310,6 +316,11 @@ int list_spells(bool toggle_with_I, bool viewing, int minRange,
new ToggleableMenuEntry(_spell_base_description(spell, grey),
_spell_extra_description(spell, grey),
MEL_ITEM, 1, letter);
+
+#ifdef USE_TILE
+ me->add_tile(tile_def(tileidx_spell(spell), TEX_GUI));
+#endif
+
spell_menu.add_entry(me);
}
}