summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/widgets/listbox.cpp')
-rw-r--r--src/guichan/widgets/listbox.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/guichan/widgets/listbox.cpp b/src/guichan/widgets/listbox.cpp
index 3f6565785..66ddf8315 100644
--- a/src/guichan/widgets/listbox.cpp
+++ b/src/guichan/widgets/listbox.cpp
@@ -61,6 +61,9 @@
namespace gcn
{
ListBox::ListBox() :
+ Widget(),
+ MouseListener(),
+ KeyListener(),
mSelected(-1),
mListModel(nullptr),
mWrappingEnabled(false)
@@ -73,13 +76,16 @@ namespace gcn
}
ListBox::ListBox(ListModel *listModel) :
+ Widget(),
+ MouseListener(),
+ KeyListener(),
mSelected(-1),
+ mListModel(listModel),
mWrappingEnabled(false)
{
setWidth(100);
- setListModel(listModel);
+ adjustSize();
setFocusable(true);
-
addMouseListener(this);
addKeyListener(this);
}