diff options
-rw-r--r-- | crawl-ref/source/cio.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/cmd-keys.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/cmd-name.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/directn.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 6 | ||||
-rw-r--r-- | crawl-ref/source/tilesdl.cc | 6 |
6 files changed, 12 insertions, 17 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc index 64ec293350..fe4bbf23ac 100644 --- a/crawl-ref/source/cio.cc +++ b/crawl-ref/source/cio.cc @@ -173,10 +173,9 @@ int c_getch() void cursorxy(int x, int y) { #if defined(USE_TILE) -#if 0 - // TODO enne - handle this old use of place cursor - tile_place_cursor(x-1, y-1, true); -#endif + coord_def ep(x, y); + coord_def gc = view2grid(ep); + tiles.place_cursor(CURSOR_MOUSE, gc); #elif defined(UNIX) if (Options.use_fake_cursor) fakecursorxy(x, y); diff --git a/crawl-ref/source/cmd-keys.h b/crawl-ref/source/cmd-keys.h index cfeb71b1c9..abe9c486ff 100644 --- a/crawl-ref/source/cmd-keys.h +++ b/crawl-ref/source/cmd-keys.h @@ -157,9 +157,7 @@ {CK_MOUSE_MOVE, CMD_MOUSE_MOVE}, {CK_MOUSE_CLICK, CMD_MOUSE_CLICK}, -#ifdef USE_TILE {CK_MOUSE_MOVE, CMD_TARGET_MOUSE_MOVE}, {CK_MOUSE_CLICK, CMD_TARGET_MOUSE_SELECT}, -#endif {'\0', CMD_NO_CMD} diff --git a/crawl-ref/source/cmd-name.h b/crawl-ref/source/cmd-name.h index a044f5152a..5ed02439ba 100644 --- a/crawl-ref/source/cmd-name.h +++ b/crawl-ref/source/cmd-name.h @@ -184,10 +184,10 @@ {CMD_TARGET_WIZARD_GIVE_ITEM, "CMD_TARGET_WIZARD_GIVE_ITEM"}, {CMD_TARGET_WIZARD_MOVE, "CMD_TARGET_WIZARD_MOVE"}, {CMD_TARGET_WIZARD_PATHFIND, "CMD_TARGET_WIZARD_PATHFIND"}, -{CMD_TARGET_HELP, "CMD_TARGET_HELP"}, -#ifdef USE_TILE {CMD_TARGET_MOUSE_MOVE, "CMD_TARGET_MOUSE_MOVE"}, {CMD_TARGET_MOUSE_SELECT, "CMD_TARGET_MOUSE_SELECT"}, +{CMD_TARGET_HELP, "CMD_TARGET_HELP"}, +#ifdef USE_TILE {CMD_EDIT_PLAYER_TILE, "CMD_EDIT_PLAYER_TILE"}, #endif diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 31ea6df734..4e9ce1daf3 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -561,6 +561,7 @@ void direction(dist& moves, targeting_type restricts, } cursor_control con(!Options.use_fake_cursor); + mouse_control mc(MOUSE_MODE_TARGET); int dir = 0; bool show_beam = Options.show_beam && !just_looking && needs_path; @@ -642,7 +643,6 @@ void direction(dist& moves, targeting_type restricts, } else { - mouse_control mc(MOUSE_MODE_TARGET); key_command = beh->get_command(); } @@ -2733,8 +2733,6 @@ targeting_behaviour::~targeting_behaviour() int targeting_behaviour::get_key() { - mouse_control mc(MOUSE_MODE_TARGET_DIR); - if (!crawl_state.is_replaying_keys()) flush_input_buffer(FLUSH_BEFORE_COMMAND); diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 099cd925fd..c68cc8d488 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -619,14 +619,14 @@ enum command_type CMD_TARGET_WIZARD_GIVE_ITEM, CMD_TARGET_WIZARD_MOVE, CMD_TARGET_WIZARD_PATHFIND, + CMD_TARGET_MOUSE_MOVE, + CMD_TARGET_MOUSE_SELECT, CMD_TARGET_HELP, CMD_MAX_TARGET = CMD_TARGET_HELP, #ifdef USE_TILE - CMD_TARGET_MOUSE_MOVE, - CMD_MIN_TILE = CMD_TARGET_MOUSE_MOVE, - CMD_TARGET_MOUSE_SELECT, CMD_EDIT_PLAYER_TILE, + CMD_MIN_TILE = CMD_EDIT_PLAYER_TILE, CMD_MAX_TILE = CMD_EDIT_PLAYER_TILE, #endif diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc index a78f6bbf60..5b97e4d4b5 100644 --- a/crawl-ref/source/tilesdl.cc +++ b/crawl-ref/source/tilesdl.cc @@ -580,9 +580,9 @@ int TilesFramework::getch_ck() } } - bool show_tooltip = - ((ticks - m_last_tick_moved > Options.tile_tooltip_ms) - && ticks > m_last_tick_moved); + bool show_tooltip = ((ticks - m_last_tick_moved + > (unsigned int)Options.tile_tooltip_ms) + && ticks > m_last_tick_moved); if (show_tooltip) { |