aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/TabWidget.cpp14
-rw-r--r--gui/TabWidget.h3
-rw-r--r--gui/themes/default.inc6
-rw-r--r--gui/themes/scummclassic.zipbin55015 -> 55147 bytes
-rw-r--r--gui/themes/scummclassic/classic_layout.stx3
-rw-r--r--gui/themes/scummclassic/classic_layout_lowres.stx3
-rw-r--r--gui/themes/scummmodern.zipbin162447 -> 162581 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx5
-rw-r--r--gui/themes/scummmodern/scummmodern_layout_lowres.stx3
9 files changed, 34 insertions, 3 deletions
diff --git a/gui/TabWidget.cpp b/gui/TabWidget.cpp
index 691eebf033..275e3613b5 100644
--- a/gui/TabWidget.cpp
+++ b/gui/TabWidget.cpp
@@ -37,12 +37,12 @@ enum {
};
TabWidget::TabWidget(GuiObject *boss, int x, int y, int w, int h)
- : Widget(boss, x, y, w, h) {
+ : Widget(boss, x, y, w, h), _bodyBackgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {
init();
}
TabWidget::TabWidget(GuiObject *boss, const String &name)
- : Widget(boss, name) {
+ : Widget(boss, name), _bodyBackgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {
init();
}
@@ -56,7 +56,12 @@ void TabWidget::init() {
_tabHeight = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Height");
_titleVPad = g_gui.xmlEval()->getVar("Globals.TabWidget.Tab.Padding.Top");
- _butRP = g_gui.xmlEval()->getVar("Globals.TabWidget.navButtonPadding.Right", 0);
+ _bodyTP = g_gui.xmlEval()->getVar("Globals.TabWidget.Body.Padding.Top");
+ _bodyBP = g_gui.xmlEval()->getVar("Globals.TabWidget.Body.Padding.Bottom");
+ _bodyLP = g_gui.xmlEval()->getVar("Globals.TabWidget.Body.Padding.Left");
+ _bodyRP = g_gui.xmlEval()->getVar("Globals.TabWidget.Body.Padding.Right");
+
+ _butRP = g_gui.xmlEval()->getVar("Globals.TabWidget.NavButtonPadding.Right", 0);
_butTP = g_gui.xmlEval()->getVar("Globals.TabWidget.NavButton.Padding.Top", 0);
_butW = g_gui.xmlEval()->getVar("Globals.TabWidget.NavButton.Width", 10);
_butH = g_gui.xmlEval()->getVar("Globals.TabWidget.NavButton.Height", 10);
@@ -279,11 +284,14 @@ void TabWidget::drawWidget() {
for (int i = _firstVisibleTab; i < (int)_tabs.size(); ++i) {
tabs.push_back(_tabs[i].title);
}
+ g_gui.theme()->drawDialogBackground(Common::Rect(_x + _bodyLP, _y + _bodyTP, _x+_w-_bodyRP, _y+_h-_bodyBP), _bodyBackgroundType);
+
g_gui.theme()->drawTab(Common::Rect(_x, _y, _x+_w, _y+_h), _tabHeight, _tabWidth, tabs, _activeTab - _firstVisibleTab, 0, _titleVPad);
}
void TabWidget::draw() {
Widget::draw();
+
if (_tabWidth * _tabs.size() > _w) {
_navLeft->draw();
_navRight->draw();
diff --git a/gui/TabWidget.h b/gui/TabWidget.h
index 81544c2de7..e7b8733d8f 100644
--- a/gui/TabWidget.h
+++ b/gui/TabWidget.h
@@ -46,6 +46,9 @@ protected:
int _tabWidth;
int _tabHeight;
+ int _bodyRP, _bodyTP, _bodyLP, _bodyBP;
+ ThemeEngine::DialogBackground _bodyBackgroundType;
+
int _titleVPad;
int _butRP, _butTP, _butW, _butH;
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index 636e7f4ff0..17294703f4 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -469,6 +469,9 @@
"size='75,27' "
"padding='0,0,8,0' "
"/> "
+"<widget name='TabWidget.Body' "
+"padding='0,0,0,0' "
+"/> "
"<widget name='TabWidget.NavButton' "
"size='15,18' "
"padding='0,3,4,0' "
@@ -1219,6 +1222,9 @@
"size='45,16' "
"padding='0,0,2,0' "
"/> "
+"<widget name='TabWidget.Body' "
+"padding='0,0,0,0' "
+"/> "
"<widget name='TabWidget.NavButton' "
"size='32,18' "
"padding='0,3,4,0' "
diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip
index 5c0c423153..cc288765ac 100644
--- a/gui/themes/scummclassic.zip
+++ b/gui/themes/scummclassic.zip
Binary files differ
diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx
index be4a6e2638..9f241c06e5 100644
--- a/gui/themes/scummclassic/classic_layout.stx
+++ b/gui/themes/scummclassic/classic_layout.stx
@@ -88,6 +88,9 @@
size = '75, 27'
padding = '0, 0, 8, 0'
/>
+ <widget name = 'TabWidget.Body'
+ padding = '0, 0, 0, 0'
+ />
<widget name = 'TabWidget.NavButton'
size = '15, 18'
padding = '0, 3, 4, 0'
diff --git a/gui/themes/scummclassic/classic_layout_lowres.stx b/gui/themes/scummclassic/classic_layout_lowres.stx
index 7786b8ca42..19fbb2d0bd 100644
--- a/gui/themes/scummclassic/classic_layout_lowres.stx
+++ b/gui/themes/scummclassic/classic_layout_lowres.stx
@@ -85,6 +85,9 @@
size = '45, 16'
padding = '0, 0, 2, 0'
/>
+ <widget name = 'TabWidget.Body'
+ padding = '0, 0, 0, 0'
+ />
<widget name = 'TabWidget.NavButton'
size = '32, 18'
padding = '0, 3, 4, 0'
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 48a3920d8f..1f3a017b45 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index fdf7c0456b..dfc2fcee8d 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -92,6 +92,11 @@
size = '75, 27'
padding = '0, 0, 8, 0'
/>
+
+ <widget name = 'TabWidget.Body'
+ padding = '0, 0, 0, 0'
+ />
+
<widget name = 'TabWidget.NavButton'
size = '15, 18'
padding = '0, 3, 4, 0'
diff --git a/gui/themes/scummmodern/scummmodern_layout_lowres.stx b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
index 0f97969072..49dc6c03a0 100644
--- a/gui/themes/scummmodern/scummmodern_layout_lowres.stx
+++ b/gui/themes/scummmodern/scummmodern_layout_lowres.stx
@@ -83,6 +83,9 @@
size = '45, 16'
padding = '0, 0, 2, 0'
/>
+ <widget name = 'TabWidget.Body'
+ padding = '0, 0, 0, 0'
+ />
<widget name = 'TabWidget.NavButton'
size = '32, 18'
padding = '0, 3, 4, 0'