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

sev at users.sourceforge.net sev at users.sourceforge.net
Mon Mar 13 18:21:01 CET 2006


Revision: 21268
Author:   sev
Date:     2006-03-13 18:19:38 -0800 (Mon, 13 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21268&view=rev

Log Message:
-----------
Rearrange launcher.
Logo is still shown weirdly.

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeNew.cpp
    scummvm/trunk/gui/launcher.cpp
    scummvm/trunk/gui/theme.cpp
    scummvm/trunk/gui/theme.h
    scummvm/trunk/gui/themes/default-theme.ini
    scummvm/trunk/gui/themes/default-theme.zip
    scummvm/trunk/gui/widget.cpp
    scummvm/trunk/gui/widget.h
Modified: scummvm/trunk/gui/ThemeNew.cpp
===================================================================
--- scummvm/trunk/gui/ThemeNew.cpp	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/ThemeNew.cpp	2006-03-14 02:19:38 UTC (rev 21268)
@@ -229,6 +229,8 @@
 	_configFile.getKey("button_top", "pixmaps", imageHandlesTable[kButtonBkgdTop]);
 	_configFile.getKey("button_left", "pixmaps", imageHandlesTable[kButtonBkgdLeft]);
 	_configFile.getKey("button_bkgd", "pixmaps", imageHandlesTable[kButtonBkgd]);
+
+	_configFile.getKey("theme_logo", "pixmaps", imageHandlesTable[kThemeLogo]);
 	
 	// load the colors from the config file
 	setupColors();
@@ -525,9 +527,10 @@
 	addDirtyRect(r2);
 }
 
-void ThemeNew::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state) {
+void ThemeNew::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, bool transparency) {
 	if (!_initOk)
 		return;
+
 	Common::Rect rect(r.left, r.top, r.left + surface.w, r.top + surface.h);
 	rect.clip(_screen.w, _screen.h);
 
@@ -536,6 +539,11 @@
 	
 	assert(surface.bytesPerPixel == sizeof(OverlayColor));
 
+	if (transparency) {
+		drawSurface(rect, &surface, false, false, 256);
+		return;
+	}
+
 	OverlayColor *src = (OverlayColor *)surface.pixels;
 	OverlayColor *dst = (OverlayColor *)_screen.getBasePtr(rect.left, rect.top);
 

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/launcher.cpp	2006-03-14 02:19:38 UTC (rev 21268)
@@ -446,9 +446,16 @@
 	// Show ScummVM version
 	new StaticTextWidget(this, "launcher_version", gScummVMFullVersion, kTextAlignCenter);
 
-	// Add some buttons at the bottom
-	// TODO: Rearrange them a bit? In particular, we could put a slightly smaller space
-	// between About and Options, and in exchange remove those a bit from Quit and Start.
+#ifndef DISABLE_FANCY_THEMES
+	if (g_gui.evaluator()->getVar("launcher_logo.visible") == 1) {
+		GraphicsWidget *logo = new GraphicsWidget(this, "launcher_logo");
+		ThemeNew *th = (ThemeNew *)g_gui.theme();
+		logo->useTransparency(true);
+
+		logo->setGfx(th->getImageSurface(th->kThemeLogo));
+	}
+#endif
+
 	new ButtonWidget(this, "launcher_quit_button", "Quit", kQuitCmd, 'Q');
 	new ButtonWidget(this, "launcher_about_button", "About", kAboutCmd, 'B');
 	new ButtonWidget(this, "launcher_options_button", "Options", kOptionsCmd, 'O');

Modified: scummvm/trunk/gui/theme.cpp
===================================================================
--- scummvm/trunk/gui/theme.cpp	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/theme.cpp	2006-03-14 02:19:38 UTC (rev 21268)
@@ -216,7 +216,7 @@
 	addDirtyRect(r);
 }
 
-void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state) {
+void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, bool transparency) {
 	if (!_initOk)
 		return;
 

Modified: scummvm/trunk/gui/theme.h
===================================================================
--- scummvm/trunk/gui/theme.h	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/theme.h	2006-03-14 02:19:38 UTC (rev 21268)
@@ -129,7 +129,7 @@
 
 	virtual void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background = kWidgetBackgroundPlain, kState state = kStateEnabled) = 0;
 	virtual void drawButton(const Common::Rect &r, const Common::String &str, kState state = kStateEnabled) = 0;
-	virtual void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state = kStateEnabled) = 0;
+	virtual void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state = kStateEnabled, bool transparency = false) = 0;
 	virtual void drawSlider(const Common::Rect &r, int width, kState state = kStateEnabled) = 0;
 	virtual void drawCheckbox(const Common::Rect &r, const Common::String &str, bool checked, kState state = kStateEnabled) = 0;
 	virtual void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, kState state = kStateEnabled) = 0;
@@ -225,7 +225,7 @@
 
 	void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state);
 	void drawButton(const Common::Rect &r, const String &str, kState state);
-	void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state);
+	void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, bool transparency);
 	void drawSlider(const Common::Rect &r, int width, kState state);
 	void drawCheckbox(const Common::Rect &r, const String &str, bool checked, kState state);
 	void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, kState state);
@@ -297,13 +297,15 @@
 
 	void drawWidgetBackground(const Common::Rect &r, uint16 hints, kWidgetBackground background, kState state);
 	void drawButton(const Common::Rect &r, const String &str, kState state);
-	void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state);
+	void drawSurface(const Common::Rect &r, const Graphics::Surface &surface, kState state, bool transparency);
 	void drawSlider(const Common::Rect &r, int width, kState state);
 	void drawCheckbox(const Common::Rect &r, const String &str, bool checked, kState state);
 	void drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<String> &tabs, int active, uint16 hints, kState state);
 	void drawScrollbar(const Common::Rect &r, int sliderY, int sliderHeight, kScrollbarState, kState state);
 	void drawCaret(const Common::Rect &r, bool erase, kState state);
 	void drawLineSeparator(const Common::Rect &r, kState state);
+    const Graphics::Surface *getImageSurface(int n) { return _images[n]; }
+
 private:
 	bool addDirtyRect(Common::Rect r, bool backup = false, bool special = false);
 
@@ -355,6 +357,7 @@
 
 	const Graphics::Font *_font;
 
+public:
 	enum kImageHandles {
 		kDialogBkgdCorner = 0,
 		kDialogBkgdTop = 1,
@@ -405,10 +408,13 @@
 		kWidgetSmallBkgdTop = 36,
 		kWidgetSmallBkgdLeft = 37,
 		kWidgetSmallBkgd = 38,
+
+		kThemeLogo = 39,
 		
 		kImageHandlesMax
 	};
 
+private:
 	const String *_imageHandles;
 	const Graphics::Surface **_images;
 	

Modified: scummvm/trunk/gui/themes/default-theme.ini
===================================================================
--- scummvm/trunk/gui/themes/default-theme.ini	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/themes/default-theme.ini	2006-03-14 02:19:38 UTC (rev 21268)
@@ -54,6 +54,8 @@
 button_left=widget_bkgd_left.bmp
 button_bkgd=widget_bkgd.bmp
 
+theme_logo=logo.bmp
+
 [colors]
 main_dialog_start=210 114 10
 main_dialog_end=239 196 24
@@ -130,324 +132,20 @@
 shadow_top_height=2
 pshadow_bottom_height=4
 
-[320xY]
-def_widgetSize=kNormalWidgetSize
-def_buttonWidth=kButtonWidth
-def_buttonHeight=kButtonHeight
-def_sliderWidth=kSliderWidth
-def_sliderHeight=kSliderHeight
-def_kLineHeight=12
-def_kFontHeight=10
-def_globOptionsW=(w - 2 * 10)
-def_globOptionsH=(h - 1 * 40)
-def_gameOptionsH=(h - 2 * 30)
-def_gameOptionsLabelWidth=60
-def_tabPopupsLabelW=100
-def_aboutXOff=3
-def_aboutYOff=2
-def_aboutOuterBorder=10
-def_scummmainHOffset=8
-def_scummmainVSpace=5
-def_scummmainVAddOff=2
-def_scummmainButtonWidth=90
-def_scummmainButtonHeight=16
-def_scummhelpX=5
-def_scummhelpW=(w - 2 * 5)
-def_midiControlsSpacing=1
-use=XxY
-
-[XxY]
-def_widgetSize=kBigWidgetSize
-def_buttonWidth=kBigButtonWidth
-def_buttonHeight=kBigButtonHeight
-def_sliderWidth=kBigSliderWidth
-def_sliderHeight=kBigSliderHeight
-def_kLineHeight=16
-def_kFontHeight=14
-def_globOptionsW=(w - 2 * 10)
-def_globOptionsH=(h - 2 * 40)
-def_gameOptionsH=(h - 2 * 40)
-def_gameOptionsLabelWidth=90
-def_tabPopupsLabelW=150
-def_aboutXOff=8
-def_aboutYOff=5
-def_aboutOuterBorder=80
-def_scummmainHOffset=12
-def_scummmainVSpace=7
-def_scummmainVAddOff=3
-def_scummmainButtonWidth=160
-def_scummmainButtonHeight=28
-def_scummhelpW=370
-def_scummhelpX=((w - scummhelpW) / 2)
-def_midiControlsSpacing=2
-
-###### chooser
-opHeight=(h * 7 / 10)
-useWithPrefix=chooser defaultChooser_
-
-##### browser
-brW=((w * 7) / 8)
-brH=((h * 9) / 10)
-browser=((w - brW) / 2) ((h - brH) / 2) brW brH
-set_parent=browser
-browser_headline=10 kLineHeight (parent.w - 2 * 10) kLineHeight
-browser_path=10 prev.y2 prev.w prev.h
-browser_list=10 prev.y2 prev.w (parent.h - 3 * kLineHeight - buttonHeight - 14)
-browser_up=10 (parent.h - buttonHeight - 8) buttonWidth buttonHeight
-browser_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
-browser_choose=(prev.x2 + 10) prev.y prev.w prev.h
-
+[640xY]
 ##### launcher
-hBorder=10
-launcher_version=hBorder 8 (w - 2 * hBorder) kLineHeight
-top=(h - 8 - buttonHeight)
-numButtons=4
-space=8
-butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)
-launcher_quit_button=hBorder top butWidth buttonHeight
-launcher_about_button=(prev.x2 + space) prev.y prev.w prev.h
-launcher_options_button=(prev.x2 + space) prev.y prev.w prev.h
-launcher_start_button=(prev.x2 + space) prev.y prev.w prev.h
-top=(top - buttonHeight * 2)
-numButtons=3
-space=10
-butWidth=((w - 2 * hBorder - space * (numButtons - 1)) / numButtons)
-launcher_addGame_button=hBorder top butWidth buttonHeight
-launcher_editGame_button=(prev.x2 + space) prev.y prev.w prev.h
-launcher_removeGame_button=(prev.x2 + space) prev.y prev.w prev.h
-launcher_list=hBorder (kLineHeight + 16) (w - 2 * hBorder) (top - kLineHeight - 20)
-
-### global options
-globaloptions=10 40 globOptionsW globOptionsH
-set_parent=globaloptions
-vBorder=5
-globaloptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)
-
-# graphics tab
-opYoffset=vBorder
-useWithPrefix=graphicsControls globaloptions_
-
-# audio tab
-opYoffset=vBorder
-useWithPrefix=audioControls globaloptions_
-useWithPrefix=volumeControls globaloptions_
-
-# MIDI tab
-opYoffset=vBorder
-useWithPrefix=midiControls globaloptions_
-
-# paths tab
-yoffset=vBorder
-globaloptions_savebutton=5 yoffset (buttonWidth + 5) buttonHeight
-globaloptions_savepath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight
-yoffset=(yoffset + buttonHeight + 4)
-globaloptions_extrabutton=5 yoffset (buttonWidth + 5) buttonHeight
-globaloptions_extrapath=(prev.x2 + 20) (vBorder + 3) (parent.w - (prev.w + 20) - 10) kLineHeight
-yoffset=(yoffset + buttonHeight + 4)
-globaloptions_keysbutton=5 yoffset (buttonWidth + 5) buttonHeight
-
-globaloptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
-globaloptions_ok=(prev.x2 + 10) prev.y prev.w prev.h
-
-### game options
-gameoptions=10 40 (w - 2 * 10) gameOptionsH
-set_parent=gameoptions
-vBorder=5
-gox=5
-gow=(parent.w - 15)
-
-gameoptions_tabwidget=0 vBorder parent.w (parent.h - buttonHeight - 8 - 2 * vBorder)
-
-# game tab
-opYoffset=vBorder
-gameoptions_id=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight
-gameoptions_domain=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2)
-opYoffset=(opYoffset + prev.h + 3)
-gameoptions_name=gox (opYoffset + 2) gameOptionsLabelWidth kLineHeight
-gameoptions_desc=prev.x2 (prev.y - 1) (parent.w - gameOptionsLabelWidth - 10 - gox) (prev.h + 2)
-opYoffset=(opYoffset + prev.h + 3)
-gameoptions_lang=gox (opYoffset - 1) gow (kLineHeight + 2)
-opYoffset=(opYoffset + prev.h + 4)
-gameoptions_platform=prev.x opYoffset prev.w prev.h
-opYoffset=(opYoffset + prev.h + 4)
-
-# paths tab
-opYoffset=vBorder
-goOff=((buttonHeight - kLineHeight) / 2 + 2)
-gameoptions_gamepath=gox opYoffset (buttonWidth + 5) buttonHeight
-gameoptions_gamepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight
-opYoffset=(opYoffset + buttonHeight + 4)
-gameoptions_extrapath=gox opYoffset (buttonWidth + 5) buttonHeight
-gameoptions_extrapathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight
-opYoffset=(opYoffset + buttonHeight + 4)
-gameoptions_savepath=gox opYoffset (buttonWidth + 5) buttonHeight
-gameoptions_savepathText=(prev.x2 + 20) (opYoffset + goOff) (parent.w - self.x - 10) kLineHeight
-opYoffset=(opYoffset + buttonHeight + 4)
-
-# graphics tab
-opYoffset=vBorder
-gameoptions_graphicsCheckbox=gox opYoffset (kFontHeight + 10 + 192) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-useWithPrefix=graphicsControls gameoptions_
-
-# audio tab
-opYoffset=vBorder
-gameoptions_audioCheckbox=gox opYoffset (kFontHeight + 10 + 180) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-useWithPrefix=audioControls gameoptions_
-
-# midi tab
-opYoffset=vBorder
-gameoptions_midiCheckbox=gox opYoffset (kFontHeight + 10 + 174) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-useWithPrefix=midiControls gameoptions_
-
-# volume tab
-opYoffset=vBorder
-gameoptions_volumeCheckbox=gox opYoffset (kFontHeight + 10 + 189) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-useWithPrefix=volumeControls gameoptions_
-
-gameoptions_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
-gameoptions_ok=(prev.x2 + 10) prev.y prev.w prev.h
-
-### keys dialog
-keysdialog=(w / 20) (h / 10) (w - w / 10) (h - h / 5)
-set_parent=keysdialog
-keysdialog_map=(parent.w - buttonWidth - 10) 20 buttonWidth buttonHeight
-keysdialog_ok=prev.x (prev.y2 + 4) prev.w prev.h
-keysdialog_cancel=prev.x (prev.y2 + 4) prev.w prev.h
-keysdialog_list=10 10 (prev.x - 20) (parent.h - kLineHeight * 4 - self.y)
-keysdialog_action=prev.x (parent.h - kLineHeight * 3) (parent.w - self.x * 2) kLineHeight
-keysdialog_mapping=prev.x (prev.y + kLineHeight) prev.w prev.h
-
-
-
-##### SCUMM dialogs
-scummDummyDialog=0 80 0 16
-
-## Main dialog
-# note that scummmain size depends on overall height
-smY=(scummmainVSpace + scummmainVAddOff)
-scummmain_resume=scummmainHOffset smY scummmainButtonWidth scummmainButtonHeight
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-smY=(smY + scummmainVSpace)
-scummmain_load=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-scummmain_save=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-smY=(smY + scummmainVSpace)
-scummmain_options=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-scummmain_help=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-scummmain_about=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-smY=(smY + scummmainVSpace)
-scummmain_quit=prev.x smY prev.w prev.h
-smY=(smY + scummmainButtonHeight + scummmainVAddOff)
-smW=(scummmainButtonWidth + 2 * scummmainHOffset)
-smH=(smY + scummmainVSpace)
-scummmain=((w - smW) / 2) ((h - smH) / 2) smW smH
-
-## Engine config
-# note that scummconfig size depends on overall height
-# hence it is on the end of the list
-opYoffset=8
-useWithPrefix=volumeControls scummconfig_
-scummconfig_subtitlesCheckbox=15 opYoffset (kFontHeight + 10 + 89) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-scummconfig_speechCheckbox=prev.x opYoffset (kFontHeight + 10 + 85) buttonHeight
-opYoffset=(opYoffset + buttonHeight + 4)
-soWidth=(8 + 3 * buttonWidth + 4)
-scummconfig_keys=(soWidth - 3 * (buttonWidth + 4) + 6) opYoffset (buttonWidth - 10) buttonHeight
-scummconfig_cancel=(prev.x2 + 4) prev.y (prev.w + 10) prev.h
-scummconfig_ok=(prev.x2 + 4) prev.y prev.w prev.h
-opYoffset=(opYoffset + buttonHeight)
-scummconfig=((w - soWidth) / 2) ((h - opYoffset) / 2) soWidth (opYoffset + 8)
-
-## Help
-scummHelpNumLines=15
-shH=(5 + (2 + scummHelpNumLines) * kFontHeight + buttonHeight + 7)
-scummhelp=scummhelpX ((h - shH) / 2) scummhelpW shH
-scummhelp_title=10 5 scummhelpW kFontHeight
-scummhelp_key.x=10
-scummhelp_key.yoffset=5
-scummhelp_key.w=80
-scummhelp_key.h=kFontHeight
-scummhelp_dsc.x=90
-scummhelp_dsc.yoffset=5
-scummhelp_dsc.w=(scummhelpW - 10 - 90)
-scummhelp_dsc.h=kFontHeight
-scummhelp_prev=10 (5 + kFontHeight * (scummHelpNumLines + 2) + 2) buttonWidth buttonHeight
-scummhelp_next=(prev.x2 + 8) prev.y prev.w prev.h
-scummhelp_close=(scummhelpW - 8 - buttonWidth) prev.y prev.w prev.h
-
-# Saveload dialog
-scummsaveload=8 8 (w - 2 * 8) (h - 16)
-set_parent=scummsaveload
-scummsaveload_title=10 6 (parent.w - 2 * 10) kLineHeight
-scummsaveload_list=10 18 (parent.w - 2 * 10 - 180) (parent.h - 14 - buttonHeight - 18)
-scummsaveload_thumbnail=(parent.w - (kThumbnailWidth + 22)) 18
-scummsaveload_cancel=(parent.w - 2 * (buttonWidth + 10)) (parent.h - buttonHeight - 8) buttonWidth buttonHeight
-scummsaveload_choose=(prev.x2 + 10) prev.y prev.w prev.h
-opHeight=(h * 9 / 10)
-useWithPrefix=chooser scummsaveload_
-
-############################################
-[chooser]
-chooserW=(w - 2 * 8)
-chooser=((w - chooserW) / 2) ((h - opHeight) / 2) chooserW opHeight
-chooser_headline=10 6 (chooserW - 2 * 10) (kLineHeight)
-chooser_list=10 (6 + kLineHeight + 2) prev.w (opHeight - self.y - buttonHeight - 12)
-chooser_cancel=(chooserW - 2 * (buttonWidth + 10)) (opHeight - buttonHeight - 8) buttonWidth buttonHeight
-chooser_ok=(prev.x2 + 10) prev.y prev.w prev.h
-
-
-[graphicsControls]
-gcx=10
-gcw=(parent.w - 2 * 10)
-grModePopup=(gcx - 5) (opYoffset - 1) (gcw + 5) (kLineHeight + 2)
-opYoffset=(opYoffset + kLineHeight + 4)
-grRenderPopup=prev.x (opYoffset - 1) prev.w prev.h
-opYoffset=(opYoffset + kLineHeight + 4)
-grFullscreenCheckbox=gcx opYoffset (kFontHeight + 10 + 96) buttonHeight
-opYoffset=(opYoffset + buttonHeight)
-grAspectCheckbox=prev.x opYoffset (kFontHeight + 10 + 136) prev.h
-opYoffset=(opYoffset + buttonHeight)
-
-[audioControls]
-aux=10
-auw=(parent.w - 2 * 10)
-auMidiPopup=(aux - 5) (opYoffset - 1) (auw + 5) (kLineHeight + 2)
-opYoffset=(opYoffset + kLineHeight + 4)
-auSubtitlesCheckbox=aux opYoffset (kFontHeight + 10 + 102) buttonHeight
-opYoffset=(opYoffset + buttonHeight + 18)
-
-[volumeControls]
-vctextw=95
-vcxoff=(vctextw + 15)
-vcMusicText=10 (opYoffset + 2) vctextw kLineHeight
-vcMusicSlider=vcxoff opYoffset sliderWidth sliderHeight
-vcMusicLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
-opYoffset=(opYoffset + sliderHeight + 4)
-vcSfxText=10 (opYoffset + 2) vctextw kLineHeight
-vcSfxSlider=vcxoff opYoffset sliderWidth sliderHeight
-vcSfxLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
-opYoffset=(opYoffset + sliderHeight + 4)
-vcSpeechText=10 (opYoffset + 2) vctextw kLineHeight
-vcSpeechSlider=vcxoff opYoffset sliderWidth sliderHeight
-vcSpeechLabel=(vcxoff + prev.w + 10) (opYoffset + 2) 24 kLineHeight
-opYoffset=(opYoffset + sliderHeight + 4)
-
-[midiControls]
-mcx=10
-mcFontButton=mcx opYoffset buttonWidth buttonHeight
-mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 10) kLineHeight
-opYoffset=(opYoffset + buttonHeight + 2 * midiControlsSpacing)
-mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight
-opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
-mcMt32Checkbox=mcx opYoffset (kFontHeight + 10 + 256) buttonHeight
-opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
-mcGSCheckbox=mcx opYoffset (kFontHeight + 10 + 142) buttonHeight
-opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
+launcher_version=82 22 247 kLineHeight
+launcher_logo=180 2 283 80
+launcher_logo.visible=true
+space1=20
+space2=5
+butWidth=120
+butHeight=25
+launcher_list=23 94 466 (h - 23 - self.y)
+launcher_start_button=(prev.x2 + 17) prev.y butWidth butHeight
+launcher_addGame_button=prev.x (prev.y2 + space1) prev.w prev.h
+launcher_editGame_button=prev.x (prev.y2 + space2) prev.w prev.h
+launcher_removeGame_button=prev.x (prev.y2 + space2) prev.w prev.h
+launcher_options_button=prev.x (prev.y2 + space1) prev.w prev.h
+launcher_about_button=prev.x (prev.y2 + space2) prev.w prev.h
+launcher_quit_button=prev.x (prev.y2 + space1) prev.w prev.h

Modified: scummvm/trunk/gui/themes/default-theme.zip
===================================================================
(Binary files differ)

Modified: scummvm/trunk/gui/widget.cpp
===================================================================
--- scummvm/trunk/gui/widget.cpp	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/widget.cpp	2006-03-14 02:19:38 UTC (rev 21268)
@@ -288,7 +288,7 @@
 #pragma mark -
 
 GraphicsWidget::GraphicsWidget(GuiObject *boss, int x, int y, int w, int h)
-	: Widget(boss, x, y, w, h), _gfx() {
+	: Widget(boss, x, y, w, h), _gfx(), _transparency(false) {
 	_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
 	_type = kGraphicsWidget;
 	// HACK: Don't save the background. We want to be sure that redrawing
@@ -297,6 +297,16 @@
 	_hints &= ~THEME_HINT_SAVE_BACKGROUND;
 }
 
+GraphicsWidget::GraphicsWidget(GuiObject *boss, String name)
+	: Widget(boss, name), _gfx(), _transparency(false) {
+	_flags = WIDGET_ENABLED | WIDGET_CLEARBG;
+	_type = kGraphicsWidget;
+	// HACK: Don't save the background. We want to be sure that redrawing
+	//       the widget updates the screen, even when there isn't any image
+	//       to draw.
+	_hints &= ~THEME_HINT_SAVE_BACKGROUND;
+}
+
 GraphicsWidget::~GraphicsWidget() {
 	_gfx.free();
 }
@@ -314,7 +324,7 @@
 
 void GraphicsWidget::drawWidget(bool hilite) {
 	if (sizeof(OverlayColor) == _gfx.bytesPerPixel && _gfx.pixels) {
-		g_gui.theme()->drawSurface(Common::Rect(_x, _y, _x+_w, _y+_h), _gfx);
+		g_gui.theme()->drawSurface(Common::Rect(_x, _y, _x+_w, _y+_h), _gfx, Theme::kStateEnabled,  _transparency);
 	}
 }
 

Modified: scummvm/trunk/gui/widget.h
===================================================================
--- scummvm/trunk/gui/widget.h	2006-03-13 23:53:15 UTC (rev 21267)
+++ scummvm/trunk/gui/widget.h	2006-03-14 02:19:38 UTC (rev 21268)
@@ -256,13 +256,18 @@
 class GraphicsWidget : public Widget {
 public:
 	GraphicsWidget(GuiObject *boss, int x, int y, int w, int h);
+	GraphicsWidget(GuiObject *boss, Common::String name);
 	~GraphicsWidget();
 
 	void setGfx(const Graphics::Surface *gfx);
+
+	void useTransparency(bool state) { _transparency = state; }
+
 protected:
 	void drawWidget(bool hilite);
 
 	Graphics::Surface _gfx;
+	bool _transparency;
 };
 
 } // End of namespace GUI


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