Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

pawsExchangeWindow Class Reference

The trade window in PlaneShift. More...

#include <pawsexchangewindow.h>

List of all members.

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

pawsWidgetofferingBG
 The background for the offering panel.
pawsMoneyofferingMoneyWidget
pawsSlotofferingSlots [EXCHANGE_SLOT_COUNT]
 List of slots for items that have been offered.
int originalWidth
 stores width of exchange window
pawsWidgetreceivingBG
 The background for the receiving panel.
pawsMoneyreceivingMoneyWidget
pawsSlotreceivingSlots [EXCHANGE_SLOT_COUNT]
 List of slots for items that will be receiving.
pawsTextBoxtotalTriasOffered
pawsTextBoxtotalTriasReceived
psExchangeType type
bool wasSmallInventoryOpen
 retain the state of the inventory window before opening the exchange

Detailed Description

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.


Constructor & Destructor Documentation

pawsExchangeWindow::pawsExchangeWindow ( )
virtual pawsExchangeWindow::~pawsExchangeWindow ( ) [virtual]

Member Function Documentation

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.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

bool pawsExchangeWindow::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

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.

Parameters:
playerThe name of the player to trade with.
withPlayerIs the user exchanging with other player, or with NPC ?

Member Data Documentation

The background for the offering panel.

Definition at line 96 of file pawsexchangewindow.h.

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.

stores width of exchange window

Definition at line 91 of file pawsexchangewindow.h.

The background for the receiving panel.

Definition at line 99 of file pawsexchangewindow.h.

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.

Definition at line 104 of file pawsexchangewindow.h.

Definition at line 104 of file pawsexchangewindow.h.

Definition at line 93 of file pawsexchangewindow.h.

retain the state of the inventory window before opening the exchange

Definition at line 88 of file pawsexchangewindow.h.


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