Mercurial > fife-parpg
diff engine/core/gui/widgets/widgets.i @ 616:c770794d0a4a
Added a simple percentage bar widget along with a quick demo in the sliders portion of the pychan_demo. Note: I have not tested the foreground image feature yet. fixes[t:411]
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 27 Sep 2010 15:38:09 +0000 |
parents | 51cc05d862f2 |
children |
line wrap: on
line diff
--- a/engine/core/gui/widgets/widgets.i Mon Sep 27 14:22:07 2010 +0000 +++ b/engine/core/gui/widgets/widgets.i Mon Sep 27 15:38:09 2010 +0000 @@ -29,6 +29,7 @@ #include "gui/widgets/togglebutton.h" #include "gui/widgets/clicklabel.h" #include "gui/widgets/icon2.hpp" +#include "gui/widgets/percentagebar.hpp" %} namespace gcn { @@ -422,6 +423,24 @@ virtual ~Icon2(); void setImage(Image* image); }; + + %feature("notabstract") PercentageBar; + class PercentageBar: public Widget { + public: + PercentageBar(); + virtual ~PercentageBar(); + virtual void setForegroundImage(Image* image); + virtual void setOrientation(PercentageBar::Orientation orientation); + virtual PercentageBar::Orientation getOrientation() const; + virtual int getValue() const; + virtual void setValue(int value); + + enum Orientation + { + HORIZONTAL = 0, + VERTICAL + }; + }; }