diff options
| author | Paul Gilbert | 2015-05-17 17:21:21 -0400 | 
|---|---|---|
| committer | Paul Gilbert | 2015-05-17 17:21:21 -0400 | 
| commit | f55ff7ba2184168bcbb3131a7ae978bc75032ff0 (patch) | |
| tree | dfc8ce3b3412a3adb42f70e51a0de68dd599cdd7 | |
| parent | f724cfcd22e4303d3c28dcca4e4789f5a21a09d6 (diff) | |
| download | scummvm-rg350-f55ff7ba2184168bcbb3131a7ae978bc75032ff0.tar.gz scummvm-rg350-f55ff7ba2184168bcbb3131a7ae978bc75032ff0.tar.bz2 scummvm-rg350-f55ff7ba2184168bcbb3131a7ae978bc75032ff0.zip  | |
SHERLOCK: Fix display of beveled background when entering Journal search
| -rw-r--r-- | engines/sherlock/journal.cpp | 6 | ||||
| -rw-r--r-- | engines/sherlock/screen.cpp | 14 | ||||
| -rw-r--r-- | engines/sherlock/screen.h | 1 | 
3 files changed, 16 insertions, 5 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 2a7aeb4f2d..d510738da0 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -1033,9 +1033,7 @@ int Journal::getFindName(bool printError) {  	screen.makeButton(Common::Rect(SEARCH_POINTS[2][0], yp, SEARCH_POINTS[2][1], yp + 10),  		SEARCH_POINTS[2][2] - screen.stringWidth("Forward") / 2, "Forward"); -	screen.gPrint(Common::Point(SEARCH_POINTS[0][2] - screen.stringWidth("Exit") / 2, yp), COMMAND_FOREGROUND, "E"); -	screen.gPrint(Common::Point(SEARCH_POINTS[1][2] - screen.stringWidth("Backward") / 2, yp), COMMAND_FOREGROUND, "B"); -	screen.gPrint(Common::Point(SEARCH_POINTS[2][2] - screen.stringWidth("Forward") / 2, yp), COMMAND_FOREGROUND, "F"); +	screen.makeField(Common::Rect(12, 185, 307, 196));  	screen.fillRect(Common::Rect(12, 185, 307, 186), BUTTON_BOTTOM);  	screen.vLine(12, 185, 195, BUTTON_BOTTOM); @@ -1160,7 +1158,7 @@ int Journal::getFindName(bool printError) {  				break;  			}  		} -	} while (!done); +	} while (!done && !_vm->shouldQuit());  	if (done != -1) {  		_find = name; diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp index cbf18f146f..c1c53fbe65 100644 --- a/engines/sherlock/screen.cpp +++ b/engines/sherlock/screen.cpp @@ -467,7 +467,7 @@ void Screen::buttonPrint(const Common::Point &pt, byte color, bool slamIt,  }  /** - * Draw a panel in th eback buffer with a raised area effect around the edges + * Draw a panel in the back buffer with a raised area effect around the edges   */  void Screen::makePanel(const Common::Rect &r) {  	_backBuffer->fillRect(r, BUTTON_MIDDLE); @@ -483,6 +483,18 @@ void Screen::makePanel(const Common::Rect &r) {  }  /** + * Draw a field in the back buffer with a raised area effect around the edges, + * suitable for text input. + */ +void Screen::makeField(const Common::Rect &r) { +	_backBuffer->fillRect(r, BUTTON_MIDDLE); +	_backBuffer->hLine(r.left, r.top, r.right - 1, BUTTON_BOTTOM); +	_backBuffer->hLine(r.left + 1, r.bottom - 1, r.right - 1, BUTTON_TOP); +	_backBuffer->vLine(r.left, r.top + 1, r.bottom - 1, BUTTON_BOTTOM); +	_backBuffer->vLine(r.right - 1, r.top + 1, r.bottom - 2, BUTTON_TOP); +} + +/**   * Sets the active back buffer pointer to a restricted sub-area of the first back buffer   */  void Screen::setDisplayBounds(const Common::Rect &r) { diff --git a/engines/sherlock/screen.h b/engines/sherlock/screen.h index 1f3c23748f..2103588fe0 100644 --- a/engines/sherlock/screen.h +++ b/engines/sherlock/screen.h @@ -123,6 +123,7 @@ public:  	void buttonPrint(const Common::Point &pt, byte color, bool slamIt, const Common::String &str);  	void makePanel(const Common::Rect &r); +	void makeField(const Common::Rect &r);  	void setDisplayBounds(const Common::Rect &r);  	void resetDisplayBounds();  | 
