Orxonox: orxonox::PickupInventory Class Reference

# orxonox::PickupInventory Class Reference

Static class for the inventory GUI window. More...

`#include <src/orxonox/objects/pickup/PickupInventory.h>`

List of all members.

## Public Member Functions

void | clearInventory (CEGUI::WindowManager *winMgr, CEGUI::Window *equipPane, CEGUI::Window *usablePane)
const bool | isVisible () const
| PickupInventory ()
void | setVisible (bool visible)
void | updateEquipment (CEGUI::WindowManager *winMgr, CEGUI::Window *target)
void | updateTabs (CEGUI::WindowManager *winMgr, CEGUI::Window *equipWindow, CEGUI::Window *usableWindow)
void | updateUsable (CEGUI::WindowManager *winMgr, CEGUI::Window *target)
virtual | ~PickupInventory ()

## Static Public Member Functions

static void | createItemWindows (CEGUI::WindowManager *winMgr, const std::string &id, int x, int y)
static unsigned int | getCurrentUsableIndex ()
static unsigned int | getEquipmentCount ()
static BaseItem * | getEquipmentItem (unsigned int i)
static std::string | getImageForItem (const BaseItem *item)
static unsigned int | getPassiveCount ()
static BaseItem * | getPassiveItem (unsigned int i)
static PickupInventory * | getSingleton ()
static unsigned int | getUsableCount ()
static BaseItem * | getUsableItem (unsigned int i)
static bool | isCurrentUsable (const BaseItem *item)
static void | selectUsable (unsigned int i)
static void | setWindowProperties (CEGUI::WindowManager *winMgr, CEGUI::Window *target, const std::string &id, const BaseItem *item, const std::string &textColour)
static void | toggleInventory ()

## Private Attributes

bool | bInventoryVisible_
unsigned int | createdEquipmentWindows_
unsigned int | createdUsableWindows_
unsigned int | visibleEquipmentWindows_
unsigned int | visibleUsableWIndows_

## Static Private Attributes

static PickupInventory * | pickupInventory_s = NULL

## Detailed Description

Static class for the inventory GUI window.

Author:
  Daniel 'Huty' Haggenmueller

## Constructor & Destructor Documentation

orxonox::PickupInventory::PickupInventory | ( |  | ) |

References bInventoryVisible_, createdEquipmentWindows_, createdUsableWindows_, createItemWindows(), visibleEquipmentWindows_, and visibleUsableWIndows_.

Referenced by getSingleton().

orxonox::PickupInventory::~PickupInventory | ( |  | ) | `[virtual]`

## Member Function Documentation

void orxonox::PickupInventory::clearInventory | ( | CEGUI::WindowManager * | winMgr,
|  | CEGUI::Window * | equipPane,
|  | CEGUI::Window * | usablePane |
| ) |  |  |

References visibleEquipmentWindows_, and visibleUsableWIndows_.

void orxonox::PickupInventory::createItemWindows | ( | CEGUI::WindowManager * | winMgr,
|  | const std::string & | id,
|  | int | x,
|  | int | y |
| ) |  |  | `[static]`

Referenced by PickupInventory(), updateEquipment(), and updateUsable().

unsigned int orxonox::PickupInventory::getCurrentUsableIndex | ( |  | ) | `[static]`

References orxonox::PickupCollection::getCurrentUsable(), orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), and orxonox::PickupCollection::getUsableItems().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getCurrentUsableIndex00().

unsigned int orxonox::PickupInventory::getEquipmentCount | ( |  | ) | `[static]`

References orxonox::PickupCollection::getEquipmentItems(), orxonox::HumanController::getLocalControllerEntityAsPawn(), and orxonox::Pawn::getPickups().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getEquipmentCount00().

BaseItem * orxonox::PickupInventory::getEquipmentItem | ( | unsigned int | i | ) | `[static]`

References orxonox::PickupCollection::getEquipmentItems(), orxonox::HumanController::getLocalControllerEntityAsPawn(), and orxonox::Pawn::getPickups().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getEquipmentItem00().

std::string orxonox::PickupInventory::getImageForItem | ( | const BaseItem * | item | ) | `[static]`

References orxonox::BaseItem::getGUIImage().

Referenced by setWindowProperties(), tolua_Orxonox_orxonox_PickupInventory_getImageForItem00(), and orxonox::PickupSpawner::XMLPort().

unsigned int orxonox::PickupInventory::getPassiveCount | ( |  | ) | `[static]`

References orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::PickupCollection::getPassiveItems(), and orxonox::Pawn::getPickups().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getPassiveCount00().

BaseItem * orxonox::PickupInventory::getPassiveItem | ( | unsigned int | i | ) | `[static]`

References orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::PickupCollection::getPassiveItems(), and orxonox::Pawn::getPickups().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getPassiveItem00().

PickupInventory * orxonox::PickupInventory::getSingleton | ( |  | ) | `[static]`

References PickupInventory(), and pickupInventory_s.

Referenced by toggleInventory(), tolua_Orxonox_orxonox_PickupInventory_getSingleton00(), and orxonox::PickupSpawner::XMLPort().

unsigned int orxonox::PickupInventory::getUsableCount | ( |  | ) | `[static]`

References orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), and orxonox::PickupCollection::getUsableItems().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getUsableCount00().

BaseItem * orxonox::PickupInventory::getUsableItem | ( | unsigned int | i | ) | `[static]`

References orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), and orxonox::PickupCollection::getUsableItems().

Referenced by tolua_Orxonox_orxonox_PickupInventory_getUsableItem00().

bool orxonox::PickupInventory::isCurrentUsable | ( | const BaseItem * | item | ) | `[static]`

References orxonox::PickupCollection::getCurrentUsable(), orxonox::HumanController::getLocalControllerEntityAsPawn(), and orxonox::Pawn::getPickups().

Referenced by tolua_Orxonox_orxonox_PickupInventory_isCurrentUsable00(), and updateUsable().

const bool orxonox::PickupInventory::isVisible | ( |  | ) | const`[inline]`

Referenced by toggleInventory().

void orxonox::PickupInventory::selectUsable | ( | unsigned int | i | ) | `[static]`

References orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), orxonox::PickupCollection::getUsableItems(), and orxonox::PickupCollection::setCurrentUsable().

Referenced by tolua_Orxonox_orxonox_PickupInventory_selectUsable00().

void orxonox::PickupInventory::setVisible | ( | bool | visible | ) | `[inline]`

Referenced by toggleInventory().

void orxonox::PickupInventory::setWindowProperties | ( | CEGUI::WindowManager * | winMgr,
|  | CEGUI::Window * | target,
|  | const std::string & | id,
|  | const BaseItem * | item,
|  | const std::string & | textColour |
| ) |  |  | `[static]`

References orxonox::BaseItem::getGUIText(), and getImageForItem().

Referenced by updateEquipment(), and updateUsable().

void orxonox::PickupInventory::toggleInventory | ( |  | ) | `[static]`

References orxonox::GUIManager::executeCode(), orxonox::InputManager::getInstance(), orxonox::GUIManager::getInstance(), getSingleton(), isVisible(), orxonox::InputManager::requestEnterState(), orxonox::InputManager::requestLeaveState(), setVisible(), and orxonox::GUIManager::showGUI().

Referenced by tolua_Orxonox_orxonox_PickupInventory_toggleInventory00().

void orxonox::PickupInventory::updateEquipment | ( | CEGUI::WindowManager * | winMgr,
|  | CEGUI::Window * | target |
| ) |  |  |

References createdEquipmentWindows_, createItemWindows(), orxonox::PickupCollection::getEquipmentItems(), orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), setWindowProperties(), and visibleEquipmentWindows_.

Referenced by updateTabs().

void orxonox::PickupInventory::updateTabs | ( | CEGUI::WindowManager * | winMgr,
|  | CEGUI::Window * | equipWindow,
|  | CEGUI::Window * | usableWindow |
| ) |  |  |

References updateEquipment(), and updateUsable().

void orxonox::PickupInventory::updateUsable | ( | CEGUI::WindowManager * | winMgr,
|  | CEGUI::Window * | target |
| ) |  |  |

References createdUsableWindows_, createItemWindows(), orxonox::HumanController::getLocalControllerEntityAsPawn(), orxonox::Pawn::getPickups(), orxonox::PickupCollection::getUsableItems(), isCurrentUsable(), setWindowProperties(), and visibleUsableWIndows_.

Referenced by updateTabs().

## Member Data Documentation

bool orxonox::PickupInventory::bInventoryVisible_`[private]`

Referenced by PickupInventory().

unsigned int orxonox::PickupInventory::createdEquipmentWindows_`[private]`

Referenced by PickupInventory(), and updateEquipment().

unsigned int orxonox::PickupInventory::createdUsableWindows_`[private]`

Referenced by PickupInventory(), and updateUsable().

PickupInventory * orxonox::PickupInventory::pickupInventory_s = NULL`[static, private]`

Referenced by getSingleton().

unsigned int orxonox::PickupInventory::visibleEquipmentWindows_`[private]`

Referenced by clearInventory(), PickupInventory(), and updateEquipment().

unsigned int orxonox::PickupInventory::visibleUsableWIndows_`[private]`

Referenced by clearInventory(), PickupInventory(), and updateUsable().

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

- src/orxonox/objects/pickup/PickupInventory.h
- src/orxonox/objects/pickup/PickupInventory.cc