diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-08 22:55:30 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-03-08 22:55:30 +0000 |
commit | a37536cb8e61301d865bf8d909643bd4fca2f230 (patch) | |
tree | 6db9b2253284cf850ad4dc6f2ebe97f39bf52733 /crawl-ref/source/command.cc | |
parent | 7636bc910fb7d3329510c840129b73876c6b551e (diff) | |
download | crawl-ref-a37536cb8e61301d865bf8d909643bd4fca2f230.tar.gz crawl-ref-a37536cb8e61301d865bf8d909643bd4fca2f230.zip |
Confined help menu scrolling to within a file (David.)
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
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r-- | crawl-ref/source/command.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 771012383a..fd38e95970 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -629,6 +629,14 @@ static void add_file_to_scroller(FILE* fp, formatted_scroller& m, bool next_is_hotkey = false; bool is_first = true; char buf[200]; + + // bracket with MEL_TITLES, so that you won't scroll + // into it or above it + m.add_entry(new MenuEntry(std::string(), MEL_TITLE)); + for ( int i = 0; i < get_number_of_lines(); ++i ) + m.add_entry(new MenuEntry(std::string())); + m.add_entry(new MenuEntry(std::string(), MEL_TITLE)); + while (fgets(buf, sizeof buf, fp)) { MenuEntry* me = new MenuEntry(buf); |