BuyDialog Class Reference
[User interface related classes (windows, dialogs)]

#include <buy.h>

Inheritance diagram for BuyDialog:

Window

List of all members.


Detailed Description

The buy dialog.

Definition at line 41 of file buy.h.


Public Member Functions

 BuyDialog ()
 Constructor.
 ~BuyDialog ()
 Destructor.
void reset ()
 Resets the dialog, clearing shop inventory.
void setMoney (int amount)
 Sets the amount of available money.
void addItem (int id, int amount, int price)
 Adds an item to the shop inventory.
void action (const gcn::ActionEvent &event)
 Called when receiving actions from the widgets.
int getNumberOfElements ()
 Returns the number of items in the shop inventory.
void valueChanged (const gcn::SelectionEvent &event)
 Updates the labels according to the selected item.
std::string getElementAt (int i)
 Returns the name of item number i in the shop inventory.
void updateButtonsAndLabels ()
 Updates the state of buttons and labels.
void logic ()
 Check for current NPC.
void setVisible (bool visible)
 Sets the visibility of this window.
void close ()
 Closes the Buy Window, as well as resetting the current npc.

Private Attributes

gcn::Button * mBuyButton
gcn::Button * mQuitButton
gcn::Button * mAddMaxButton
gcn::Button * mIncreaseButton
gcn::Button * mDecreaseButton
ShopListBoxmShopItemList
gcn::ScrollArea * mScrollArea
gcn::Label * mItemDescLabel
gcn::Label * mItemEffectLabel
gcn::Label * mMoneyLabel
gcn::Label * mQuantityLabel
gcn::Slider * mSlider
ShopItemsmShopItems
int mMoney
int mAmountItems
int mMaxItems

Constructor & Destructor Documentation

BuyDialog::BuyDialog (  ) 

Constructor.

See also:
Window::Window

Definition at line 45 of file buy.cpp.

BuyDialog::~BuyDialog (  ) 

Destructor.

Definition at line 110 of file buy.cpp.


Member Function Documentation

void BuyDialog::reset (  ) 

Resets the dialog, clearing shop inventory.

Definition at line 123 of file buy.cpp.

void BuyDialog::setMoney ( int  amount  ) 

Sets the amount of available money.

Definition at line 115 of file buy.cpp.

void BuyDialog::addItem ( int  id,
int  amount,
int  price 
)

Adds an item to the shop inventory.

Definition at line 135 of file buy.cpp.

void BuyDialog::action ( const gcn::ActionEvent &  event  ) 

Called when receiving actions from the widgets.

Definition at line 141 of file buy.cpp.

int BuyDialog::getNumberOfElements (  ) 

Returns the number of items in the shop inventory.

void BuyDialog::valueChanged ( const gcn::SelectionEvent &  event  ) 

Updates the labels according to the selected item.

Definition at line 203 of file buy.cpp.

std::string BuyDialog::getElementAt ( int  i  ) 

Returns the name of item number i in the shop inventory.

void BuyDialog::updateButtonsAndLabels (  ) 

Updates the state of buttons and labels.

Definition at line 213 of file buy.cpp.

void BuyDialog::logic (  ) 

Check for current NPC.

Definition at line 261 of file buy.cpp.

void BuyDialog::setVisible ( bool  visible  ) 

Sets the visibility of this window.

Reimplemented from Window.

Definition at line 268 of file buy.cpp.

void BuyDialog::close (  )  [virtual]

Closes the Buy Window, as well as resetting the current npc.

Reimplemented from Window.

Definition at line 276 of file buy.cpp.


Member Data Documentation

gcn::Button* BuyDialog::mBuyButton [private]

Definition at line 113 of file buy.h.

gcn::Button* BuyDialog::mQuitButton [private]

Definition at line 114 of file buy.h.

gcn::Button* BuyDialog::mAddMaxButton [private]

Definition at line 115 of file buy.h.

gcn::Button* BuyDialog::mIncreaseButton [private]

Definition at line 116 of file buy.h.

gcn::Button* BuyDialog::mDecreaseButton [private]

Definition at line 117 of file buy.h.

Definition at line 118 of file buy.h.

gcn::ScrollArea* BuyDialog::mScrollArea [private]

Definition at line 119 of file buy.h.

gcn::Label* BuyDialog::mItemDescLabel [private]

Definition at line 120 of file buy.h.

gcn::Label* BuyDialog::mItemEffectLabel [private]

Definition at line 121 of file buy.h.

gcn::Label* BuyDialog::mMoneyLabel [private]

Definition at line 122 of file buy.h.

gcn::Label* BuyDialog::mQuantityLabel [private]

Definition at line 123 of file buy.h.

gcn::Slider* BuyDialog::mSlider [private]

Definition at line 124 of file buy.h.

Definition at line 126 of file buy.h.

int BuyDialog::mMoney [private]

Definition at line 128 of file buy.h.

int BuyDialog::mAmountItems [private]

Definition at line 129 of file buy.h.

int BuyDialog::mMaxItems [private]

Definition at line 130 of file buy.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5