mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 17:03:13 +00:00
GUI: Implement immediate coordinate mode for PopUp widget
This commit is contained in:
parent
f58b43b38a
commit
35a44edca1
@ -382,6 +382,14 @@ PopUpWidget::PopUpWidget(GuiObject *boss, const String &name, const char *toolti
|
||||
_selectedItem = -1;
|
||||
}
|
||||
|
||||
PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip)
|
||||
: Widget(boss, x, y, w, h, tooltip), CommandSender(boss) {
|
||||
setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_IGNORE_DRAG);
|
||||
_type = kPopUpWidget;
|
||||
|
||||
_selectedItem = -1;
|
||||
}
|
||||
|
||||
void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
|
||||
if (isEnabled()) {
|
||||
PopUpDialog popupDialog(this, x + getAbsX(), y + getAbsY());
|
||||
|
@ -58,6 +58,7 @@ protected:
|
||||
|
||||
public:
|
||||
PopUpWidget(GuiObject *boss, const String &name, const char *tooltip = 0);
|
||||
PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char *tooltip = 0);
|
||||
|
||||
void handleMouseDown(int x, int y, int button, int clickCount);
|
||||
void handleMouseWheel(int x, int y, int direction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user