diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-30 15:59:37 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-30 15:59:37 +0000 |
commit | 9434334816f9a2404a18876899d74df04daab77f (patch) | |
tree | 02fe8f1eb47e421b3be3003238a584a7533dc552 /crawl-ref/source | |
parent | 9033470b12d90d2f12d255720e76389166f7f566 (diff) | |
download | crawl-ref-9434334816f9a2404a18876899d74df04daab77f.tar.gz crawl-ref-9434334816f9a2404a18876899d74df04daab77f.zip |
Show status captions in brown by default with an option to change it. We probably want to move the status area code to Lua eventually.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3378 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/externs.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 31 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 2 |
4 files changed, 32 insertions, 12 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 68a7411044..08ca29e614 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1655,6 +1655,7 @@ public: unsigned detected_monster_colour; // Colour of detected monsters unsigned detected_item_colour; // Colour of detected items + unsigned status_caption_colour; // Colour of captions in HUD. unsigned heap_brand; // Highlight heaps of items unsigned stab_brand; // Highlight monsters that are stabbable diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index c4530e341a..d270bb5dab 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -693,6 +693,7 @@ void game_options::reset_options() // [ds] Default to jazzy colours. detected_item_colour = GREEN; detected_monster_colour= LIGHTRED; + status_caption_colour = BROWN; #ifdef USE_TILE classic_item_colours = true; @@ -1915,6 +1916,15 @@ void game_options::read_option_line(const std::string &str, bool runscript) // here as well. heap_brand = curses_attribute(field); } + else if (key == "status_caption_colour") + { + const int col = str_to_colour( field ); + if (col != -1) + status_caption_colour = col; + else + crawl_state.add_startup_error( + make_stringf("Bad status_caption_colour -- %s\n", field.c_str())); + } else if (key == "weapon") { // choose this weapon for classes that get choice diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index d0c04879f1..f894e5b16b 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -427,9 +427,8 @@ void print_stats(void) if (you.wield_change) { cgotoxy(1, 13, GOTO_STAT); - clear_to_end_of_line(); - cgotoxy(1, 13, GOTO_STAT); - + textcolor(Options.status_caption_colour); + cprintf("Wp: "); if (you.weapon()) { const item_def& wpn = *you.weapon(); @@ -440,7 +439,9 @@ void print_stats(void) if (prefcol != -1) textcolor(prefcol); - cprintf("%s", wpn.name(DESC_INVENTORY, true).substr(0,38).c_str()); + cprintf("%s", + wpn.name(DESC_INVENTORY, true) + .substr(0, crawl_view.hudsz.x - 5).c_str()); textcolor(LIGHTGREY); } else @@ -457,32 +458,38 @@ void print_stats(void) cprintf("Nothing wielded"); } } + clear_to_end_of_line(); you.wield_change = false; } if (you.quiver_change) { cgotoxy(1, 14, GOTO_STAT); - clear_to_end_of_line(); - cgotoxy(1, 14, GOTO_STAT); - + textcolor(Options.status_caption_colour); + cprintf("Qv: "); + int q = you.quiver[get_quiver_type()] = get_fire_item_index(); - if (q == ENDOFPACK) - cprintf("Nothing quivered"); - else + if (q != ENDOFPACK) { const item_def& quiver = you.inv[q]; textcolor(quiver.colour); const std::string prefix = menu_colour_item_prefix(quiver); - const int prefcol = menu_colour(quiver.name(DESC_INVENTORY), prefix); + const int prefcol = + menu_colour(quiver.name(DESC_INVENTORY), prefix); if (prefcol != -1) textcolor(prefcol); - cprintf("%s", quiver.name(DESC_INVENTORY, true).substr(0,38).c_str()); + cprintf("%s", + quiver.name(DESC_INVENTORY, true) + .substr(0, crawl_view.hudsz.x - 5) + .c_str()); textcolor(LIGHTGREY); } + else + textcolor(LIGHTGREY); + clear_to_end_of_line(); you.quiver_change = false; } diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 67755afb61..0c4d5044f8 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -2471,6 +2471,7 @@ void draw_border(void) species_name( you.species, you.experience_level ).c_str(), (you.wizard ? "*WIZARD*" : "" ) ); + textcolor(Options.status_caption_colour); cgotoxy(1, 3, GOTO_STAT); cprintf("HP:"); cgotoxy(1, 4, GOTO_STAT); cprintf("Magic:"); cgotoxy(1, 5, GOTO_STAT); cprintf("AC:"); @@ -2485,6 +2486,7 @@ void draw_border(void) cprintf("Turn:"); } cgotoxy(1, 11, GOTO_STAT); cprintf("Experience:"); + textcolor(LIGHTGREY); cgotoxy(1, 12, GOTO_STAT); cprintf("Level"); } // end draw_border() |