Fix custom disposition button

This commit is contained in:
Alexander Batalov 2022-12-28 17:33:01 +03:00
parent c2c26db5d9
commit 57dcf42b5c
1 changed files with 10 additions and 5 deletions

View File

@ -3758,7 +3758,11 @@ void partyMemberControlWindowHandleEvents()
return;
}
} else if (keyCode == -2) {
if (_mouse_click_in(441, 451, 540, 470)) {
// CE: Minor improvement - handle on mouse up (just like other
// buttons). Also fixed active button area (in original code
// it's slightly smaller than the button itself).
if ((mouseGetEvent() & MOUSE_EVENT_LEFT_BUTTON_UP) != 0) {
if (mouseHitTestInWindow(gGameDialogWindow, 438, 156, 438 + 109, 156 + 28)) {
aiSetDisposition(gGameDialogSpeaker, 0);
_dialogue_state = 13;
_dialogue_switch_mode = 11;
@ -3766,6 +3770,7 @@ void partyMemberControlWindowHandleEvents()
}
}
}
}
renderPresent();
sharedFpsLimiter.throttle();