diff options
| author | Max Horn | 2002-11-05 22:34:50 +0000 | 
|---|---|---|
| committer | Max Horn | 2002-11-05 22:34:50 +0000 | 
| commit | 56a41a26c089983e67dcde1909219224567d4341 (patch) | |
| tree | 25824a55ba7cd5b4ad449a9de9a2e922e24b005e | |
| parent | 5c0b145315659e911ea9bb4cccce59a32631c4ff (diff) | |
| download | scummvm-rg350-56a41a26c089983e67dcde1909219224567d4341.tar.gz scummvm-rg350-56a41a26c089983e67dcde1909219224567d4341.tar.bz2 scummvm-rg350-56a41a26c089983e67dcde1909219224567d4341.zip  | |
make buttons 2 pixel wider (fixes 'Options' button); don't use non-portable hack to swap ints
svn-id: r5427
| -rw-r--r-- | gui/dialog.cpp | 4 | ||||
| -rw-r--r-- | gui/dialog.h | 6 | ||||
| -rw-r--r-- | gui/newgui.cpp | 4 | ||||
| -rw-r--r-- | gui/widget.h | 2 | 
4 files changed, 9 insertions, 7 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 6110225df0..d87b26611e 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -282,12 +282,12 @@ Widget *Dialog::findWidget(int x, int y)  	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);  } diff --git a/gui/dialog.h b/gui/dialog.h index 8558a3841b..04496a233e 100644 --- a/gui/dialog.h +++ b/gui/dialog.h @@ -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 @@ protected:  	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 diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 7e98d8d6ed..d070b5ab25 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -286,10 +286,10 @@ void NewGui::line(int x, int y, int x2, int y2, int16 color)  	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); diff --git a/gui/widget.h b/gui/widget.h index 8f15309bf0..e68c291887 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -49,7 +49,7 @@ enum {  };  enum { -	kButtonWidth = 54, +	kButtonWidth = 56,  	kButtonHeight = 16,  };  | 
