From f34f096ee0f3c2e66eec7dc024dd18a74698840f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Aug 2013 20:25:34 +0300 Subject: add support for centered text in listbox. --- src/gui/widgets/listbox.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/listbox.h') diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index 113174332..dd22ca431 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -82,7 +82,7 @@ class ListBox : public gcn::ListBox, void refocus(); - void setDistributeMousePressed(bool b) + void setDistributeMousePressed(const bool b) { mDistributeMousePressed = b; } virtual void adjustSize(); @@ -91,6 +91,9 @@ class ListBox : public gcn::ListBox, virtual int getSelectionByMouse(const int y) const; + void setCenter(const bool b) + { mCenterText = b; } + protected: gcn::Color mHighlightColor; gcn::Color mForegroundColor2; @@ -101,6 +104,7 @@ class ListBox : public gcn::ListBox, Skin *mSkin; static float mAlpha; bool mDistributeMousePressed; + bool mCenterText; }; #endif // GUI_WIDGETS_LISTBOX_H -- cgit v1.2.3-70-g09d2