26#include <guichan/actionlistener.hpp>
27#include <guichan/selectionlistener.hpp>
58 void action(
const gcn::ActionEvent &event)
override;
65 void valueChanged(
const gcn::SelectionEvent &event)
override;
Represents one or more instances of a certain item type.
void action(const gcn::ActionEvent &event) override
Called when receiving actions from the widgets.
void mouseClicked(gcn::MouseEvent &mouseEvent) override
Allows for quick-selling by extending double-click events.
std::list< SellDialog * > DialogList
void updateButtonsAndLabels()
Updates the state of buttons and labels.
void addItem(const Item *item, int price)
Adds an item to the inventory.
void reset()
Resets the dialog, clearing inventory.
gcn::Button * mIncreaseButton
gcn::Button * mSellButton
gcn::Label * mQuantityLabel
void setVisible(bool visible) override
Sets the visibility of this window.
gcn::ScrollArea * mScrollArea
void valueChanged(const gcn::SelectionEvent &event) override
Updates labels according to selected item.
static void closeAll()
Closes all instances.
static DialogList instances
gcn::Button * mDecreaseButton
ShopListBox * mShopItemList
gcn::Button * mAddMaxButton
void setMoney(int amount)
Gives Player's Money amount.
gcn::Button * mQuitButton
This class handles the list of items available in a shop.
A list box, meant to be used inside a scroll area.