MOHAWK: Destroying an LBGroupItem destroys the whole group.

This commit is contained in:
Alyssa Milburn 2011-03-29 15:09:15 +02:00
parent ad7b6f6817
commit bd526aac1d
2 changed files with 11 additions and 0 deletions

View File

@ -2909,6 +2909,16 @@ void LBGroupItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStre
}
}
void LBGroupItem::destroySelf() {
LBItem::destroySelf();
for (uint i = 0; i < _groupEntries.size(); i++) {
LBItem *item = _vm->getItemById(_groupEntries[i].entryId);
if (item)
item->destroySelf();
}
}
void LBGroupItem::setEnabled(bool enabled) {
if (_starting) {
_starting = false;

View File

@ -424,6 +424,7 @@ public:
void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
void destroySelf();
void setEnabled(bool enabled);
void setGlobalEnabled(bool enabled);
bool contains(Common::Point point);