From 31d1385d652101bba41f19b18bd6d055874b3914 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 11 Oct 2011 21:24:33 +1100 Subject: TSAGE: Bugfix for drawing UI correctly when in a side scrolling screen --- engines/tsage/blue_force/blueforce_ui.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines') diff --git a/engines/tsage/blue_force/blueforce_ui.cpp b/engines/tsage/blue_force/blueforce_ui.cpp index fb4008d2c1..9df5c93014 100644 --- a/engines/tsage/blue_force/blueforce_ui.cpp +++ b/engines/tsage/blue_force/blueforce_ui.cpp @@ -255,6 +255,10 @@ void UICollection::resetClear() { void UICollection::draw() { if (_visible) { + // Temporarily reset the sceneBounds when drawing UI elements to force them on-screen + Rect savedBounds = g_globals->_sceneManager._scene->_sceneBounds; + g_globals->_sceneManager._scene->_sceneBounds = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + // Draw the elements onto the background for (uint idx = 0; idx < _objList.size(); ++idx) _objList[idx]->draw(); @@ -265,6 +269,7 @@ void UICollection::draw() { Rect(0, BF_INTERFACE_Y, SCREEN_WIDTH, SCREEN_HEIGHT)); _clearScreen = 1; + g_globals->_sceneManager._scene->_sceneBounds = savedBounds; } } -- cgit v1.2.3