diff options
| author | Eugene Sandulenko | 2016-04-19 12:51:15 +0200 | 
|---|---|---|
| committer | Eugene Sandulenko | 2016-04-19 12:51:15 +0200 | 
| commit | 9a4a8ac5eff671b5216f2e17d9876cfae57f8ab7 (patch) | |
| tree | 06dd27f32706f859be89a96ab4988c2c7d26b05f /engines/wage/gui.cpp | |
| parent | 6f03947bc940d9725727bcbcd80c07816a8dab49 (diff) | |
| download | scummvm-rg350-9a4a8ac5eff671b5216f2e17d9876cfae57f8ab7.tar.gz scummvm-rg350-9a4a8ac5eff671b5216f2e17d9876cfae57f8ab7.tar.bz2 scummvm-rg350-9a4a8ac5eff671b5216f2e17d9876cfae57f8ab7.zip  | |
WAGE: Fixed border highlights
Diffstat (limited to 'engines/wage/gui.cpp')
| -rw-r--r-- | engines/wage/gui.cpp | 19 | 
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 6f8c7c5efe..ffbd801f89 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -252,9 +252,19 @@ void Gui::draw() {  		return;  	} -	if (_scene != _engine->_world->_player->_currentScene) +	if (!_engine->_world->_player->_currentScene) +		return; + +	if (_scene != _engine->_world->_player->_currentScene) {  		_sceneDirty = true; +		_scene = _engine->_world->_player->_currentScene; + +		_sceneWindow->setDimensions(*_scene->_designBounds); +		_sceneWindow->setTitle(_scene->_name); +		_consoleWindow->setDimensions(*_scene->_textBounds); +	} +  	if (_sceneDirty || _bordersDirty) {  		drawDesktop();  		_wm.setFullRefresh(true); @@ -286,10 +296,6 @@ void Gui::drawScene() {  	if (!_sceneDirty && !_bordersDirty)  		return; -	_scene = _engine->_world->_player->_currentScene; - -	_sceneWindow->setDimensions(*_scene->_designBounds); -	_sceneWindow->setTitle(_scene->_name);  	_scene->paint(_sceneWindow->getSurface(), 0, 0);  	_sceneWindow->setDirty(true); @@ -317,7 +323,6 @@ void Gui::drawConsole() {  	if (!_consoleDirty && !_consoleFullRedraw && !_bordersDirty && !_sceneDirty)  		return; -	_consoleWindow->setDimensions(*_scene->_textBounds);  	renderConsole(_consoleWindow->getSurface(), Common::Rect(kBorderWidth - 2, kBorderWidth - 2,  				_scene->_textBounds->width() - kBorderWidth, _scene->_textBounds->height() - kBorderWidth));  	_consoleWindow->setDirty(true); @@ -333,8 +338,6 @@ static void consoleWindowCallback(WindowClick click, Common::Event &event, void  		gui->_consoleWindow->setScroll(scrollPos, scrollSize); -		warning("pos: %f size: %f", scrollPos, scrollSize); -  		return;  	}  }  | 
