summaryrefslogtreecommitdiff
path: root/src/gui/widgets/listbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/listbox.h')
-rw-r--r--src/gui/widgets/listbox.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 8b8c8b54..61c564bb 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -36,14 +36,21 @@ class SelectionListener;
class ListBox : public gcn::ListBox
{
public:
- /**
- * Constructor.
- */
ListBox(gcn::ListModel *listModel);
~ListBox();
/**
+ * Sets the font to render the text in.
+ *
+ * @param font the font to use.
+ */
+ inline void setFont(gcn::Font *font)
+ {
+ mFont = font;
+ }
+
+ /**
* Draws the list box.
*/
void draw(gcn::Graphics *graphics);
@@ -59,12 +66,17 @@ class ListBox : public gcn::ListBox
// Inherited from MouseListener
+ void mousePressed(gcn::MouseEvent& mouseEvent);
+
void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent);
void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent);
void mouseDragged(gcn::MouseEvent &event);
+ private:
+ gcn::Font *mFont;
+
protected:
static float mAlpha;
};