News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::TextEntryUserInterface class Reference

Zap::TextEntryUserInterface Class Reference

#include <UINameEntry.h>

Inheritance diagram for Zap::TextEntryUserInterface:

Zap::UserInterface Zap::AdminPasswordEntryUserInterface Zap::NameEntryUserInterface Zap::PasswordEntryUserInterface

Public Member Functions

 TextEntryUserInterface ()
void onActivate ()
void render ()
void idle (U32 t)
void onKeyDown (U32 key)
void onKeyUp (U32 key)
virtual void onAccept (const char *text)=0
virtual void onEscape ()=0
const char * getText ()
void setText (const char *text)

Protected Attributes

const char * title
bool secret
bool resetOnActivate

Private Types

enum  {
  MaxTextLen = 32,
  BlinkTime = 100
}

Private Attributes

char buffer [MaxTextLen+1]
U32 cursorPos
bool blink
Timer mBlinkTimer

Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
MaxTextLen 
BlinkTime 


Constructor & Destructor Documentation

Zap::TextEntryUserInterface::TextEntryUserInterface  )  [inline]
 


Member Function Documentation

void Zap::TextEntryUserInterface::onActivate  )  [virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::TextEntryUserInterface::render  )  [virtual]
 

Reimplemented from Zap::UserInterface.

Reimplemented in Zap::AdminPasswordEntryUserInterface.

void Zap::TextEntryUserInterface::idle U32  t  )  [virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::TextEntryUserInterface::onKeyDown U32  key  )  [virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::TextEntryUserInterface::onKeyUp U32  key  )  [virtual]
 

Reimplemented from Zap::UserInterface.

virtual void Zap::TextEntryUserInterface::onAccept const char *  text  )  [pure virtual]
 

Implemented in Zap::NameEntryUserInterface, Zap::PasswordEntryUserInterface, and Zap::AdminPasswordEntryUserInterface.

virtual void Zap::TextEntryUserInterface::onEscape  )  [pure virtual]
 

Implemented in Zap::NameEntryUserInterface, Zap::PasswordEntryUserInterface, and Zap::AdminPasswordEntryUserInterface.

const char* Zap::TextEntryUserInterface::getText  )  [inline]
 

void Zap::TextEntryUserInterface::setText const char *  text  ) 
 


Field Documentation

char Zap::TextEntryUserInterface::buffer[MaxTextLen+1] [private]
 

U32 Zap::TextEntryUserInterface::cursorPos [private]
 

bool Zap::TextEntryUserInterface::blink [private]
 

Timer Zap::TextEntryUserInterface::mBlinkTimer [private]
 

const char* Zap::TextEntryUserInterface::title [protected]
 

bool Zap::TextEntryUserInterface::secret [protected]
 

bool Zap::TextEntryUserInterface::resetOnActivate [protected]