mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-28 15:26:12 +00:00
Fixed access of inventory in HoF while cursor is not visible.
svn-id: r31081
This commit is contained in:
parent
353e5a7896
commit
3a83cf654e
engines/kyra
@ -572,7 +572,9 @@ int KyraEngine_v2::processButtonList(Button *buttonList, uint16 inputFlag) {
|
||||
}
|
||||
|
||||
int KyraEngine_v2::buttonInventory(Button *button) {
|
||||
//XXX test if cursor is shown
|
||||
if (!_screen->isMouseShown())
|
||||
return 0;
|
||||
|
||||
int inventorySlot = button->index - 6;
|
||||
|
||||
uint16 item = _mainCharacter.inventory[inventorySlot];
|
||||
|
@ -2300,6 +2300,10 @@ void Screen::showMouse() {
|
||||
_mouseLockCount--;
|
||||
}
|
||||
|
||||
bool Screen::isMouseShown() const {
|
||||
return (_mouseLockCount == 0);
|
||||
}
|
||||
|
||||
void Screen::setShapePages(int page1, int page2) {
|
||||
debugC(9, kDebugLevelScreen, "Screen::setShapePages(%d, %d)", page1, page2);
|
||||
_shapePages[0] = _pagePtrs[page1];
|
||||
|
@ -182,6 +182,7 @@ public:
|
||||
void hideMouse();
|
||||
void showMouse();
|
||||
void setMouseCursor(int x, int y, byte *shape);
|
||||
bool isMouseShown() const;
|
||||
|
||||
// rect handling
|
||||
virtual int getRectSize(int w, int h);
|
||||
|
Loading…
x
Reference in New Issue
Block a user