MM: MM1: Fix clicking buttons in Cast Spell view

This commit is contained in:
Paul Gilbert 2023-02-23 22:06:57 -08:00
parent d211530d10
commit 3a79bede8e
2 changed files with 8 additions and 4 deletions

View File

@ -49,10 +49,11 @@ bool PartyView::msgUnfocus(const UnfocusMessage &msg) {
bool PartyView::msgMouseDown(const MouseDownMessage &msg) {
if (canSwitchChar()) {
return send("GameParty", msg);
} else {
return ScrollView::msgMouseDown(msg);
if (send("GameParty", msg))
return true;
}
return ScrollView::msgMouseDown(msg);
}
bool PartyView::msgGame(const GameMessage &msg) {

View File

@ -199,7 +199,10 @@ bool ScrollView::msgMouseUp(const MouseUpMessage &msg) {
int ScrollView::getButtonAt(const Common::Point &pos) {
for (uint i = 0; i < _buttons.size(); ++i) {
if (_buttons[i]._bounds.contains(pos))
Common::Rect r = _buttons[i]._bounds;
r.translate(_innerBounds.left, _innerBounds.top);
if (r.contains(pos))
return i;
}