Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

pawsInventoryWindow Class Reference

The is the main Inventory window for PlaneShift. More...

#include <inventorywindow.h>

List of all members.

Public Member Functions

virtual void Close ()
 Simply calls Hide() unless overidden.
void Dequip (const char *itemName)
 Dequips an item into closest available bulk slot.
bool Equip (const char *itemName, int stackCount, int toSlotID=-1)
 Equips an item into it's closest available slot.
pawsSlotGetFreeSlot ()
 Get a free slot.
virtual bool OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *widget)
 Called whenever a button is pressed.
virtual bool OnMouseDown (int button, int keyModifier, int x, int y)
 Manage mouse down event to test for and apply window changes.
 pawsInventoryWindow ()
bool PostSetup ()
 From pawsWidget.
void Refresh ()
void Show ()
 When the window is opened let the controller window know about it.
void Write (const char *itemName)
 Finds an item with the given name and attempts to open it as a book to write on.
 ~pawsInventoryWindow ()

Protected Member Functions

bool SetupDoll ()
bool SetupSlot (const char *slot)
 Helper function to setup the pawsSlot and container definitions.
void UpdateMoney (const char *moneyName, const char *imageName, int value)

Protected Attributes

csArray< pawsSlot * > bulkSlots
csArray< pawsSlot * > equipmentSlots
csRef< iThreadedLoader > loader
int maxDropCount
 Total items to drop.
pawsMoneymoney
pawsTextBoxtrias
pawsInventoryDollViewview
 A quick pointer to the object view that is the mesh doll.
pawsTextBoxweight

Detailed Description

The is the main Inventory window for PlaneShift.

It handles all the player's inventory and has a nice 3d model of the player to see what they looked like in their equipment.

Definition at line 53 of file inventorywindow.h.


Constructor & Destructor Documentation

pawsInventoryWindow::pawsInventoryWindow ( )
pawsInventoryWindow::~pawsInventoryWindow ( )

Member Function Documentation

virtual void pawsInventoryWindow::Close ( ) [virtual]

Simply calls Hide() unless overidden.

Reimplemented from pawsWidget.

void pawsInventoryWindow::Dequip ( const char *  itemName)

Dequips an item into closest available bulk slot.

Will pick the first item of the given name in an equipment slot to try to move to bulk. Will remove all items from the equipped slot.

Parameters:
itemNameThe name of the item in the inventory.
bool pawsInventoryWindow::Equip ( const char *  itemName,
int  stackCount,
int  toSlotID = -1 
)

Equips an item into it's closest available slot.

Will pick the first item of the given name in the bulk slots to try to equip. In this sense drinking a potion is the same as 'equipping' it.

Parameters:
itemNameThe name of the item in the inventory.
stackCountThe amount to try to equip.
toSlotIDThe slot you want to equip it to.
pawsSlot* pawsInventoryWindow::GetFreeSlot ( )

Get a free slot.

virtual bool pawsInventoryWindow::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.

virtual bool pawsInventoryWindow::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

bool pawsInventoryWindow::PostSetup ( ) [virtual]

From pawsWidget.

Reimplemented from pawsWidget.

void pawsInventoryWindow::Refresh ( )
bool pawsInventoryWindow::SetupDoll ( ) [protected]
bool pawsInventoryWindow::SetupSlot ( const char *  slot) [protected]

Helper function to setup the pawsSlot and container definitions.

void pawsInventoryWindow::Show ( void  ) [virtual]

When the window is opened let the controller window know about it.

Reimplemented from pawsControlledWindow.

void pawsInventoryWindow::UpdateMoney ( const char *  moneyName,
const char *  imageName,
int  value 
) [protected]
void pawsInventoryWindow::Write ( const char *  itemName)

Finds an item with the given name and attempts to open it as a book to write on.

Parameters:
itemNameThe name of the item in the inventory.

Member Data Documentation

Definition at line 120 of file inventorywindow.h.

Definition at line 121 of file inventorywindow.h.

csRef<iThreadedLoader> pawsInventoryWindow::loader [protected]

Definition at line 110 of file inventorywindow.h.

Total items to drop.

Definition at line 113 of file inventorywindow.h.

Definition at line 118 of file inventorywindow.h.

Definition at line 115 of file inventorywindow.h.

A quick pointer to the object view that is the mesh doll.

Definition at line 106 of file inventorywindow.h.

Definition at line 116 of file inventorywindow.h.


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