Fixed bug where turning off the hud in a multi-page status screen would result in the More and Back selections remaining, even if the equipment could fit in one page. Resolves issue #166.

This commit is contained in:
AnotherCommander 2016-04-04 21:14:36 +02:00
parent 6bce31b816
commit 5b1289ed38

View File

@ -1212,6 +1212,21 @@ static OOTextureSprite *NewTextureSpriteWithDescriptor(NSDictionary *descriptor)
{
statusPage = pageCount; // one page
start = 0;
// if we have mouse interaction active, it means that we had more than one
// pages earlier, but only one now, as e.g. in the case of a hud that wss
// subsequently hidden, resulting in the equip list fitting in one page,
// so we need to deactivate it
if (OOMouseInteractionModeIsUIScreen([[UNIVERSE gameController] mouseInteractionMode]))
{
// clear the gui-more and gui-back key rows first
[self setText:@"" forRow:firstRow];
[self setKey:GUI_KEY_SKIP forRow:firstRow];
[self setText:@"" forRow:firstRow + STATUS_EQUIPMENT_MAX_ROWS];
[self setKey:GUI_KEY_SKIP forRow:firstRow + STATUS_EQUIPMENT_MAX_ROWS];
[self setSelectableRange:NSMakeRange(0,0)];
[UNIVERSE enterGUIViewModeWithMouseInteraction:NO];
}
}
if (statusPage > 1)