summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/menu.cc
Commit message (Collapse)AuthorAgeFilesLines
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-65/+75
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* [1909218] Fixing issue where keymaps were affecting menu choices done by ↵ennewalker2008-06-121-1/+1
| | | | | | | | | keyboard or through the tiles mouse interface. I couldn't think of any reason why keymaps should ever apply to menu selections (and certainly not the KC_DEFAULT map), so I added a new special keymap context called KC_NONE which doesn't apply keymaps to new input. This is used for all menus. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5739 c06c8d41-db1a-0410-9941-cceddc491573
* Bug/FR 1947001: For damaging cards add "You draw card xy" to the prompt,j-p-e-g2008-06-031-2/+2
| | | | | | | | | | | | | | so you can reread it while targetting, and add a targetting subcommand "show prompt" that'll do just that. (Though you can already do that by looking at the help.) Fix plain coloured items highlighted in grey in prompts, and add two new colouring prefixes: evil_item (/draining, necromancy books, etc.) and evil_eating (cannibalism, intelligent being) that only apply for the good gods. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5455 c06c8d41-db1a-0410-9941-cceddc491573
* [1940326] Fixing bug where the mouse couldn't be used to select items on the ↵ennewalker2008-04-231-0/+1
| | | | | | inventory/menu/drop screen. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4528 c06c8d41-db1a-0410-9941-cceddc491573
* Allow specific colouring of pickup menu (as opposed to generalj-p-e-g2008-04-171-2/+3
| | | | | | | inventory). To do so, use "pickup:colour:pattern". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4287 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow the Staff of Wucad Mu as a Trog gift.j-p-e-g2008-04-161-4/+12
| | | | | | | And another of those code cleanups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4259 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-36/+41
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* For David. Menu's draw_title_suffix can now accept a formatted_stringpauldubois2008-04-071-0/+37
| | | | | | | | | | | | instead of a string. See example in StashSearchMenu::draw_title. If you want everything in cyan, you might want to figure out who sets the StashSearchMenu's title->color and change that, too. Added formatted_string::substr(). Lightly tested, seems to work fine. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4091 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Paul's patch 1895083: linebreak_string2 cleanupj-p-e-g2008-02-271-14/+21
| | | | | | | I ran a few tests and found no problems whatsoever. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3473 c06c8d41-db1a-0410-9941-cceddc491573
* Finally implemented by applying Paul Du Bois' latest patch. :)j-p-e-g2008-02-181-4/+19
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3442 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-13/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed mutation menu miscolouring mutations. dshaligram2008-01-251-6/+22
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3332 c06c8d41-db1a-0410-9941-cceddc491573
* [1801838] Use a menu to show mutation list so long lists don't scroll off ↵dshaligram2008-01-251-54/+77
| | | | | | the end of the terminal. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3331 c06c8d41-db1a-0410-9941-cceddc491573
* [1869912] ^F in drop menu is now case-insensitive, regex input is lightgrey ↵dshaligram2008-01-251-2/+2
| | | | | | instead of dark. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3324 c06c8d41-db1a-0410-9941-cceddc491573
* Add mouseclick handling for menus in tiles:j-p-e-g2008-01-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | L-click will page down, R-click is treated like Escape. Change L-click on player from single turn search to (the more useful, I think) pickup, and add L-click to list of alternatives to call the pickup menu, so that clicking on the player icon twice will directly open the pickup menu. This is getting complicated: there are so few combinations of mouseclicks possible, but because they do different things under different circumstances this *really* needs to be documented somehow. Fix coloured hp/mp bars not updating during running. (During travel the map needs to be redrawn anyway, so also having to redraw the bars doesn't hurt any.) Also fix list_rotten to be readable from init.txt (and default to true). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3316 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-2/+30
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Added an MF_SHOW_PAGENUMBERS flag to Menu, which will show "(page X of Y)"haranp2007-12-111-0/+12
| | | | | | | | | as part of the title. This can get a bit confusing when scrolling using up and down (as opposed to page-up/page-down.) Currently only used for select_items(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3047 c06c8d41-db1a-0410-9941-cceddc491573
* Menus are now tagged. Menu colours now only apply to a menu with a matchingharanp2007-10-191-7/+13
| | | | | | | | | | | | tag, unless the menu colour tag is empty or "any". Menu colours are specified as tag:colour:pattern, where the "tag:" part is optional (default is empty tag, i.e., all menus.) The following menu tags exist: ability, description, equip, help, inventory, notes, resists, spell, stash. Default .crawlrc should probably be changed (and the docs, too...) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2493 c06c8d41-db1a-0410-9941-cceddc491573
* [1808372] Clip menu item labels at terminal width.dshaligram2007-10-071-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2360 c06c8d41-db1a-0410-9941-cceddc491573
* Highlighting species in aptitudes list, and added the j-p-e-g2007-09-191-0/+32
| | | | | | | | | "." command to help screen. I've added some "\n" to make it look nice (on Windows) but it's looking differently on Linux. *shrugs* git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2147 c06c8d41-db1a-0410-9941-cceddc491573
* A handful of new game options:zelgadis2007-09-171-3/+5
| | | | | | | | | | | | | | | | | | menu_colour_prefix_id, if set to true, causes the identification state of an object to be prefixed to the string menu colour regexes are matched against (but does not alter the string displayed on the screen). menu_colour_prefix_class, if set to true, prefixes the object's base type to the string menu colour regexes are matched against. user_note_prefix can be set to a string which will be prefixed to manual user notes when they are displayed, to make them easier to find. detailed_hunger, if set to true, will cause three new informational-only hunger states to be displayed: near starving, very hungry and very full. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2121 c06c8d41-db1a-0410-9941-cceddc491573
* In the item selection menu, pressing "." will toggle the next item in thezelgadis2007-09-161-1/+29
| | | | | | | | | | | list; you can press "." repeatedly to select/unselect a number of contiguous items. Also, removed the depedancy upon "menu.h" for formatted_string, since that isn't in menu.h anymore. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2101 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+1
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Type-safety on mpr() and friends channel argument.haranp2007-08-041-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1970 c06c8d41-db1a-0410-9941-cceddc491573
* Reworked Bazaars as a special case of portal vaults. The level-type is nowdshaligram2007-07-271-2/+2
| | | | | | | | | | | | | called portal vault. The dungeon builder bases its behaviour on the level_type_name, which must be set as the "dst" property on the portal leading to the bazaar/portal vault. Added WELCOME: directive to .des files to allow maps to specify a welcome message when the player enters the level (only relevant to encompass maps). Readjusted kenku flight speed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1941 c06c8d41-db1a-0410-9941-cceddc491573
* Changed Nemelex description (David.)haranp2007-07-261-0/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1933 c06c8d41-db1a-0410-9941-cceddc491573
* Coloured power display. This is, for now, a rather extreme hack.haranp2007-07-031-1/+4
| | | | | | | | Note that some spells (e.g. Apportation) have no actual power limits, so they will always be 'red'. Suggestions welcome. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1736 c06c8d41-db1a-0410-9941-cceddc491573
* Drop and pickup menus now support Ctrl-F to select all items matching a regex.haranp2007-07-021-0/+34
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1716 c06c8d41-db1a-0410-9941-cceddc491573
* The tutorial now uses set_more() to display the ability-menu helpharanp2007-06-301-8/+4
| | | | | | | | | | (so Menu doesn't need to be aware of the tutorial.) set_more() support with multi-line strings will only work if there are enough free lines; it doesn't (yet) reduce pagesize. Also, it doesn't handle newlines which aren't EOLs. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1700 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented 1715578: pressing '!' in the Z? screen toggles betweenharanp2007-06-291-0/+29
| | | | | | | showing schools/success and hunger/power. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1693 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-0/+1
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up abilities screen information for tutorial.j-p-e-g2007-06-151-51/+6
| | | | | | | Small additions to Beogh. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1589 c06c8d41-db1a-0410-9941-cceddc491573
* Remember choice of Beogh in character selection.dshaligram2007-06-141-2/+2
| | | | | | Some code reindenting and housekeeping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1587 c06c8d41-db1a-0410-9941-cceddc491573
* Added information to the abilities screen during tutorials, j-p-e-g2007-06-101-0/+50
| | | | | | | akin to my previous commit for skills. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1568 c06c8d41-db1a-0410-9941-cceddc491573
* Changed list_spells() somewhat. It's now a slider wraparound menu.haranp2007-05-081-6/+20
| | | | | | | | (Also changed the meaning of what some of the flags do to slider_menu, the default behaviour should be unaltered.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1423 c06c8d41-db1a-0410-9941-cceddc491573
* Type safety, cast cleanups, etc.haranp2007-05-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1401 c06c8d41-db1a-0410-9941-cceddc491573
* Enable easy_exit for formatted scroller menus.dshaligram2007-04-081-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1272 c06c8d41-db1a-0410-9941-cceddc491573
* Tutorial tweaks:dshaligram2007-03-201-2/+0
| | | | | | | | * Fixed status display commentary wiping out the status display on curses. * Fixed doubled %% on Unix (a plague on whoever wrote cprintf() in libw32c.cc). * Fixed reference to get_number_of_cols() before curses initialisation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1073 c06c8d41-db1a-0410-9941-cceddc491573
* Added a funtion for formatted message history, and, while I was at it, j-p-e-g2007-03-201-13/+15
| | | | | | | | | | | | moved some overlapping parts of base_mpr and formatted_mpr into separate functions. This makes them more readable and avoids code duplication. I'm uncertain as to whether translating every string in replay_messages into a formatted string (just in case) would be overkill - so for now that only happens for messages of MSGCH_TUTORIAL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1071 c06c8d41-db1a-0410-9941-cceddc491573
* Changes to the overview screen (%) - added abilities and made it scrollable.j-p-e-g2007-03-181-1/+1
| | | | | | | | Also, some more clean-up of tutorial.cc. As this involved a lot of spacing changes it was easier to just replace the file as a whole. Sorry about that. There are still some differences between the Linux and Windows versions that I don't really understand but using get_number_of_cols helps a lot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1055 c06c8d41-db1a-0410-9941-cceddc491573
* Major overhaul of tutorial messages and clean-up of tutorial.ccj-p-e-g2007-03-141-0/+76
| | | | | | | I've also hopefully fixed a bug concerning entry vaults during the tutorial. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1038 c06c8d41-db1a-0410-9941-cceddc491573
* Requesting help when choosing race/class jumps you to the appropriate ↵haranp2007-03-131-10/+10
| | | | | | | | | section of the manual. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1034 c06c8d41-db1a-0410-9941-cceddc491573
* Changed around the help screen a bit, following David's ideas.haranp2007-03-091-2/+6
| | | | | | | Appendix hotkeys now work. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1005 c06c8d41-db1a-0410-9941-cceddc491573
* Confined help menu scrolling to within a file (David.)haranp2007-03-081-0/+61
| | | | | | | | I'm iffy as to whether this really helps, but I'm putting it in for now. 1,000th commit... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1000 c06c8d41-db1a-0410-9941-cceddc491573
* Moved formatted_string into its own file, separate from the rest of Menu.haranp2007-02-171-291/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@954 c06c8d41-db1a-0410-9941-cceddc491573
* Added add_glyph methods to formatted string to show a monster or item glyph asdshaligram2007-01-281-2/+45
| | | | | | | | displayed on screen. Still is a bit messy to use, and you must initialise the formatted_string with a base colour before using add_glyph(), or the formatted_string will reset to lightgrey after the glyph. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@897 c06c8d41-db1a-0410-9941-cceddc491573
* [1638588] Don't use highlighters in formatted_scrollers.dshaligram2007-01-251-0/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@884 c06c8d41-db1a-0410-9941-cceddc491573
* Removed USE_NEW_RANDOM, USE_MACROS.dshaligram2007-01-251-11/+0
| | | | | | | | | | | | | Removed DOS_TERM, PLAIN_TERM special casery - all platforms get PLAIN_TERM. Better end-of-greedy-explore reporting for items on traps (Erik). Cleaned up find_travel_pos - moved guts of travel pathfinding to travel_pathfind class. Miscellaneous other stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@882 c06c8d41-db1a-0410-9941-cceddc491573
* First steps towards making delay_message_clear useful. The intent is to use adshaligram2007-01-121-3/+3
| | | | | | | | | | | | scrolling message window and show --more-- only when the message window is filled with new messages since the last mesclr (as suggested by Eidolos/doy on ##crawl). This currently works only on curses (breaks the DOS and Windows compiles), I'm working on fixing that. There are also some cursor glitches with prompts at the bottom of the message window that I need to fix. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@837 c06c8d41-db1a-0410-9941-cceddc491573