TutorialDialog Class Reference

#include <TutorialDialog.h>

Inheritance diagram for TutorialDialog:

GLWWindow GLWListViewI GLWPanel GLWidget MetaClass

List of all members.

Public Member Functions

virtual void display ()
virtual void simulate (float frameTime)
virtual void draw ()
virtual void url (const char *url)
virtual void event (std::map< std::string, std::string > &event)
void drawHighlight (float x, float y, float w, float h)

Static Public Member Functions

static TutorialDialoginstance ()

Protected Member Functions

void processEvents (bool log=false)
void processHighlight (bool log)
void processMenu (bool log)
void showPage (TutorialFileEntry *entry)
void drawTriangle (float x, float y, float size, int tex)

Protected Attributes

float triangleDist_
float triangleDir_
GLWListViewlistView_
GLTexture triangleTex_
TutorialFile file_
TutorialFileEntrycurrent_
std::map
< std::string,
std::string
currentEvents_

Static Protected Attributes

static TutorialDialoginstance_ = 0

Private Member Functions

 TutorialDialog ()
virtual ~TutorialDialog ()


Detailed Description

Definition at line 29 of file TutorialDialog.h.


Constructor & Destructor Documentation

TutorialDialog::TutorialDialog (  )  [private]

Definition at line 51 of file TutorialDialog.cpp.

References GLWPanel::addWidget(), file_, S3D::getDataFile(), ScorchedContext::getOptionsGame(), TutorialFile::getStartEntry(), GLViewPort::getWidth(), ScorchedClient::instance(), GLWPanel::layout(), GLWPanel::LayoutVerticle, listView_, TutorialFile::parseFile(), GLWListView::setColor(), GLWListView::setHandler(), GLWPanel::setLayout(), showPage(), GLWPanel::SpaceAll, and GLWWindow::windowLevel_.

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

Definition at line 76 of file TutorialDialog.cpp.


Member Function Documentation

TutorialDialog * TutorialDialog::instance (  )  [static]

Definition at line 42 of file TutorialDialog.cpp.

References instance_.

Referenced by ClientWindowSetup::addCommonComponents(), TargetRendererImplTank::render2D(), and ClientWindowSetup::setupGameWindows().

void TutorialDialog::display (  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 90 of file TutorialDialog.cpp.

References GLWPanel::display(), listView_, and GLWListView::resetPosition().

void TutorialDialog::simulate ( float  frameTime  )  [virtual]

Reimplemented from GLWPanel.

Definition at line 209 of file TutorialDialog.cpp.

References TutorialFileEntry::checkConditions(), current_, showPage(), GLWPanel::simulate(), triangleDir_, and triangleDist_.

void TutorialDialog::draw (  )  [virtual]

Reimplemented from GLWWindow.

Definition at line 96 of file TutorialDialog.cpp.

References GLWWindow::draw(), and processEvents().

void TutorialDialog::url ( const char *  url  )  [virtual]

Implements GLWListViewI.

Definition at line 232 of file TutorialDialog.cpp.

References S3D::dialogExit(), file_, S3D::formatStringBuffer(), TutorialFile::getEntry(), GLWidget::getId(), GLWWindowManager::hideWindow(), GLWWindowManager::instance(), showPage(), and LangStringUtil::strcmp().

void TutorialDialog::event ( std::map< std::string, std::string > &  event  )  [virtual]

Implements GLWListViewI.

Definition at line 311 of file TutorialDialog.cpp.

References currentEvents_.

void TutorialDialog::drawHighlight ( float  x,
float  y,
float  w,
float  h 
)

Definition at line 252 of file TutorialDialog.cpp.

References GLState::BLEND_ON, GLTexture::create(), GLState::DEPTH_OFF, GLTexture::draw(), drawTriangle(), file, S3D::getDataFile(), glColor4f(), ImageFactory::loadImageHandle(), GLState::TEXTURE_ON, GLTexture::textureValid(), triangleDist_, and triangleTex_.

Referenced by processHighlight(), processMenu(), and TargetRendererImplTank::render2D().

void TutorialDialog::processEvents ( bool  log = false  )  [protected]

Definition at line 112 of file TutorialDialog.cpp.

References currentEvents_, S3D::dialogExit(), TargetRendererImpl::eNoHighlight, TargetRendererImpl::eOtherHighlight, TargetRendererImpl::ePlayerHighlight, S3D::formatStringBuffer(), getValue(), processHighlight(), processMenu(), TargetRendererImpl::setHighlightType(), and LangStringUtil::strcmp().

Referenced by draw().

void TutorialDialog::processHighlight ( bool  log  )  [protected]

Definition at line 165 of file TutorialDialog.cpp.

References currentEvents_, S3D::dialogExit(), drawHighlight(), S3D::formatStringBuffer(), GLWidget::getH(), GLWidget::getParent(), getValue(), GLWidget::getW(), GLWPanel::getWidgetByName(), GLWWindowManager::getWindowByName(), GLWidget::getX(), GLWidget::getY(), GLWWindowManager::instance(), and Logger::log().

Referenced by processEvents().

void TutorialDialog::processMenu ( bool  log  )  [protected]

Definition at line 148 of file TutorialDialog.cpp.

References currentEvents_, S3D::dialogExit(), drawHighlight(), GLMenuEntry::getH(), getValue(), GLMenuEntry::getW(), GLMenuEntry::getX(), GLMenuEntry::getY(), and MainMenuDialog::instance().

Referenced by processEvents().

void TutorialDialog::showPage ( TutorialFileEntry entry  )  [protected]

Definition at line 81 of file TutorialDialog.cpp.

References GLWListView::addXML(), GLWListView::clear(), current_, currentEvents_, listView_, and TutorialFileEntry::text_.

Referenced by simulate(), TutorialDialog(), and url().

void TutorialDialog::drawTriangle ( float  x,
float  y,
float  size,
int  tex 
) [protected]

Definition at line 273 of file TutorialDialog.cpp.

References GL_QUADS, glBegin(), glEnd(), glTexCoord2f(), and glVertex2f().

Referenced by drawHighlight().


Member Data Documentation

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

Definition at line 45 of file TutorialDialog.h.

Referenced by instance().

float TutorialDialog::triangleDist_ [protected]

Definition at line 46 of file TutorialDialog.h.

Referenced by drawHighlight(), and simulate().

float TutorialDialog::triangleDir_ [protected]

Definition at line 46 of file TutorialDialog.h.

Referenced by simulate().

GLWListView* TutorialDialog::listView_ [protected]

Definition at line 47 of file TutorialDialog.h.

Referenced by display(), showPage(), and TutorialDialog().

GLTexture TutorialDialog::triangleTex_ [protected]

Definition at line 48 of file TutorialDialog.h.

Referenced by drawHighlight().

TutorialFile TutorialDialog::file_ [protected]

Definition at line 49 of file TutorialDialog.h.

Referenced by TutorialDialog(), and url().

TutorialFileEntry* TutorialDialog::current_ [protected]

Definition at line 50 of file TutorialDialog.h.

Referenced by showPage(), and simulate().

std::map<std::string, std::string> TutorialDialog::currentEvents_ [protected]

Definition at line 52 of file TutorialDialog.h.

Referenced by event(), processEvents(), processHighlight(), processMenu(), and showPage().


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