Merge pull request #376 from lethosor/mousequery-z-level-fix

Fix selection behavior of mousequery on lowest z-level
develop
expwnent 2014-11-09 00:37:46 -05:00
commit c9cf94128e
2 changed files with 12 additions and 2 deletions

@ -1,4 +1,6 @@
DFHack Future DFHack Future
Fixes:
- mousequery: Fixed behavior when selecting a tile on the lowest z-level
Internals: Internals:
- EventManager: deals with frame_counter getting reset properly now. - EventManager: deals with frame_counter getting reset properly now.
- modtools/item-trigger: fixed equip/unequip bug and corrected minor documentation error - modtools/item-trigger: fixed equip/unequip bug and corrected minor documentation error

@ -497,8 +497,16 @@ struct mousequery_hook : public df::viewscreen_dwarfmodest
return; return;
Gui::setCursorCoords(mpos.x, mpos.y, mpos.z); Gui::setCursorCoords(mpos.x, mpos.y, mpos.z);
sendKey(interface_key::CURSOR_DOWN_Z); if (mpos.z == 0)
sendKey(interface_key::CURSOR_UP_Z); {
sendKey(interface_key::CURSOR_UP_Z);
sendKey(interface_key::CURSOR_DOWN_Z);
}
else
{
sendKey(interface_key::CURSOR_DOWN_Z);
sendKey(interface_key::CURSOR_UP_Z);
}
} }
bool inBuildPlacement() bool inBuildPlacement()