Planeshift
|
The is the main Inventory window for PlaneShift. More...
#include <inventorywindow.h>
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. | |
pawsSlot * | GetFreeSlot () |
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. | |
pawsMoney * | money |
pawsTextBox * | trias |
pawsInventoryDollView * | view |
A quick pointer to the object view that is the mesh doll. | |
pawsTextBox * | weight |
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.
pawsInventoryWindow::pawsInventoryWindow | ( | ) |
pawsInventoryWindow::~pawsInventoryWindow | ( | ) |
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.
itemName | The name of the item in the inventory. |
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.
itemName | The name of the item in the inventory. |
stackCount | The amount to try to equip. |
toSlotID | The 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.
button | The button pressed. |
keyModifier | Modifier key in effect. |
widget | The widget the button belongs to. |
Reimplemented from pawsWidget.
Manage mouse down event to test for and apply window changes.
button | Type of button: 1 resizable or movable, 2 context menu or config window. |
modifiers | Used with PAWS_CONSTRUCTION. |
x | Used to test for resize. |
y | Used to test for resize. |
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.
itemName | The name of the item in the inventory. |
csArray<pawsSlot*> pawsInventoryWindow::bulkSlots [protected] |
Definition at line 120 of file inventorywindow.h.
csArray<pawsSlot*> pawsInventoryWindow::equipmentSlots [protected] |
Definition at line 121 of file inventorywindow.h.
csRef<iThreadedLoader> pawsInventoryWindow::loader [protected] |
Definition at line 110 of file inventorywindow.h.
int pawsInventoryWindow::maxDropCount [protected] |
Total items to drop.
Definition at line 113 of file inventorywindow.h.
pawsMoney* pawsInventoryWindow::money [protected] |
Definition at line 118 of file inventorywindow.h.
pawsTextBox* pawsInventoryWindow::trias [protected] |
Definition at line 115 of file inventorywindow.h.
pawsInventoryDollView* pawsInventoryWindow::view [protected] |
A quick pointer to the object view that is the mesh doll.
Definition at line 106 of file inventorywindow.h.
pawsTextBox* pawsInventoryWindow::weight [protected] |
Definition at line 116 of file inventorywindow.h.