![]() |
#1 |
Apprentice
Join Date: Jan 2011
Posts: 53
![]() |
"List visible monsters" and "List visible items" behavior
This is about a trivial annoyance, but it occurs constantly.
You are playing a mage at depth, in an empty corridor next to a massive crypt. Type '[' to show the monster list and it informs you that you can see no monsters. Then, you absently type ']' twice to flip over to the item list, and the (empty) monster list disappears, having been replaced by the item list. Now, cast Reveal Monsters. XP from your wildest dreams -- with promise of loot to follow -- is displayed on the other side of that stone wall. You view the monster list with '[' and scan the top of the list, satisfying yourself that it'll be easy. Then, you type ']' to make the monster list go away like it did 10 seconds before. But that no longer works. The UI has changed because the monster list now extends past the bottom of your window. You've been shunted to src/ui-output.c, line 195, which handles closing the display of text longer than your window: Code:
else if (ch.code== ESCAPE || ch.code == 'q') The UI should be consistent for the user, but this isn't consistent. Without having done any review of the implications of the change, I tried changing the src/ui-output.c line 195 code to this: Code:
else if (ch.code == ESCAPE || ch.code == 'q' || ch.code == ']' || ch.code == '[') ![]() Then I stepped back and tried to figure out the implications of this. I grepped through files and figured out that the textui_textblock_show() function is used in several of the ui-*.c files, so maybe isn't a good solution? I've done a little more testing -- but nothing exhaustive -- and it seems as though this doesn't break anything, although I can see why might be a bad thing from a code management perspective to modify the function to suit two specific uses of it. To my untrained eye, it looks like many of the instances where the function is called are dealing with short amounts of text that wouldn't trigger the above "else if" case. I padded the copyright text (one thing that's displayed using this function) and nothing bad seemed to occur with the function in that context; the altered code simply gave me 2 more keys that would close that text display. Thoughts? Is this itch even worth scratching? Is this entirely the wrong way to go about it? |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,587
Donated: $60
![]() |
Looks good at first glance
![]()
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug with "Turn" in the "Player History" dump | bron | Vanilla | 3 | January 17, 2014 17:35 |
Configuring "run" behavior? | fruviad | Vanilla | 6 | August 24, 2013 18:46 |
[3.3.2] Bug in monster list "@ 1 <player>" | bunnies | Vanilla | 2 | March 10, 2012 01:10 |
Improving the monster list "[" | buzzkill | Development | 8 | January 2, 2010 11:27 |
What do you want from the list of visible monsters? | Magnate | Vanilla | 42 | January 1, 2010 10:56 |