diff options
author | Paul Gilbert | 2016-04-10 17:09:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:10:52 -0400 |
commit | cf785a19e3dbe52eb71b253a5dcdcd7ba77b47ca (patch) | |
tree | a294e26f39bf157d4a6e2abbc8eb29ae9df5ed46 /engines/titanic/pet_control/pet_control.h | |
parent | 91336a86115f600e626c333441aa1369b435ab92 (diff) | |
download | scummvm-rg350-cf785a19e3dbe52eb71b253a5dcdcd7ba77b47ca.tar.gz scummvm-rg350-cf785a19e3dbe52eb71b253a5dcdcd7ba77b47ca.tar.bz2 scummvm-rg350-cf785a19e3dbe52eb71b253a5dcdcd7ba77b47ca.zip |
TITANIC: Implement drag&drop dropping
Diffstat (limited to 'engines/titanic/pet_control/pet_control.h')
-rw-r--r-- | engines/titanic/pet_control/pet_control.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 172cec9bf7..39bc5fb41b 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -182,6 +182,20 @@ public: * Draws the indent */ void drawIndent(CScreenManager *screenManager, int indent); + + /** + * Returns true if the point is within the PET's draw bounds + */ + bool contains(const Point &pt) const { + return _drawBounds.contains(pt); + } + + /** + * Handles drag ends within the PET + */ + CTreeItem *dragEnd(const Point &pt) const { + return _currentArea == PET_INVENTORY ? _inventory.dragEnd(pt) : nullptr; + } }; } // End of namespace Titanic |