Skip to content

Commit df244aa

Browse files
Falconneangavrilov
authored andcommitted
Disable mouse query when linking levers.
Update mousequery plugin version.
1 parent 4034df3 commit df244aa

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

plugins/mousequery.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using namespace df::enums::ui_sidebar_mode;
2828

2929
DFHACK_PLUGIN("mousequery");
3030

31-
#define PLUGIN_VERSION 0.17
31+
#define PLUGIN_VERSION 0.18
3232

3333
static int32_t last_clicked_x, last_clicked_y, last_clicked_z;
3434
static int32_t last_pos_x, last_pos_y, last_pos_z;
@@ -539,6 +539,13 @@ struct mousequery_hook : public df::viewscreen_dwarfmodest
539539
if (mx < 1 || mx > right_margin - 2 || my < 1 || my > gps->dimy - 2)
540540
mpos_valid = false;
541541

542+
// Check if in lever binding mode
543+
if (Gui::getFocusString(Core::getTopViewscreen()) ==
544+
"dwarfmode/QueryBuilding/Some/Lever/AddJob")
545+
{
546+
return;
547+
}
548+
542549
if (mpos_valid)
543550
{
544551
if (mpos.x != last_move_pos.x || mpos.y != last_move_pos.y || mpos.z != last_move_pos.z)

0 commit comments

Comments
 (0)