diff options
Diffstat (limited to 'src/gui/widgets/inventoryfilter.cpp')
-rw-r--r-- | src/gui/widgets/inventoryfilter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/inventoryfilter.cpp b/src/gui/widgets/inventoryfilter.cpp index 406860719..faceafa9e 100644 --- a/src/gui/widgets/inventoryfilter.cpp +++ b/src/gui/widgets/inventoryfilter.cpp @@ -23,6 +23,7 @@ #include "gui/widgets/horizontcontainer.h" #include "gui/widgets/radiobutton.h" +#include "log.h" InventoryFilter::InventoryFilter(std::string group, int height, int spacing): HorizontContainer(height, spacing), @@ -37,5 +38,17 @@ void InventoryFilter::add(std::string tag) RadioButton *radio = new RadioButton(tag, mGroup, mCount == 0); radio->adjustSize(); + radio->setActionEventId("tag_" + tag); + radio->addActionListener(this); HorizontContainer::add(radio); } + +void InventoryFilter::action(const gcn::ActionEvent &event) +{ + ActionListenerIterator iter; + for (iter = mActionListeners.begin(); + iter != mActionListeners.end(); ++iter) + { + (*iter)->action(event); + } +}
\ No newline at end of file |