Disable mouse query when linking levers.

Update mousequery plugin version.
develop
Anuradha Dissanayake 2014-06-01 22:13:36 +12:00 committed by Alexander Gavrilov
parent 4034df3560
commit df244aa7a4
1 changed files with 8 additions and 1 deletions

@ -28,7 +28,7 @@ using namespace df::enums::ui_sidebar_mode;
DFHACK_PLUGIN("mousequery");
#define PLUGIN_VERSION 0.17
#define PLUGIN_VERSION 0.18
static int32_t last_clicked_x, last_clicked_y, last_clicked_z;
static int32_t last_pos_x, last_pos_y, last_pos_z;
@ -539,6 +539,13 @@ struct mousequery_hook : public df::viewscreen_dwarfmodest
if (mx < 1 || mx > right_margin - 2 || my < 1 || my > gps->dimy - 2)
mpos_valid = false;
// Check if in lever binding mode
if (Gui::getFocusString(Core::getTopViewscreen()) ==
"dwarfmode/QueryBuilding/Some/Lever/AddJob")
{
return;
}
if (mpos_valid)
{
if (mpos.x != last_move_pos.x || mpos.y != last_move_pos.y || mpos.z != last_move_pos.z)