mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 05:01:43 +00:00
make buttons 2 pixel wider (fixes 'Options' button); don't use non-portable hack to swap ints
svn-id: r5427
This commit is contained in:
parent
5c0b145315
commit
56a41a26c0
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -49,7 +49,7 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
kButtonWidth = 54,
|
||||
kButtonWidth = 56,
|
||||
kButtonHeight = 16,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user