From 62de2d9edc7eb51240d944e7a3bfcf894519f5d4 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Thu, 16 Jul 2009 17:51:12 +0000 Subject: Fixed bug: In-game console doesn't stay centered when switching resolutions on the fly. svn-id: r42540 --- gui/console.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui/console.cpp') diff --git a/gui/console.cpp b/gui/console.cpp index e33aa9d9fe..498d1767a6 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -112,6 +112,7 @@ void ConsoleDialog::init() { _w = _w - _w / 20; _h = _h * kConsoleLineHeight + 2; + _x = _w / 40; // Set scrollbar dimensions int scrollBarWidth = g_gui.xmlEval()->getVar("Globals.Scrollbar.Width", 0); @@ -149,8 +150,8 @@ void ConsoleDialog::open() { if (_w != w || _h != h) init(); - _x = _w / 40; _y = -_h; + _slideTime = g_system->getMillis(); _slideMode = kDownSlideMode; -- cgit v1.2.3