summaryrefslogtreecommitdiff
path: root/src/gui/widgets/listbox.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-05 13:18:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-05 13:18:04 +0300
commit53f2f59ade349bd404672ee3a5a06f1289afa190 (patch)
treeca595c457181a742bbebd3f890480341c949399b /src/gui/widgets/listbox.h
parent01660865a49250c6ed77159cb3d8b38e7ea37b95 (diff)
downloadmanaverse-53f2f59ade349bd404672ee3a5a06f1289afa190.tar.gz
manaverse-53f2f59ade349bd404672ee3a5a06f1289afa190.tar.bz2
manaverse-53f2f59ade349bd404672ee3a5a06f1289afa190.tar.xz
manaverse-53f2f59ade349bd404672ee3a5a06f1289afa190.zip
Allow scroll listboxes and popup list by holding and moving mouse.
Diffstat (limited to 'src/gui/widgets/listbox.h')
-rw-r--r--src/gui/widgets/listbox.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 4397a201e..27e24a030 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -73,6 +73,8 @@ class ListBox : public gcn::ListBox,
void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override;
+ void mousePressed(gcn::MouseEvent &event) override;
+
void mouseReleased(gcn::MouseEvent &event) override;
void mouseReleased1(gcn::MouseEvent &event);
@@ -93,12 +95,16 @@ class ListBox : public gcn::ListBox,
void setCenter(const bool b)
{ mCenterText = b; }
+ int getPressedIndex()
+ { return mPressedIndex; }
+
protected:
gcn::Color mHighlightColor;
gcn::Color mForegroundSelectedColor;
gcn::Color mForegroundSelectedColor2;
int mOldSelected;
int mPadding;
+ int mPressedIndex;
Skin *mSkin;
static float mAlpha;
bool mDistributeMousePressed;