[Scummvm-git-logs] scummvm master -> c6a705a7fec5fc676ee89a74e3c360052ca8b72e

dreammaster dreammaster at scummvm.org
Thu Feb 8 03:48:03 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c6a705a7fe XEEN: Clicking on party member glyphs, show Character Info dialog


Commit: c6a705a7fec5fc676ee89a74e3c360052ca8b72e
    https://github.com/scummvm/scummvm/commit/c6a705a7fec5fc676ee89a74e3c360052ca8b72e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-02-07T21:47:59-05:00

Commit Message:
XEEN: Clicking on party member glyphs, show Character Info dialog

Changed paths:
    engines/xeen/dialogs.cpp


diff --git a/engines/xeen/dialogs.cpp b/engines/xeen/dialogs.cpp
index 500f0f7..99f6401 100644
--- a/engines/xeen/dialogs.cpp
+++ b/engines/xeen/dialogs.cpp
@@ -64,13 +64,24 @@ void ButtonContainer::addPartyButtons(XeenEngine *vm) {
 
 bool ButtonContainer::checkEvents(XeenEngine *vm) {
 	EventsManager &events = *vm->_events;
+	Party &party = *vm->_party;
 	Windows &windows = *_vm->_windows;
 	_buttonValue = 0;
 
 	if (events._leftButton) {
-		// Check whether any button is selected
 		Common::Point pt = events._mousePos;
 
+		// Check for party member glyphs being clicked
+		Common::Rect r(0, 0, 32, 32);
+		for (uint idx = 0; idx < party._activeParty.size(); ++idx) {
+			r.moveTo(Res.CHAR_FACES_X[idx], 150);
+			if (r.contains(pt)) {
+				_buttonValue = Common::KEYCODE_F1 + idx;
+				break;
+			}
+		}
+
+		// Check whether any button is selected
 		for (uint i = 0; i < _buttons.size(); ++i) {
 			if (_buttons[i]._draw && _buttons[i]._bounds.contains(pt)) {
 				events.debounceMouse();





More information about the Scummvm-git-logs mailing list