diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/acr.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/libgui.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/menu.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 2 |
6 files changed, 43 insertions, 13 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 1aeb3e30e1..bad82f21bd 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3339,9 +3339,9 @@ keycode_type get_next_keycode() #ifdef USE_TILE tile_draw_inv(-1, REGION_INV1); -#ifdef USE_X11 + #ifdef USE_X11 update_screen(); -#endif + #endif mouse_set_mode(MOUSE_MODE_COMMAND); keyin = unmangle_direction_keys(getch_with_command_macros()); mouse_set_mode(MOUSE_MODE_NORMAL); diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 552bec13fd..b9dd3f493e 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -651,7 +651,7 @@ void game_options::reset_options() easy_unequip = true; easy_butcher = true; always_confirm_butcher = false; - list_rotten = false; + list_rotten = true; easy_confirm = CONFIRM_SAFE_EASY; easy_quit_item_prompts = true; hp_warning = 10; @@ -1778,6 +1778,10 @@ void game_options::read_option_line(const std::string &str, bool runscript) { always_confirm_butcher = read_bool( field, always_confirm_butcher ); } + else if (key == "list_rotten") + { + list_rotten = read_bool( field, list_rotten ); + } else if (key == "lua_file" && runscript) { #ifdef CLUA_BINDINGS diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index fcf3b7da03..8e31a5e8ff 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -20,6 +20,9 @@ #include "AppHdr.h" #include "items.h" +#ifdef USE_TILE + #include "cio.h" +#endif #include "clua.h" #include <string.h> @@ -1220,10 +1223,18 @@ void pickup() { mprf(MSGCH_PROMPT, "Pick up %s? (y/n/a/*?g,/q)", mitm[o].name(DESC_NOCAP_A).c_str() ); +#ifndef USE_TILE keyin = get_ch(); +#else + keyin = getch_ck(); +#endif } - if (keyin == '*' || keyin == '?' || keyin == ',' || keyin == 'g') + if (keyin == '*' || keyin == '?' || keyin == ',' || keyin == 'g' +#ifdef USE_TILE + || keyin == CK_MOUSE_B1 +#endif + ) { pickup_menu(o); break; diff --git a/crawl-ref/source/libgui.cc b/crawl-ref/source/libgui.cc index bf0b31b6c1..6f064957a4 100644 --- a/crawl-ref/source/libgui.cc +++ b/crawl-ref/source/libgui.cc @@ -1362,8 +1362,14 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init) desc += "Remove (R)"; break; case OBJ_MISSILES: - desc += "Throw (t)"; + { + const item_def *weapon = you.weapon(); + if (weapon && you.inv[ix].launched_by(*weapon)) + desc += "Fire (f)"; + else + desc += "Throw (t)"; break; + } case OBJ_WANDS: desc += "Zap (z)"; break; @@ -1455,9 +1461,10 @@ static int handle_mouse_motion(int mouse_x, int mouse_y, bool init) desc += " ("; desc += get_species_abbrev(you.species); desc += get_class_abbrev(you.char_class); - desc += ")" EOL; - - desc += EOL "[L-Click] Search 1 turn"; + desc += ")"; + + if (igrd[you.x_pos][you.y_pos] != NON_ITEM) + desc += EOL "[L-Click] Pick up items (g)"; if (grid_stair_direction( grd[gx][gy] ) != CMD_NO_CMD) desc += EOL "[Shift-L-Click] use stairs (</>)"; @@ -1649,9 +1656,9 @@ static int handle_mouse_button(int mx, int my, int button, { if (button == 1 && cx == DCX && cy == DCY) { - // spend one turn resting/searching + // pick up items if (!shift) - return 's'; + return 'g'; // else attempt to use stairs on square const int gx = view2gridX(cx) + 1; @@ -1837,9 +1844,11 @@ int getch() int keyin = getch_ck(); if (keyin >= CK_UP && keyin <= CK_CTRL_PGDN) - return ck_tr[ keyin - CK_UP ]; + return ck_tr[ keyin - CK_UP ]; + if (keyin == CK_DELETE) - return '.'; + return '.'; + return keyin; } diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc index 48aa0100bc..1b2b658ab0 100644 --- a/crawl-ref/source/menu.cc +++ b/crawl-ref/source/menu.cc @@ -176,10 +176,16 @@ bool Menu::process_key( int keyin ) case CK_ENTER: return false; case CK_ESCAPE: +#ifdef USE_TILE + case CK_MOUSE_B2: +#endif sel.clear(); lastch = keyin; return false; case ' ': case CK_PGDN: case '>': case '\'': +#ifdef USE_TILE + case CK_MOUSE_B1: +#endif nav = true; repaint = page_down(); if (!repaint && !is_set(MF_EASY_EXIT) && !is_set(MF_NOWRAP)) diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 475ca9db31..be59b14ad6 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -119,7 +119,7 @@ int draw_colour_bar(int val, int max_val, int old_val, int old_disp, // Don't redraw colour bars during running/resting // *unless* we'll stop doing so after that - if (you.running > 1 && val != max_val) + if (you.running > 1 && is_resting() && val != max_val) return -1; const int width = crawl_view.hudsz.x - ox - 1; |