From 144be21bed1001c4a72739ef7656908cbf71e909 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 12 Nov 2008 13:14:44 +0000 Subject: [PATCH] GUI: Got rid of the WidgetSize stuff svn-id: r35022 --- engines/scumm/dialogs.cpp | 6 +----- engines/scumm/dialogs.h | 2 -- gui/ThemeEval.cpp | 3 --- gui/newgui.cpp | 4 ---- gui/newgui.h | 2 -- gui/themes/default.inc | 2 -- gui/themes/scummclassic.zip | Bin 43779 -> 43668 bytes gui/themes/scummclassic/classic_layout.stx | 1 - .../scummclassic/classic_layout_320.stx | 1 - gui/themes/scummmodern.zip | Bin 144236 -> 144122 bytes gui/themes/scummmodern/scummmodern_layout.stx | 2 -- .../scummmodern/scummmodern_layout_320.stx | 1 - gui/widget.h | 6 ------ 13 files changed, 1 insertion(+), 29 deletions(-) diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 581c16ca065..1cb4e8a41db 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -864,11 +864,7 @@ void ValueDisplayDialog::reflowLayout() { const int screenW = g_system->getOverlayWidth(); const int screenH = g_system->getOverlayHeight(); - if (g_gui.getWidgetSize() == GUI::kBigWidgetSize) { - _percentBarWidth = kBigPercentBarWidth; - } else { - _percentBarWidth = kPercentBarWidth; - } + _percentBarWidth = screenW * 100 / 640; int width = g_gui.getStringWidth(_label) + 16 + _percentBarWidth; int height = g_gui.getFontHeight() + 4 * 2; diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index 3837787a3be..290b3450dc4 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -222,8 +222,6 @@ public: protected: enum { - kPercentBarWidth = 50, - kBigPercentBarWidth = 75, kDisplayDelay = 1500 }; Common::String _label; diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index a448048d605..753455e7990 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -38,9 +38,6 @@ void ThemeEval::buildBuiltinVars() { _builtin["kThumbnailWidth"] = kThumbnailWidth; _builtin["kThumbnailHeight"] = kThumbnailHeight1; _builtin["kThumbnailHeight2"] = kThumbnailHeight2; - - _builtin["kNormalWidgetSize"] = GUI::kNormalWidgetSize; - _builtin["kBigWidgetSize"] = GUI::kBigWidgetSize; } void ThemeEval::reset() { diff --git a/gui/newgui.cpp b/gui/newgui.cpp index d8c3a8212e1..aa778b834c8 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -380,10 +380,6 @@ void NewGui::animateCursor() { } } -WidgetSize NewGui::getWidgetSize() { - return (WidgetSize)(g_gui.xmlEval()->getVar("Globals.WidgetSize")); -} - void NewGui::clearDragWidget() { if (!_dialogStack.empty()) _dialogStack.top()->_dragWidget = 0; diff --git a/gui/newgui.h b/gui/newgui.h index c87b4fd177d..e7ee19769e8 100644 --- a/gui/newgui.h +++ b/gui/newgui.h @@ -88,8 +88,6 @@ public: int getStringWidth(const Common::String &str, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getStringWidth(str, style); } int getCharWidth(byte c, ThemeEngine::FontStyle style = ThemeEngine::kFontStyleBold) const { return _theme->getCharWidth(c, style); } - WidgetSize getWidgetSize(); - void clearDragWidget(); void screenChange(); diff --git a/gui/themes/default.inc b/gui/themes/default.inc index aa38639ee14..89a9a5d620c 100644 --- a/gui/themes/default.inc +++ b/gui/themes/default.inc @@ -310,7 +310,6 @@ " " " " " " -" " " " " " " " @@ -925,7 +924,6 @@ " " " " " " -" " " " " " " " diff --git a/gui/themes/scummclassic.zip b/gui/themes/scummclassic.zip index 91b5362f559ed9c2bd719405e7fb148983f5206f..4add34070cef7fa66abd4cd7c6ffa6898f960519 100644 GIT binary patch delta 198 zcmZp^#x&(B(}r{MyhVjMmKS9YyO_B$Fqmz=EnmqZW@M;fWME*SYiOuzXry3hY-M0> zWnwrvOXbOA?QEIN3sg_pixdL2&Ebu^pyk5A0K#Gn3=ESGW{Pc|lA3|X1cS*=SsONM lXM5SBT0FUFm9Y{wGl9l}!IDO;REQ0e->wp1>sSdA1ppqjI2Zr` delta 263 zcmbPom8tm}(}r{MytxHAmfg%IwK=W~3^|)`%U8098Cob985mgT8XD>v8YvhWS(zFG z(d0Xs29sy0Y*7!-Oi52I3C^raRaYoW%qdM(uvJjccFIggme9A`Y_Iy&p0^5U{K_P~ zuw)kohUCqTsjYa7f1rhI0>Ws&{G!~%9Ar6tyUF&d+M91=>Di-tV6yNkV|f%if%b|q TAi$EwgvqI^G}*qd1c?CvmH<%Q diff --git a/gui/themes/scummclassic/classic_layout.stx b/gui/themes/scummclassic/classic_layout.stx index 005230b569b..3b447e29af1 100644 --- a/gui/themes/scummclassic/classic_layout.stx +++ b/gui/themes/scummclassic/classic_layout.stx @@ -29,7 +29,6 @@ - diff --git a/gui/themes/scummclassic/classic_layout_320.stx b/gui/themes/scummclassic/classic_layout_320.stx index 16e71731e9f..c77518ea211 100644 --- a/gui/themes/scummclassic/classic_layout_320.stx +++ b/gui/themes/scummclassic/classic_layout_320.stx @@ -29,7 +29,6 @@ - diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip index 61cb8aa5e82e81966dc0cdb669b7700622f22304..4e18963deb69b6cb804a6fa5356fa6fb1e53ec06 100644 GIT binary patch delta 206 zcmaF!jN{i+j)pCazn6&Q7v@+#z4&QQw;KZk2#YZ=Fia0z$tbp6btz*yiLxs{3G^kp9y4W?gO$+%_v{#A@7j=Z@*V~l>JNzZX%V3@P*4dVoS zIv;G`|B+GLkr&18>5q+=%#~2g0h%QRbPfzGY25Idkzu;;2S%ysVa7}XY%K;%Ksf-> CMM2^K delta 286 zcmezMl;h1aj)pCazn6%V7UWnSPSc1!;>N%L!eR^z4ATQwGKy_iUCNlwB4%izU}Rum zp=)TUYiOikXk=w-3`Em&KQJ0hzqFEZi*k5oN_uKZaAsAixCQ)W6s zVtc_VMlVO+M4(lYOjf*CT^JayZa@B-aRNT$AE+S=KsMPgzbH2`2O&3o;VMSq?Y>z7uNkMGea$F6{fQBi0NXbMCZH4m_FP*r diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx index 6f8033e7bdd..8748cc42610 100644 --- a/gui/themes/scummmodern/scummmodern_layout.stx +++ b/gui/themes/scummmodern/scummmodern_layout.stx @@ -29,8 +29,6 @@ - - diff --git a/gui/themes/scummmodern/scummmodern_layout_320.stx b/gui/themes/scummmodern/scummmodern_layout_320.stx index 8ac6af33ef6..312135b77e8 100644 --- a/gui/themes/scummmodern/scummmodern_layout_320.stx +++ b/gui/themes/scummmodern/scummmodern_layout_320.stx @@ -29,7 +29,6 @@ - diff --git a/gui/widget.h b/gui/widget.h index 07c5964207a..3174d4416ae 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -66,12 +66,6 @@ enum { kCaretBlinkTime = 300 }; -enum WidgetSize { - kDefaultWidgetSize, - kNormalWidgetSize, - kBigWidgetSize -}; - /* Widget */ class Widget : public GuiObject { friend class Dialog;