diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-08 18:30:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-08 18:30:40 +0300 |
commit | 9a0da2510f9eed57e4bc974084bf54832ee4c33c (patch) | |
tree | 28dab1528da81c40a3ca648902b91d70f854a096 /src/dragdrop.h | |
parent | b930f7f858b0ad91206939ed1b6d5695bc10f9cc (diff) | |
download | manaplus-9a0da2510f9eed57e4bc974084bf54832ee4c33c.tar.gz manaplus-9a0da2510f9eed57e4bc974084bf54832ee4c33c.tar.bz2 manaplus-9a0da2510f9eed57e4bc974084bf54832ee4c33c.tar.xz manaplus-9a0da2510f9eed57e4bc974084bf54832ee4c33c.zip |
add support for sounds take and put.
"take" played if take item from container like inventory
"put" played if put item into container.
Diffstat (limited to 'src/dragdrop.h')
-rw-r--r-- | src/dragdrop.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h index d282d82e3..72c39a766 100644 --- a/src/dragdrop.h +++ b/src/dragdrop.h @@ -22,6 +22,7 @@ #define DRAGDROP_H #include "item.h" +#include "itemsoundmanager.h" #include "textcommand.h" #include "gui/widgets/skilldata.h" @@ -103,6 +104,7 @@ class DragDrop final mItemImage->incRef(); mSource = source; mTag = tag; + ItemSoundManager::playSfx(item, SOUND_EVENT_TAKE); } else { @@ -180,6 +182,8 @@ class DragDrop final { if (mItemImage) mItemImage->decRef(); + if (mItem) + ItemSoundManager::playSfx(mItem, SOUND_EVENT_PUT); mItem = 0; mItemColor = 1; mItemImage = nullptr; |