Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::UserInterface Class Reference

# Zap::UserInterface Class Reference

`#include <UI.h>`

Inheritance diagram for Zap::UserInterface:

## Public Member Functions

virtual void | render ()
virtual void | idle (U32 timeDelta)
virtual void | onActivate ()
void | activate ()
virtual void | onMouseDown (S32 x, S32 y)
virtual void | onMouseUp (S32 x, S32 y)
virtual void | onRightMouseDown (S32 x, S32 y)
virtual void | onRightMouseUp (S32 x, S32 y)
virtual void | onMouseMoved (S32 x, S32 y)
virtual void | onMouseDragged (S32 x, S32 y)
virtual void | onKeyDown (U32 key)
virtual void | onKeyUp (U32 key)
virtual void | onSpecialKeyDown (U32 key)
virtual void | onSpecialKeyUp (U32 key)
virtual void | onModifierKeyDown (U32 key)
virtual void | onModifierKeyUp (U32 key)
virtual void | onControllerButtonDown (U32 buttonIndex)
virtual void | onControllerButtonUp (U32 buttonIndex)

## Static Public Member Functions

static void | renderCurrent ()
static void | drawString (S32 x, S32 y, S32 size, const char *string)
static void | drawCenteredString (S32 y, S32 size, const char *string)
static void | drawStringf (S32 x, S32 y, S32 size, const char *fmt,...)
static void | drawCenteredStringf (S32 y, S32 size, const char *fmt,...)
static U32 | getStringWidth (S32 size, const char *string, U32 len=0)
static void | playBoop ()

## Static Public Attributes

static UserInterface * | current
static S32 | windowWidth
static S32 | windowHeight
static S32 | canvasWidth
static S32 | canvasHeight
static S32 | vertMargin
static S32 | horizMargin

## Member Function Documentation

static void Zap::UserInterface::renderCurrent | ( |  | ) | `[static]`

virtual void Zap::UserInterface::render | ( |  | ) | `[virtual]`

Reimplemented in Zap::CreditsUserInterface, Zap::EditorUserInterface, Zap::EditorMenuUserInterface, Zap::GameUserInterface, Zap::InstructionsUserInterface, Zap::MenuUserInterface, Zap::MainMenuUserInterface, Zap::PlayerMenuUserInterface, Zap::TextEntryUserInterface, Zap::AdminPasswordEntryUserInterface, and Zap::QueryServersUserInterface.

virtual void Zap::UserInterface::idle | ( | U32 | timeDelta | ) | `[virtual]`

Reimplemented in Zap::CreditsUserInterface, Zap::EditorUserInterface, Zap::GameUserInterface, Zap::TextEntryUserInterface, and Zap::QueryServersUserInterface.

virtual void Zap::UserInterface::onActivate | ( |  | ) | `[virtual]`

Reimplemented in Zap::CreditsUserInterface, Zap::EditorUserInterface, Zap::EditorMenuUserInterface, Zap::InstructionsUserInterface, Zap::MenuUserInterface, Zap::OptionsMenuUserInterface, Zap::GameMenuUserInterface, Zap::LevelMenuUserInterface, Zap::AdminMenuUserInterface, Zap::TextEntryUserInterface, and Zap::QueryServersUserInterface.

void Zap::UserInterface::activate | ( |  | ) |

virtual void Zap::UserInterface::onMouseDown | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::EditorUserInterface, and Zap::GameUserInterface.

virtual void Zap::UserInterface::onMouseUp | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::EditorUserInterface, and Zap::GameUserInterface.

virtual void Zap::UserInterface::onRightMouseDown | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::EditorUserInterface, and Zap::GameUserInterface.

virtual void Zap::UserInterface::onRightMouseUp | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::GameUserInterface.

virtual void Zap::UserInterface::onMouseMoved | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::EditorUserInterface, and Zap::GameUserInterface.

virtual void Zap::UserInterface::onMouseDragged | ( | S32 | x,
|  | S32 | y |
| ) |  |  | `[virtual]`

Reimplemented in Zap::EditorUserInterface, and Zap::GameUserInterface.

virtual void Zap::UserInterface::onKeyDown | ( | U32 | key | ) | `[virtual]`

Reimplemented in Zap::CreditsUserInterface, Zap::EditorUserInterface, Zap::GameUserInterface, Zap::InstructionsUserInterface, Zap::MenuUserInterface, Zap::TextEntryUserInterface, and Zap::QueryServersUserInterface.

virtual void Zap::UserInterface::onKeyUp | ( | U32 | key | ) | `[virtual]`

Reimplemented in Zap::EditorUserInterface, Zap::GameUserInterface, and Zap::TextEntryUserInterface.

virtual void Zap::UserInterface::onSpecialKeyDown | ( | U32 | key | ) | `[virtual]`

Reimplemented in Zap::GameUserInterface, Zap::InstructionsUserInterface, Zap::MenuUserInterface, and Zap::QueryServersUserInterface.

virtual void Zap::UserInterface::onSpecialKeyUp | ( | U32 | key | ) | `[virtual]`

virtual void Zap::UserInterface::onModifierKeyDown | ( | U32 | key | ) | `[virtual]`

Reimplemented in Zap::GameUserInterface.

virtual void Zap::UserInterface::onModifierKeyUp | ( | U32 | key | ) | `[virtual]`

Reimplemented in Zap::GameUserInterface.

virtual void Zap::UserInterface::onControllerButtonDown | ( | U32 | buttonIndex | ) | `[inline, virtual]`

Reimplemented in Zap::CreditsUserInterface, Zap::GameUserInterface, Zap::MenuUserInterface, and Zap::QueryServersUserInterface.

virtual void Zap::UserInterface::onControllerButtonUp | ( | U32 | buttonIndex | ) | `[inline, virtual]`

Reimplemented in Zap::GameUserInterface.

static void Zap::UserInterface::drawString | ( | S32 | x,
|  | S32 | y,
|  | S32 | size,
|  | const char * | string |
| ) |  |  | `[static]`

static void Zap::UserInterface::drawCenteredString | ( | S32 | y,
|  | S32 | size,
|  | const char * | string |
| ) |  |  | `[static]`

static void Zap::UserInterface::drawStringf | ( | S32 | x,
|  | S32 | y,
|  | S32 | size,
|  | const char * | fmt,
|  |  | ... |
| ) |  |  | `[static]`

static void Zap::UserInterface::drawCenteredStringf | ( | S32 | y,
|  | S32 | size,
|  | const char * | fmt,
|  |  | ... |
| ) |  |  | `[static]`

static U32 Zap::UserInterface::getStringWidth | ( | S32 | size,
|  | const char * | string,
|  | U32 | len = `0` |
| ) |  |  | `[static]`

static void Zap::UserInterface::playBoop | ( |  | ) | `[static]`

## Field Documentation

UserInterface* Zap::UserInterface::current`[static]`

S32 Zap::UserInterface::windowWidth`[static]`

S32 Zap::UserInterface::windowHeight`[static]`

S32 Zap::UserInterface::canvasWidth`[static]`

S32 Zap::UserInterface::canvasHeight`[static]`

S32 Zap::UserInterface::vertMargin`[static]`

S32 Zap::UserInterface::horizMargin`[static]`