mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-24 02:36:27 +00:00
DIRECTOR: Correct MouseDown Event Handler and fix switch statements missing breaks.
This commit is contained in:
parent
7ac78c9172
commit
27ec158e04
@ -577,8 +577,10 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
|
||||
switch (_sprites[i]->_cast->_type) {
|
||||
case kCastButton:
|
||||
castType = kCastButton;
|
||||
break;
|
||||
default:
|
||||
castType = kCastShape;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
castType = kCastShape;
|
||||
@ -591,6 +593,7 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
|
||||
case kCheckboxSprite:
|
||||
case kRadioButtonSprite:
|
||||
castType = kCastButton;
|
||||
break;
|
||||
default:
|
||||
warning("Frame::renderSprites(): Unhandled sprite type %d", _sprites[i]->_spriteType);
|
||||
break;
|
||||
|
@ -174,7 +174,7 @@ void Lingo::processInputEvent(LEvent event) {
|
||||
processEvent(event, kCastScript, currentFrame->_sprites[spriteId]->_castId);
|
||||
processEvent(event, kFrameScript, score->_frames[score->getCurrentFrame()]->_actionId);
|
||||
// TODO: Is the kFrameScript call above correct?
|
||||
} else if (event == kEventMouseUp || event == kEventMouseDown) {
|
||||
} else if (event == kEventMouseUp) {
|
||||
// Frame script overrides sprite script
|
||||
if (!currentFrame->_sprites[spriteId]->_scriptId) {
|
||||
processEvent(kEventNone, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + score->_castIDoffset);
|
||||
@ -182,6 +182,8 @@ void Lingo::processInputEvent(LEvent event) {
|
||||
} else {
|
||||
processEvent(kEventNone, kFrameScript, currentFrame->_sprites[spriteId]->_scriptId);
|
||||
}
|
||||
} else if (event == kEventMouseDown) {
|
||||
processEvent(event, kSpriteScript, currentFrame->_sprites[spriteId]->_castId + score->_castIDoffset);
|
||||
}
|
||||
if (event == kEventKeyDown) {
|
||||
// TODO: is the above condition necessary or useful?
|
||||
|
Loading…
Reference in New Issue
Block a user