Planeshift
|
The trade window in PlaneShift. More...
#include <pawsexchangewindow.h>
Public Member Functions | |
void | Close () |
Simply calls Hide() unless overidden. | |
void | HandleMessage (MsgEntry *me) |
bool | OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget) |
Called whenever a button is pressed. | |
pawsExchangeWindow () | |
bool | PostSetup () |
This is called after the widget and all of it's children have been created. | |
void | SendAccept () |
Sends psExchangeAcceptMsg message to the server. | |
void | SendEnd () |
Sends a psExchangeEndMsg message to the server. | |
virtual | ~pawsExchangeWindow () |
Protected Member Functions | |
void | Clear () |
Clear out the exchange window and reset the backgrounds. | |
void | HandleMoney (MsgEntry *me) |
Handles incomming messages that deal with exchange money. | |
void | StartExchange (csString &player, bool withPlayer) |
Start a new exchange with a player. | |
Protected Attributes | |
pawsWidget * | offeringBG |
The background for the offering panel. | |
pawsMoney * | offeringMoneyWidget |
pawsSlot * | offeringSlots [EXCHANGE_SLOT_COUNT] |
List of slots for items that have been offered. | |
int | originalWidth |
stores width of exchange window | |
pawsWidget * | receivingBG |
The background for the receiving panel. | |
pawsMoney * | receivingMoneyWidget |
pawsSlot * | receivingSlots [EXCHANGE_SLOT_COUNT] |
List of slots for items that will be receiving. | |
pawsTextBox * | totalTriasOffered |
pawsTextBox * | totalTriasReceived |
psExchangeType | type |
bool | wasSmallInventoryOpen |
retain the state of the inventory window before opening the exchange |
The trade window in PlaneShift.
This is the window that people will use to trade with each other. There are 4 slots for items and 4 for money for both receiving and offering. Whenever a person accepts their panel will change so each client knows. If the trade is canceled no items are transfered.
Definition at line 51 of file pawsexchangewindow.h.
pawsExchangeWindow::pawsExchangeWindow | ( | ) |
virtual pawsExchangeWindow::~pawsExchangeWindow | ( | ) | [virtual] |
void pawsExchangeWindow::Clear | ( | ) | [protected] |
Clear out the exchange window and reset the backgrounds.
void pawsExchangeWindow::Close | ( | ) | [virtual] |
Simply calls Hide() unless overidden.
Reimplemented from pawsWidget.
void pawsExchangeWindow::HandleMessage | ( | MsgEntry * | me | ) | [virtual] |
Implements psClientNetSubscriber.
void pawsExchangeWindow::HandleMoney | ( | MsgEntry * | me | ) | [protected] |
Handles incomming messages that deal with exchange money.
bool pawsExchangeWindow::OnButtonPressed | ( | int | button, |
int | keyModifier, | ||
pawsWidget * | widget | ||
) | [virtual] |
Called whenever a button is pressed.
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
Reimplemented from pawsWidget.
bool pawsExchangeWindow::PostSetup | ( | ) | [virtual] |
This is called after the widget and all of it's children have been created.
Reimplemented from pawsWidget.
void pawsExchangeWindow::SendAccept | ( | ) |
Sends psExchangeAcceptMsg message to the server.
void pawsExchangeWindow::SendEnd | ( | ) |
Sends a psExchangeEndMsg message to the server.
void pawsExchangeWindow::StartExchange | ( | csString & | player, |
bool | withPlayer | ||
) | [protected] |
Start a new exchange with a player.
player | The name of the player to trade with. |
withPlayer | Is the user exchanging with other player, or with NPC ? |
pawsWidget* pawsExchangeWindow::offeringBG [protected] |
The background for the offering panel.
Definition at line 96 of file pawsexchangewindow.h.
pawsMoney* pawsExchangeWindow::offeringMoneyWidget [protected] |
Definition at line 101 of file pawsexchangewindow.h.
pawsSlot* pawsExchangeWindow::offeringSlots[EXCHANGE_SLOT_COUNT] [protected] |
List of slots for items that have been offered.
Definition at line 107 of file pawsexchangewindow.h.
int pawsExchangeWindow::originalWidth [protected] |
stores width of exchange window
Definition at line 91 of file pawsexchangewindow.h.
pawsWidget* pawsExchangeWindow::receivingBG [protected] |
The background for the receiving panel.
Definition at line 99 of file pawsexchangewindow.h.
pawsMoney * pawsExchangeWindow::receivingMoneyWidget [protected] |
Definition at line 101 of file pawsexchangewindow.h.
pawsSlot* pawsExchangeWindow::receivingSlots[EXCHANGE_SLOT_COUNT] [protected] |
List of slots for items that will be receiving.
Definition at line 110 of file pawsexchangewindow.h.
pawsTextBox* pawsExchangeWindow::totalTriasOffered [protected] |
Definition at line 104 of file pawsexchangewindow.h.
pawsTextBox * pawsExchangeWindow::totalTriasReceived [protected] |
Definition at line 104 of file pawsexchangewindow.h.
psExchangeType pawsExchangeWindow::type [protected] |
Definition at line 93 of file pawsexchangewindow.h.
bool pawsExchangeWindow::wasSmallInventoryOpen [protected] |
retain the state of the inventory window before opening the exchange
Definition at line 88 of file pawsexchangewindow.h.