aboutsummaryrefslogtreecommitdiff
path: root/gui/about.cpp
diff options
context:
space:
mode:
authorVicent Marti2008-10-09 11:49:35 +0000
committerVicent Marti2008-10-09 11:49:35 +0000
commit1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1 (patch)
tree3b454a1b1e0dca09eada21287ed7b7e8a7cf4226 /gui/about.cpp
parent5dd381932f3ed501a27fe97f48ef30331b2924d5 (diff)
parent000eedb0737dbe400d016edf213928dbb1a227d3 (diff)
downloadscummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.tar.gz
scummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.tar.bz2
scummvm-rg350-1f2ce8b1881078b3de82b63f8ecdc1777f4ab9d1.zip
Manual merge of the GSoC2008 GUI branch. (71 files)
svn-id: r34757
Diffstat (limited to 'gui/about.cpp')
-rw-r--r--gui/about.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/gui/about.cpp b/gui/about.cpp
index 99469b9ae4..1c1e3a3355 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -29,10 +29,11 @@
#include "common/system.h"
#include "common/util.h"
#include "gui/about.h"
-#include "gui/eval.h"
#include "gui/newgui.h"
#include "gui/widget.h"
+#include "gui/ThemeEval.h"
+
namespace GUI {
enum {
@@ -85,9 +86,9 @@ AboutDialog::AboutDialog()
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
- _xOff = g_gui.evaluator()->getVar("aboutXOff");
- _yOff = g_gui.evaluator()->getVar("aboutYOff");
- int outerBorder = g_gui.evaluator()->getVar("aboutOuterBorder");
+ _xOff = g_gui.xmlEval()->getVar("Globals.About.XOffset", 5);
+ _yOff = g_gui.xmlEval()->getVar("Globals.About.YOffset", 5);
+ int outerBorder = g_gui.xmlEval()->getVar("Globals.About.OuterBorder");
_w = screenW - 2 * outerBorder;
_h = screenH - 2 * outerBorder;
@@ -203,7 +204,7 @@ void AboutDialog::close() {
}
void AboutDialog::drawDialog() {
- g_gui.theme()->setDrawArea(Common::Rect(_x, _y, _x+_w, _y+_h));
+// g_gui.theme()->setDrawArea(Common::Rect(_x, _y, _x+_w, _y+_h));
Dialog::drawDialog();
// Draw text
@@ -265,10 +266,10 @@ void AboutDialog::drawDialog() {
while (*str && *str == ' ')
str++;
- g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()), str, state, align, false, 0, false);
+ if (y > _y && y + g_gui.theme()->getFontHeight() < _y + _h)
+ g_gui.theme()->drawText(Common::Rect(_x + _xOff, y, _x + _w - _xOff, y + g_gui.theme()->getFontHeight()), str, state, align, false, 0, false);
y += _lineHeight;
}
- g_gui.theme()->resetDrawArea();
}
void AboutDialog::handleTickle() {
@@ -316,9 +317,9 @@ void AboutDialog::reflowLayout() {
const int screenW = g_system->getOverlayWidth();
const int screenH = g_system->getOverlayHeight();
- _xOff = g_gui.evaluator()->getVar("aboutXOff");
- _yOff = g_gui.evaluator()->getVar("aboutYOff");
- int outerBorder = g_gui.evaluator()->getVar("aboutOuterBorder");
+ _xOff = g_gui.xmlEval()->getVar("Globals.About.XOffset", 5);
+ _yOff = g_gui.xmlEval()->getVar("Globals.About.YOffset", 5);
+ int outerBorder = g_gui.xmlEval()->getVar("Globals.About.OuterBorder");
_w = screenW - 2 * outerBorder;
_h = screenH - 2 * outerBorder;