[Scummvm-cvs-logs] SF.net SVN: scummvm:[49770] scummvm/trunk/gui

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Jun 15 12:50:28 CEST 2010


Revision: 49770
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49770&view=rev
Author:   sev
Date:     2010-06-15 10:50:28 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
GUI: Implement FR #2821514.

FR #2821514: "GUI: OK and Cancel buttons in option tabs".
Now tabs are visually separated from the buttons.

Modified Paths:
--------------
    scummvm/trunk/gui/TabWidget.cpp
    scummvm/trunk/gui/TabWidget.h
    scummvm/trunk/gui/themes/default.inc
    scummvm/trunk/gui/themes/scummclassic/classic_layout.stx
    scummvm/trunk/gui/themes/scummclassic/classic_layout_lowres.stx
    scummvm/trunk/gui/themes/scummclassic.zip
    scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
    scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_lowres.stx
    scummvm/trunk/gui/themes/scummmodern.zip

Modified: scummvm/trunk/gui/TabWidget.cpp
===================================================================
--- scummvm/trunk/gui/TabWidget.cpp	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/TabWidget.cpp	2010-06-15 10:50:28 UTC (rev 49770)
@@ -37,12 +37,12 @@
 };
 
 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 @@
 	_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 @@
 	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();

Modified: scummvm/trunk/gui/TabWidget.h
===================================================================
--- scummvm/trunk/gui/TabWidget.h	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/TabWidget.h	2010-06-15 10:50:28 UTC (rev 49770)
@@ -46,6 +46,9 @@
 	int _tabWidth;
 	int _tabHeight;
 
+	int _bodyRP, _bodyTP, _bodyLP, _bodyBP;
+	ThemeEngine::DialogBackground _bodyBackgroundType;
+
 	int _titleVPad;
 
 	int _butRP, _butTP, _butW, _butH;

Modified: scummvm/trunk/gui/themes/default.inc
===================================================================
--- scummvm/trunk/gui/themes/default.inc	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/themes/default.inc	2010-06-15 10:50:28 UTC (rev 49770)
@@ -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' "

Modified: scummvm/trunk/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_layout.stx	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/themes/scummclassic/classic_layout.stx	2010-06-15 10:50:28 UTC (rev 49770)
@@ -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'

Modified: scummvm/trunk/gui/themes/scummclassic/classic_layout_lowres.stx
===================================================================
--- scummvm/trunk/gui/themes/scummclassic/classic_layout_lowres.stx	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/themes/scummclassic/classic_layout_lowres.stx	2010-06-15 10:50:28 UTC (rev 49770)
@@ -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'

Modified: scummvm/trunk/gui/themes/scummclassic.zip
===================================================================
(Binary files differ)

Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_layout.stx	2010-06-15 10:50:28 UTC (rev 49770)
@@ -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'

Modified: scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_lowres.stx
===================================================================
--- scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_lowres.stx	2010-06-15 10:49:46 UTC (rev 49769)
+++ scummvm/trunk/gui/themes/scummmodern/scummmodern_layout_lowres.stx	2010-06-15 10:50:28 UTC (rev 49770)
@@ -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'

Modified: scummvm/trunk/gui/themes/scummmodern.zip
===================================================================
(Binary files differ)


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list