diff options
Diffstat (limited to 'gui')
-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, }; |