mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
MM: MM1: Fix clicking buttons in Cast Spell view
This commit is contained in:
parent
d211530d10
commit
3a79bede8e
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user