The window that deals with interacting with a NPC merchant.
More...
#include <pawsmerchantwindow.h>
List of all members.
Public Member Functions |
void | Close () |
| Simply calls Hide() unless overidden.
|
void | DoTrade (int count, const char *itemName, const char *itemID) |
void | HandleMessage (MsgEntry *me) |
bool | OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget) |
| Called whenever a button is pressed.
|
void | OnListAction (pawsListBox *listbox, int status) |
| Called whenever an item in a child list box is selected.
|
void | OnNumberEntered (const char *name, int param, int value) |
| pawsMerchantWindow () |
bool | PostSetup () |
| This is called after the widget and all of it's children have been created.
|
virtual | ~pawsMerchantWindow () |
Protected Member Functions |
void | HandleCategories (const char *data) |
void | HandleItems (const char *data) |
void | HandleMerchant (const char *data) |
void | HandleMoney (const char *data) |
void | SetTradeMode (bool buy) |
void | TradeSelectedItem (bool all=false, bool single=false) |
| Handles the command of trading the item by interacting with the player.
|
void | UpdateMoney (const char *moneyName, const char *imageName, int value) |
Protected Attributes |
pawsListBox * | categoryBox |
| index of item, selected in the itemsBox
|
csString | currentID |
csString | currentItem |
pawsListBox * | itemsBox |
int | merchantID |
int | selectedItem |
int | tradeCommand |
pawsTextBox * | trias |
Detailed Description
The window that deals with interacting with a NPC merchant.
Definition at line 34 of file pawsmerchantwindow.h.
Constructor & Destructor Documentation
pawsMerchantWindow::pawsMerchantWindow |
( |
| ) |
|
virtual pawsMerchantWindow::~pawsMerchantWindow |
( |
| ) |
[virtual] |
Member Function Documentation
void pawsMerchantWindow::Close |
( |
| ) |
[virtual] |
void pawsMerchantWindow::DoTrade |
( |
int |
count, |
|
|
const char * |
itemName, |
|
|
const char * |
itemID |
|
) |
| |
void pawsMerchantWindow::HandleCategories |
( |
const char * |
data | ) |
[protected] |
void pawsMerchantWindow::HandleItems |
( |
const char * |
data | ) |
[protected] |
void pawsMerchantWindow::HandleMerchant |
( |
const char * |
data | ) |
[protected] |
void pawsMerchantWindow::HandleMessage |
( |
MsgEntry * |
me | ) |
[virtual] |
void pawsMerchantWindow::HandleMoney |
( |
const char * |
data | ) |
[protected] |
bool pawsMerchantWindow::OnButtonPressed |
( |
int |
button, |
|
|
int |
keyModifier, |
|
|
pawsWidget * |
widget |
|
) |
| [virtual] |
Called whenever a button is pressed.
- Parameters:
-
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
- Returns:
- bool Parent's result or FALSE if no parent.
Reimplemented from pawsWidget.
void pawsMerchantWindow::OnListAction |
( |
pawsListBox * |
selected, |
|
|
int |
status |
|
) |
| [virtual] |
Called whenever an item in a child list box is selected.
- Parameters:
-
selected | The listbox that has the item selected. |
status | From listbox when a row is selected. |
Reimplemented from pawsWidget.
void pawsMerchantWindow::OnNumberEntered |
( |
const char * |
name, |
|
|
int |
param, |
|
|
int |
value |
|
) |
| [virtual] |
bool pawsMerchantWindow::PostSetup |
( |
| ) |
[virtual] |
This is called after the widget and all of it's children have been created.
Reimplemented from pawsWidget.
void pawsMerchantWindow::SetTradeMode |
( |
bool |
buy | ) |
[protected] |
void pawsMerchantWindow::TradeSelectedItem |
( |
bool |
all = false , |
|
|
bool |
single = false |
|
) |
| [protected] |
Handles the command of trading the item by interacting with the player.
Checks if we buy a single or multiple item and asks in case of uncertainity the amount of items to buy
- Parameters:
-
all | indicates that all the item in the current selected entry will be bought/sold |
single | indicates only one item in the current selected entry will be bought/sold, even if more are available. |
void pawsMerchantWindow::UpdateMoney |
( |
const char * |
moneyName, |
|
|
const char * |
imageName, |
|
|
int |
value |
|
) |
| [protected] |
Member Data Documentation
The documentation for this class was generated from the following file: