InventoryDialog Class Reference

#include <InventoryDialog.h>

Inheritance diagram for InventoryDialog:

GLWWindow GLWButtonI GLWDropDownI GLWPanel GLWidget MetaClass

List of all members.

Public Member Functions

virtual void buttonDown (unsigned int id)
virtual void windowInit (const unsigned state)
virtual void select (unsigned int id, const int pos, GLWSelectorEntry value)
virtual void display ()

Static Public Member Functions

static InventoryDialoginstance ()

Protected Member Functions

void setupWindow ()
void playerRefresh ()
void addPlayerName ()
void addPlayerWeapons ()

Protected Attributes

unsigned int okId_
GLWTabsellTab_
GLWPaneltopPanel_
GLWDropDownTextsortDropDown_

Static Protected Attributes

static InventoryDialoginstance_ = 0

Private Member Functions

 InventoryDialog ()
virtual ~InventoryDialog ()


Detailed Description

Definition at line 33 of file InventoryDialog.h.


Constructor & Destructor Documentation

InventoryDialog::InventoryDialog (  )  [private]

Definition at line 47 of file InventoryDialog.cpp.

References GLWDropDownText::addText(), GLWPanel::addWidget(), GLWButton::ButtonFlagCenterX, GLWButton::ButtonFlagOk, GLWidget::getId(), GLWPanel::GLWPanel(), LANG_RESOURCE, okId_, sellTab_, GLWDropDown::setHandler(), GLWidget::setName(), sortDropDown_, and topPanel_.

InventoryDialog::~InventoryDialog (  )  [private, virtual]

Definition at line 70 of file InventoryDialog.cpp.


Member Function Documentation

InventoryDialog * InventoryDialog::instance (  )  [static]

Definition at line 41 of file InventoryDialog.cpp.

References instance_.

Referenced by ClientWindowSetup::addCommonComponents().

void InventoryDialog::buttonDown ( unsigned int  id  )  [virtual]

Implements GLWButtonI.

Definition at line 199 of file InventoryDialog.cpp.

References GLWidget::getId(), GLWWindowManager::hideWindow(), GLWWindowManager::instance(), and okId_.

void InventoryDialog::windowInit ( const unsigned  state  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 190 of file InventoryDialog.cpp.

References TankContainer::getCurrentTank(), ScorchedContext::getTankContainer(), ScorchedClient::instance(), and playerRefresh().

void InventoryDialog::select ( unsigned int  id,
const int  pos,
GLWSelectorEntry  value 
) [virtual]

Implements GLWDropDownI.

Definition at line 75 of file InventoryDialog.cpp.

References display(), OptionsDisplay::getAccessorySortKeyEntry(), GLWSelectorEntry::getDataText(), GLWidget::getId(), OptionsDisplay::instance(), playerRefresh(), OptionEntryEnum::setValue(), sortDropDown_, AccessoryStore::SortName, AccessoryStore::SortNothing, AccessoryStore::SortPrice, and LangStringUtil::strcmp().

void InventoryDialog::display (  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 93 of file InventoryDialog.cpp.

References OptionsDisplay::instance(), LANG_RESOURCE, playerRefresh(), GLWDropDownText::setCurrentText(), GLWDropDown::setHandler(), sortDropDown_, AccessoryStore::SortName, AccessoryStore::SortNothing, and AccessoryStore::SortPrice.

Referenced by select().

void InventoryDialog::setupWindow (  )  [protected]

Definition at line 117 of file InventoryDialog.cpp.

References GLViewPort::getHeight(), GLWWindow::needCentered_, sellTab_, GLWTab::setH(), GLWidget::setH(), GLWidget::setY(), and topPanel_.

Referenced by playerRefresh().

void InventoryDialog::playerRefresh (  )  [protected]

Definition at line 183 of file InventoryDialog.cpp.

References addPlayerName(), addPlayerWeapons(), and setupWindow().

Referenced by display(), select(), and windowInit().

void InventoryDialog::addPlayerName (  )  [protected]

Definition at line 131 of file InventoryDialog.cpp.

References GLWPanel::addWidget(), GLWPanel::clear(), S3D::formatStringBuffer(), Tank::getColor(), TankContainer::getCurrentTank(), TankScore::getMoney(), Tank::getScore(), ScorchedContext::getTankContainer(), Target::getTargetName(), ScorchedClient::instance(), LANG_RESOURCE_2, LANG_STRING, and topPanel_.

Referenced by playerRefresh().

void InventoryDialog::addPlayerWeapons (  )  [protected]

Definition at line 148 of file InventoryDialog.cpp.

References GLWPanel::addWidget(), GLWScrollPanel::clear(), S3D::formatStringBuffer(), Tank::getAccessories(), TankAccessories::getAccessoryCount(), TankAccessories::getAccessoryCountString(), ScorchedContext::getAccessoryStore(), TankAccessories::getAllAccessories(), TankContainer::getCurrentTank(), Accessory::getName(), Accessory::getSellPrice(), ScorchedContext::getTankContainer(), Accessory::getTexture(), Accessory::getToolTip(), OptionsDisplay::instance(), ScorchedClient::instance(), LANG_RESOURCE, LANG_STRING, sellTab_, GLWidget::setToolTip(), and AccessoryStore::sortList().

Referenced by playerRefresh().


Member Data Documentation

InventoryDialog * InventoryDialog::instance_ = 0 [static, protected]

Definition at line 51 of file InventoryDialog.h.

Referenced by instance().

unsigned int InventoryDialog::okId_ [protected]

Definition at line 53 of file InventoryDialog.h.

Referenced by buttonDown(), and InventoryDialog().

GLWTab* InventoryDialog::sellTab_ [protected]

Definition at line 54 of file InventoryDialog.h.

Referenced by addPlayerWeapons(), InventoryDialog(), and setupWindow().

GLWPanel* InventoryDialog::topPanel_ [protected]

Definition at line 55 of file InventoryDialog.h.

Referenced by addPlayerName(), InventoryDialog(), and setupWindow().

GLWDropDownText* InventoryDialog::sortDropDown_ [protected]

Definition at line 56 of file InventoryDialog.h.

Referenced by display(), InventoryDialog(), and select().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:03 2009 for Scorched3D by  doxygen 1.5.3