summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-29 20:54:57 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-29 21:00:21 +0100
commit58ef5ce5a9573d732c3bd937d02bfddecdfb9134 (patch)
tree7c839b9fc36a2c09e891471de8023d0fa6c248d8 /crawl-ref/source
parent8963333ffd03d1b0112628ad9ae0fdd577a55f4d (diff)
downloadcrawl-ref-58ef5ce5a9573d732c3bd937d02bfddecdfb9134.tar.gz
crawl-ref-58ef5ce5a9573d732c3bd937d02bfddecdfb9134.zip
Optionally display message window at top of terminal.
Set messages_at_top=true to use. This is not quite aesthetically pleasing since character name and title which form a kind of heading for the screen are now in the middle. It might be better to display them in an extra line across the top. Also, the layout should really be moved out to lua and made completely user configurable.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/options.h1
-rw-r--r--crawl-ref/source/viewgeom.cc12
3 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 559239da67..b0e1d91e14 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -608,6 +608,7 @@ void game_options::reset_options()
mlist_min_height = 5;
msg_max_height = 10;
mlist_allow_alternate_layout = false;
+ messages_at_top = false;
mlist_targetting = false;
classic_hud = false;
msg_condense_repeats = true;
@@ -2425,6 +2426,7 @@ void game_options::read_option_line(const std::string &str, bool runscript)
else INT_OPTION(mlist_min_height, 0, INT_MAX);
else INT_OPTION(msg_max_height, 6, INT_MAX);
else BOOL_OPTION(mlist_allow_alternate_layout);
+ else BOOL_OPTION(messages_at_top);
#ifndef USE_TILE
else BOOL_OPTION(mlist_targetting);
#endif
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 8467480cdc..2e64f1f680 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -60,6 +60,7 @@ public:
int mlist_min_height;
int msg_max_height;
bool mlist_allow_alternate_layout;
+ bool messages_at_top;
bool mlist_targetting;
bool classic_hud;
bool msg_condense_repeats;
diff --git a/crawl-ref/source/viewgeom.cc b/crawl-ref/source/viewgeom.cc
index 7c2c2bd156..784a402bcc 100644
--- a/crawl-ref/source/viewgeom.cc
+++ b/crawl-ref/source/viewgeom.cc
@@ -130,8 +130,16 @@ class _inline_layout : public _layout
}
// Finish off by doing the positions.
- viewp = termp;
- msgp = termp + coord_def(0, std::max(viewsz.y, hudsz.y+mlistsz.y));
+ if (Options.messages_at_top)
+ {
+ msgp = termp;
+ viewp = termp + coord_def(0, msgsz.y);
+ }
+ else
+ {
+ viewp = termp;
+ msgp = termp + coord_def(0, std::max(viewsz.y, hudsz.y+mlistsz.y));
+ }
hudp = viewp + coord_def(viewsz.x+hud_gutter, 0);
mlistp = hudp + coord_def(0, hudsz.y);