OpenMortal Apocalypse mirror
Sourceforge mirror 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

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

Basic menu item. More...

#include <menu.h>

Inheritance diagram for CMenuItem:

CEnumMenuItem CTextMenuItem List of all members.

Public Member Functions

 CMenuItem (CMenu *a_poMenu, const char *a_pcUtf8Text, int a_iCode=-1)
virtual ~CMenuItem ()
virtual void Draw ()
virtual void Clear ()
virtual void Activate ()
virtual void Increment ()
virtual void Decrement ()
virtual void SetText (const char *a_pcUtf8Text, bool a_bCenter)
virtual void SetPosition (const SDL_Rect &a_roPosition)
virtual void SetActive (bool a_bActive)
virtual void SetEnabled (bool a_bEnabled)
virtual bool GetEnabled () const
virtual int GetCode () const

Protected Attributes

std::string m_sUtf8Text
SDL_Rect m_oPosition
bool m_bCenter
Uint32 m_iHighColor
Uint32 m_iLowColor
Uint32 m_iInactiveColor
Uint32 m_iBackgroundColor
int m_iCode
bool m_bActive
bool m_bEnabled

Detailed Description

Basic menu item.

Menu items have a code which they pass to their parent menu when they are activated. Menu items can be enabled or disabled.

Constructor & Destructor Documentation

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

CMenuItem::~CMenuItem  )  [virtual]

Member Function Documentation

void CMenuItem::Activate  )  [virtual]

void CMenuItem::Clear  )  [virtual]

virtual void CMenuItem::Decrement  )  [inline, virtual]

Reimplemented in CEnumMenuItem.

void CMenuItem::Draw  )  [virtual]

Reimplemented in CEnumMenuItem, and CTextMenuItem.

virtual int CMenuItem::GetCode  )  const [inline, virtual]

virtual bool CMenuItem::GetEnabled  )  const [inline, virtual]

virtual void CMenuItem::Increment  )  [inline, virtual]

Reimplemented in CEnumMenuItem.

void CMenuItem::SetActive bool  a_bActive  )  [virtual]

void CMenuItem::SetEnabled bool  a_bEnabled  )  [virtual]

void CMenuItem::SetPosition const SDL_Rect &  a_roPosition  )  [virtual]

void CMenuItem::SetText const char *  a_pcUtf8Text,
bool  a_bCenter

Member Data Documentation

bool CMenuItem::m_bActive [protected]

bool CMenuItem::m_bCenter [protected]

bool CMenuItem::m_bEnabled [protected]

Uint32 CMenuItem::m_iBackgroundColor [protected]

int CMenuItem::m_iCode [protected]

Uint32 CMenuItem::m_iHighColor [protected]

Uint32 CMenuItem::m_iInactiveColor [protected]

Uint32 CMenuItem::m_iLowColor [protected]

SDL_Rect CMenuItem::m_oPosition [protected]

CMenu* CMenuItem::m_poMenu [protected]

std::string CMenuItem::m_sUtf8Text [protected]

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