20 #ifndef PAWS_INVENTORY_WINDOW 21 #define PAWS_INVENTORY_WINDOW 24 #include <csutil/array.h> 25 #include <csutil/leakguard.h> 26 #include <imap/loader.h> 38 #include "../psinventorycache.h" 65 virtual bool OnMouseDown(
int button,
int keyModifier,
int x,
int y );
79 bool Equip(
const char* itemName,
int stackCount,
int toSlotID = -1 );
88 void Dequip(
const char* itemName);
95 void Write(
const char* itemName);
108 void UpdateMoney(
const char* moneyName,
const char* imageName,
int value );
This is a window that is controlled by a button on the control bar.
CREATE_PAWS_FACTORY(pawsInventoryWindow)
A slot which may contain one item, with icon, and stack count.
csRef< iThreadedLoader > loader
bool Equip(const char *itemName, int stackCount, int toSlotID=-1)
Equips an item into it's closest available slot.
void UpdateMoney(const char *moneyName, const char *imageName, int value)
pawsInventoryDollView * view
A quick pointer to the object view that is the mesh doll.
A manager class that handles all the details of a characters appearance.
The is the main Inventory window for PlaneShift.
The character 3D doll view - here we add a mouse listener so you can drag-n-drop inventory onto the a...
pawsMoney is widget that holds four items slots - for each coin.
bool SetupSlot(const char *slot)
Helper function to setup the pawsSlot and container definitions.
virtual bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
Called whenever a button is pressed.
int maxDropCount
Total items to drop.
virtual bool OnMouseDown(int button, int keyModifier, int x, int y)
Manage mouse down event to test for and apply window changes.
void Show()
When the window is opened let the controller window know about it.
bool PostSetup()
From pawsWidget.
void Dequip(const char *itemName)
Dequips an item into closest available bulk slot.
void Write(const char *itemName)
Finds an item with the given name and attempts to open it as a book to write on.
csArray< pawsSlot * > equipmentSlots
virtual void Close()
Simply calls Hide() unless overidden.
csArray< pawsSlot * > bulkSlots
pawsSlot * GetFreeSlot()
Get a free slot.