diff options
| author | lukaslw | 2014-06-15 16:15:55 +0200 | 
|---|---|---|
| committer | lukaslw | 2014-06-22 20:09:07 +0200 | 
| commit | e3b5c0ecccd6516fca4dec1b487042b2bcaab9c7 (patch) | |
| tree | 3691bfd104e719b693a5b7d9e3cca78391dafd95 | |
| parent | ca7554dae3bfce513d6a0b92be1274e168b60a87 (diff) | |
| download | scummvm-rg350-e3b5c0ecccd6516fca4dec1b487042b2bcaab9c7.tar.gz scummvm-rg350-e3b5c0ecccd6516fca4dec1b487042b2bcaab9c7.tar.bz2 scummvm-rg350-e3b5c0ecccd6516fca4dec1b487042b2bcaab9c7.zip | |
PRINCE: Options menu outside of inventory
| -rw-r--r-- | engines/prince/option_text.h | 2 | ||||
| -rw-r--r-- | engines/prince/prince.cpp | 27 | ||||
| -rw-r--r-- | engines/prince/prince.h | 6 | 
3 files changed, 25 insertions, 10 deletions
| diff --git a/engines/prince/option_text.h b/engines/prince/option_text.h index 13178d9840..0a1548a8a5 100644 --- a/engines/prince/option_text.h +++ b/engines/prince/option_text.h @@ -59,7 +59,7 @@ const char optionsTextDE[7][17] = {  	"Wegnehmen",  	"Benutzen",  	"\x84""ffnen/Sto\x7f""en", -	"Schlie\x7""en/Ziehen", +	"Schlie\x7f""en/Ziehen",  	"Ansprechen"  }; diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index 12d9961583..6d6f3fe8ef 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -1355,8 +1355,11 @@ void PrinceEngine::drawScreen() {  		playNextFrame();  		if (!_inventoryBackgroundRemember) { -			_selectedMob = hotspot(_graph->_frontScreen, _mobList); +			if (!_optionsFlag) { +				_selectedMob = hotspot(_graph->_frontScreen, _mobList); +			}  			showTexts(_graph->_frontScreen); +			checkOptions();  		} else {  			_inventoryBackgroundRemember = false;  		} @@ -1597,7 +1600,13 @@ void PrinceEngine::drawInvItems() {  	}  } -void PrinceEngine::inventoryLeftButton() { +void PrinceEngine::rightMouseButton() { +	if (_currentPointerNumber < 2) { +		enableOptions(); +	} +} + +void PrinceEngine::inventoryLeftMouseButton() {  	if (_optionsFlag == 1) {  		//check_opt  		if (_selectedMob != 0)  { @@ -1695,7 +1704,7 @@ void PrinceEngine::inventoryLeftButton() {  	_optionsMob = 0;  } -void PrinceEngine::inventoryRightButton() { +void PrinceEngine::inventoryRightMouseButton() {  	enableOptions();  } @@ -1776,7 +1785,7 @@ void PrinceEngine::checkOptions() {  			};  			uint16 textW = getTextWidth(optText.c_str());  			uint16 textX = _optionsX + _optionsWidth / 2 - textW / 2; -			_font->drawString(_graph->_screenForInventory, optText, textX, textY, textW, optionsColor); +			_font->drawString(_graph->_frontScreen, optText, textX, textY, textW, optionsColor);  			textY += _optionsStep;  		}  	} @@ -1879,7 +1888,7 @@ void PrinceEngine::displayInventory() {  			break;  		} -		if (!_optionsFlag) { // test this +		if (!_optionsFlag) {  			_selectedMob = hotspot(_graph->_screenForInventory, _invMobList);  		} @@ -1897,12 +1906,13 @@ void PrinceEngine::displayInventory() {  			case Common::EVENT_MOUSEMOVE:  				break;  			case Common::EVENT_LBUTTONDOWN: -				inventoryLeftButton(); +				inventoryLeftMouseButton();  				break;  			case Common::EVENT_RBUTTONDOWN: -				inventoryRightButton(); +				inventoryRightMouseButton();  				break;  			case Common::EVENT_LBUTTONUP: +				break;  			case Common::EVENT_RBUTTONUP:  				break;  			case Common::EVENT_QUIT: @@ -1944,9 +1954,12 @@ void PrinceEngine::mainLoop() {  			case Common::EVENT_MOUSEMOVE:  				break;  			case Common::EVENT_LBUTTONDOWN: +				break;  			case Common::EVENT_RBUTTONDOWN: +				rightMouseButton();  				break;  			case Common::EVENT_LBUTTONUP: +				break;  			case Common::EVENT_RBUTTONUP:  				break;  			case Common::EVENT_QUIT: diff --git a/engines/prince/prince.h b/engines/prince/prince.h index 80666b47a9..0f541517cb 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -336,8 +336,10 @@ public:  	void enableOptions();  	void checkOptions();  	void checkInvOptions(); -	void inventoryLeftButton(); -	void inventoryRightButton(); + +	void rightMouseButton(); +	void inventoryLeftMouseButton(); +	void inventoryRightMouseButton();  	int testAnimNr;  	int testAnimFrame; | 
