aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2016-03-30 19:02:02 +0200
committerEugene Sandulenko2016-03-30 19:02:02 +0200
commit35a44edca18cdec6c2dd484715a72d469cd0f1c3 (patch)
treed6acd7891e30bd672149f4c113b793bb8bbbe058 /gui/widgets/popup.cpp
parentf58b43b38a8f13c90df41bf1202f48b551b2edd5 (diff)
downloadscummvm-rg350-35a44edca18cdec6c2dd484715a72d469cd0f1c3.tar.gz
scummvm-rg350-35a44edca18cdec6c2dd484715a72d469cd0f1c3.tar.bz2
scummvm-rg350-35a44edca18cdec6c2dd484715a72d469cd0f1c3.zip
GUI: Implement immediate coordinate mode for PopUp widget
Diffstat (limited to 'gui/widgets/popup.cpp')
-rw-r--r--gui/widgets/popup.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 6186492339..b10b4fb5fe 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -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());