[Scummvm-cvs-logs] CVS: scummvm/gui dialog.cpp,1.21,1.22 dialog.h,1.12,1.13 newgui.cpp,1.27,1.28 widget.h,1.8,1.9
Max Horn
fingolfin at users.sourceforge.net
Tue Nov 5 14:35:07 CET 2002
Update of /cvsroot/scummvm/scummvm/gui
In directory usw-pr-cvs1:/tmp/cvs-serv29835
Modified Files:
dialog.cpp dialog.h newgui.cpp widget.h
Log Message:
make buttons 2 pixel wider (fixes 'Options' button); don't use non-portable hack to swap ints
Index: dialog.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- dialog.cpp 19 Oct 2002 01:22:41 -0000 1.21
+++ dialog.cpp 5 Nov 2002 22:34:49 -0000 1.22
@@ -282,12 +282,12 @@
return w;
}
-Widget *Dialog::addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey)
+ButtonWidget *Dialog::addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey)
{
return new ButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
}
-Widget *Dialog::addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey)
+PushButtonWidget *Dialog::addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey)
{
return new PushButtonWidget(this, x, y, kButtonWidth, 16, label, cmd, hotkey);
}
Index: dialog.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/dialog.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- dialog.h 23 Oct 2002 14:00:47 -0000 1.12
+++ dialog.h 5 Nov 2002 22:34:50 -0000 1.13
@@ -25,6 +25,8 @@
#include "widget.h" // For CommandReceiver
class NewGui;
+class ButtonWidget;
+class PushButtonWidget;
// Some "common" commands sent to handleCommand()
enum {
@@ -74,8 +76,8 @@
Widget* findWidget(int x, int y); // Find the widget at pos x,y if any
- Widget* addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
- Widget* addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
+ ButtonWidget* addButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
+ PushButtonWidget* addPushButton(int x, int y, const ScummVM::String &label, uint32 cmd, char hotkey);
};
#endif
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- newgui.cpp 5 Nov 2002 21:48:40 -0000 1.27
+++ newgui.cpp 5 Nov 2002 22:34:50 -0000 1.28
@@ -286,10 +286,10 @@
int16 *ptr;
if (x2 < x)
- x2 ^= x ^= x2 ^= x; // Swap x2 and x
+ SWAP(x2, x);
if (y2 < y)
- y2 ^= y ^= y2 ^= y; // Swap y2 and y
+ SWAP(y2, y);
ptr = getBasePtr(x, y);
Index: widget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- widget.h 19 Oct 2002 01:22:41 -0000 1.8
+++ widget.h 5 Nov 2002 22:34:50 -0000 1.9
@@ -49,7 +49,7 @@
};
enum {
- kButtonWidth = 54,
+ kButtonWidth = 56,
kButtonHeight = 16,
};
More information about the Scummvm-git-logs
mailing list