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