mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
NEVERHOOD: Skip creating hotbox for "making of" is it's unavailable.
Otherwise it creates an invisible button that can still be clicked and results in a button press animation followed by a brief read screen. Reported by: -=CHE@TER=-
This commit is contained in:
parent
31618a13f5
commit
d3f87c97ee
@ -344,6 +344,13 @@ uint32 MenuButton::handleMessage(int messageNum, const MessageParam ¶m, Enti
|
||||
return messageResult;
|
||||
}
|
||||
|
||||
bool MainMenu::hasMakingOf() const {
|
||||
for (uint i = 0; kMakingOfSmackerFileHashList[i]; i++)
|
||||
if (_vm->_res->exists(kMakingOfSmackerFileHashList[i]))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
MainMenu::MainMenu(NeverhoodEngine *vm, Module *parentModule)
|
||||
: Scene(vm, parentModule) {
|
||||
|
||||
@ -382,6 +389,8 @@ MainMenu::MainMenu(NeverhoodEngine *vm, Module *parentModule)
|
||||
insertStaticSprite(0x0C24C0EE, 100); // "Music is off" button
|
||||
|
||||
for (uint buttonIndex = 0; buttonIndex < 9; ++buttonIndex) {
|
||||
if (buttonIndex == kMainMenuMakingOf && !hasMakingOf())
|
||||
continue;
|
||||
Sprite *menuButton = insertSprite<MenuButton>(this, buttonIndex,
|
||||
kMenuButtonFileHashes[buttonIndex], kMenuButtonCollisionBounds[buttonIndex]);
|
||||
addCollisionSprite(menuButton);
|
||||
|
@ -78,6 +78,7 @@ protected:
|
||||
class MainMenu : public Scene {
|
||||
public:
|
||||
MainMenu(NeverhoodEngine *vm, Module *parentModule);
|
||||
bool hasMakingOf() const;
|
||||
protected:
|
||||
uint32 handleMessage(int messageNum, const MessageParam ¶m, Entity *sender);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user