OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

CEnumMenuItem Class Reference
[Game logic (frontend + backend connection)]

Enumerated menu items have an integer value, and a set of values and texts which they can display for the user. More...

#include <menu.h>

Inheritance diagram for CEnumMenuItem:

CMenuItem List of all members.

Public Member Functions

 CEnumMenuItem (CMenu *a_poMenu, int a_iInitialValue, const char *a_pcUtf8Text, int a_iCode=-1)
virtual ~CEnumMenuItem ()
int GetCurrentValue ()
const char * GetCurrentText ()
virtual void Draw ()
virtual void Increment ()
virtual void Decrement ()
virtual void SetEnumValues (const char **a_ppcNames, const int *a_piValues)
virtual void SetMaxValue (int a_iMaxValue)

Protected Attributes

int m_iValue
int m_iMax
std::string m_sUtf8Title
const char ** m_ppcNames
const int * m_piValues

Detailed Description

Enumerated menu items have an integer value, and a set of values and texts which they can display for the user.

The user can switch between these values by incrementing and decrementing the value with the left and right arrow keys.


Constructor & Destructor Documentation

CEnumMenuItem::CEnumMenuItem CMenu a_poMenu,
int  a_iInitialValue,
const char *  a_pcUtf8Text,
int  a_iCode = -1
 

CEnumMenuItem::~CEnumMenuItem  )  [virtual]
 


Member Function Documentation

void CEnumMenuItem::Decrement  )  [virtual]
 

Reimplemented from CMenuItem.

void CEnumMenuItem::Draw  )  [virtual]
 

Reimplemented from CMenuItem.

const char * CEnumMenuItem::GetCurrentText  ) 
 

int CEnumMenuItem::GetCurrentValue  ) 
 

void CEnumMenuItem::Increment  )  [virtual]
 

Reimplemented from CMenuItem.

void CEnumMenuItem::SetEnumValues const char **  a_ppcNames,
const int *  a_piValues
[virtual]
 

void CEnumMenuItem::SetMaxValue int  a_iMaxValue  )  [virtual]
 


Member Data Documentation

int CEnumMenuItem::m_iMax [protected]
 

int CEnumMenuItem::m_iValue [protected]
 

const int* CEnumMenuItem::m_piValues [protected]
 

const char** CEnumMenuItem::m_ppcNames [protected]
 

std::string CEnumMenuItem::m_sUtf8Title [protected]
 


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