[Scummvm-cvs-logs] CVS: scummvm newgui.cpp,1.29,1.30 newgui.h,1.22,1.23
Max Horn
fingolfin at users.sourceforge.net
Sat Aug 3 18:19:02 CEST 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.34,1.35
- Next message: [Scummvm-cvs-logs] CVS: scummvm actor.h,1.15,1.16 actor.cpp,1.104,1.105 script.cpp,1.67,1.68 scumm.h,1.194,1.195 script_v1.cpp,1.132,1.133 script_v2.cpp,1.79,1.80
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv26380
Modified Files:
newgui.cpp newgui.h
Log Message:
Fixed (worked around?) the nested dialog redraw bug; slightly changed the way mouseMoved events are handled in class Dialog
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- newgui.cpp 27 Jul 2002 14:16:14 -0000 1.29
+++ newgui.cpp 4 Aug 2002 01:18:06 -0000 1.30
@@ -38,7 +38,7 @@
#define ABS(x) ((x) < 0 ? -(x) : (x))
-NewGui::NewGui(Scumm *s) : _s(s), _use_alpha_blending(true),
+NewGui::NewGui(Scumm *s) : _s(s), _use_alpha_blending(false),
_need_redraw(false),_prepare_for_gui(true),
_pauseDialog(0), _saveLoadDialog(0), _aboutDialog(0), _optionsDialog(0),
_currentKeyDown(0)
@@ -83,13 +83,14 @@
void NewGui::loop()
{
Dialog *activeDialog = _dialogStack.top();
+ int i;
if (_prepare_for_gui) {
ClearBlendCache(_s->_currentPalette, 128);
saveState();
if (_use_alpha_blending)
activeDialog->setupScreenBuf();
-#if 0
+#if 1
// FIXME - hack to encode our own custom GUI colors. Since we have to live
// with a given 8 bit palette, the result is not always as nice as one
// would wish, but this is just an experiment after all.
@@ -115,7 +116,8 @@
activeDialog->handleTickle();
if (_need_redraw) {
- activeDialog->draw();
+ for (i = 0; i < _dialogStack.size(); i++)
+ _dialogStack[i]->draw();
_need_redraw = false;
}
@@ -125,7 +127,7 @@
{
OSystem::Event t;
- for (int i = 0; i < _eventList.size(); i++)
+ for (i = 0; i < _eventList.size(); i++)
{
t = _eventList[i];
Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/newgui.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- newgui.h 27 Jul 2002 14:16:14 -0000 1.22
+++ newgui.h 4 Aug 2002 01:18:06 -0000 1.23
@@ -49,6 +49,8 @@
void push(Dialog *d) { _stack[_size++] = d; }
Dialog *top() const { return _stack[_size-1]; }
void pop() { if (_size > 0) _stack[--_size] = 0; }
+ int size() const { return _size; }
+ Dialog *operator [](int i) { return _stack[i]; }
};
typedef ScummVM::List<OSystem::Event> EventList;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.34,1.35
- Next message: [Scummvm-cvs-logs] CVS: scummvm actor.h,1.15,1.16 actor.cpp,1.104,1.105 script.cpp,1.67,1.68 scumm.h,1.194,1.195 script_v1.cpp,1.132,1.133 script_v2.cpp,1.79,1.80
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list