#include <inventaire.h>
Public Member Functions | |
inventaire () | |
~inventaire () | |
int | init (int, coeur *, IGUIEnvironment *, stringc, rect< s32 >, int, INVENTAIRE_POS, stringc) |
int | update () |
Updating(should be call on each loop). | |
int | close () |
Close the base. | |
int | afficher (bool) |
IGUIImage * | getImage () |
int | addItem (int n, item) |
int | removeItem (int) |
int | getNumItem (const position2d< s32 >) |
item | getItem (int) |
item | getItem (const position2d< s32 >) |
int | getFreePlace () |
bool | OnEvent (const SEvent &) |
Private Attributes | |
IGUIEnvironment * | env |
int | vtot |
int | volume |
item * | it |
IGUIImage ** | images |
int | maxItem |
INVENTAIRE_POS | position |
IGUIImage * | image |
Definition at line 10 of file inventaire.h.
inventaire::inventaire | ( | ) |
Definition at line 8 of file inventaire.cpp.
inventaire::~inventaire | ( | ) |
Definition at line 13 of file inventaire.cpp.
int inventaire::addItem | ( | int | n, | |
item | m | |||
) |
Definition at line 107 of file inventaire.cpp.
References base::getId(), item::getTexture(), coeur::getTexture(), images, it, maxItem, and base::mycore.
int inventaire::afficher | ( | bool | a | ) |
int inventaire::close | ( | ) | [virtual] |
Close the base.
Close the log and put base::initialize to false
Reimplemented from base.
Definition at line 90 of file inventaire.cpp.
int inventaire::getFreePlace | ( | ) |
Definition at line 145 of file inventaire.cpp.
References base::getId(), it, and maxItem.
IGUIImage * inventaire::getImage | ( | ) |
Definition at line 102 of file inventaire.cpp.
References image.
item inventaire::getItem | ( | const position2d< s32 > | pos | ) |
Definition at line 140 of file inventaire.cpp.
References getNumItem(), and it.
item inventaire::getItem | ( | int | n | ) |
Definition at line 133 of file inventaire.cpp.
int inventaire::getNumItem | ( | const position2d< s32 > | pos | ) |
Definition at line 125 of file inventaire.cpp.
References images, and maxItem.
Referenced by getItem().
int inventaire::init | ( | int | i, | |
coeur * | c, | |||
IGUIEnvironment * | e, | |||
stringc | path, | |||
rect< s32 > | pos, | |||
int | v, | |||
INVENTAIRE_POS | p, | |||
stringc | pathvoid | |||
) |
Definition at line 18 of file inventaire.cpp.
References afficher(), env, coeur::getTexture(), image, images, INVENTAIRE_POS_BAS, INVENTAIRE_POS_DROITE, INVENTAIRE_POS_GAUCHE, INVENTAIRE_POS_HAUT, it, maxItem, base::mycore, position, volume, and vtot.
Referenced by interface::addInventaire().
bool inventaire::OnEvent | ( | const SEvent & | event | ) |
Definition at line 153 of file inventaire.cpp.
int inventaire::removeItem | ( | int | n | ) |
Definition at line 116 of file inventaire.cpp.
References base::getId(), images, it, and maxItem.
int inventaire::update | ( | ) | [virtual] |
Updating(should be call on each loop).
Does nothing
Reimplemented from base.
Definition at line 85 of file inventaire.cpp.
IGUIEnvironment* inventaire::env [private] |
Definition at line 35 of file inventaire.h.
Referenced by init().
IGUIImage* inventaire::image [private] |
Definition at line 46 of file inventaire.h.
Referenced by afficher(), getImage(), and init().
IGUIImage** inventaire::images [private] |
Definition at line 41 of file inventaire.h.
Referenced by addItem(), getNumItem(), init(), and removeItem().
item* inventaire::it [private] |
Definition at line 40 of file inventaire.h.
Referenced by addItem(), getFreePlace(), getItem(), init(), and removeItem().
int inventaire::maxItem [private] |
Definition at line 42 of file inventaire.h.
Referenced by addItem(), getFreePlace(), getItem(), getNumItem(), init(), and removeItem().
INVENTAIRE_POS inventaire::position [private] |
Definition at line 44 of file inventaire.h.
Referenced by init().
int inventaire::volume [private] |
Definition at line 38 of file inventaire.h.
Referenced by init().
int inventaire::vtot [private] |
Definition at line 37 of file inventaire.h.
Referenced by init().