[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.155,1.156
Johannes Schickel
lordhoto at users.sourceforge.net
Fri Jan 27 07:45:01 CET 2006
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10168/scumm
Modified Files:
dialogs.cpp
Log Message:
- adds the new gui renderer also a new implementation for the classic gui
- adds a ImageMan and ImageDec class for loading and managing image files
- adds a loader for zip files which is used by the new theme and the image manager
- changes the widgets to use the new gui code
- changes the scumm dialogs to use the new gui code
- fixes a #include problem in the sky debugger with the new gui code
To use the new gui copy gui/themes/default-theme.zip to your extrapath.
If the theme zip can not be found the gui will fallback to the classic theme.
If you want to change the gui styles use "gui_theme=classic" for the classic theme
and "gui_theme=default-theme" for the new theme.
Thanks to eriktorbjorn for testing and help with the new theme and to sev for
reviewing this patch.
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- dialogs.cpp 18 Jan 2006 17:39:40 -0000 1.155
+++ dialogs.cpp 27 Jan 2006 15:43:23 -0000 1.156
@@ -925,20 +925,10 @@
}
void ValueDisplayDialog::drawDialog() {
- g_gui.blendRect(_x, _y, _w, _h, g_gui._bgcolor);
- g_gui.box(_x, _y, _w, _h, g_gui._color, g_gui._shadowcolor);
-
const int labelWidth = _w - 8 - _percentBarWidth;
-
- // Draw the label
- g_gui.drawString(_label, _x + 4, _y + 4, labelWidth, g_gui._textcolor);
-
- // Draw the percentage bar
- g_gui.fillRect(_x + 4 + labelWidth, _y + 4, _percentBarWidth * (_value - _min) / (_max - _min), _h - 8, g_gui._textcolorhi);
- g_gui.frameRect(_x + 4 + labelWidth, _y + 4, _percentBarWidth, _h - 8, g_gui._textcolor);
-
- // Flag the draw area as dirty
- g_gui.addDirtyRect(_x, _y, _w, _h);
+ g_gui.theme()->drawDialogBackground(Common::Rect(_x, _y, _x+_w, _y+_h));
+ g_gui.theme()->drawText(Common::Rect(_x+4, _y+4, _x+labelWidth+4, _y+g_gui.theme()->getFontHeight()+4), _label);
+ g_gui.theme()->drawSlider(Common::Rect(_x+4+labelWidth, _y+4, _x+_w-4, _y+_h-4), _percentBarWidth * (_value - _min) / (_max - _min));
}
void ValueDisplayDialog::handleTickle() {
More information about the Scummvm-git-logs
mailing list