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::EditorUserInterface class Reference

Zap::EditorUserInterface Class Reference

#include <UIEditor.h>

Inheritance diagram for Zap::EditorUserInterface:

Zap::UserInterface Zap::LevelLoader

Public Member Functions

void setEditName (const char *name)
void render ()
void renderPoly (WorldItem &p)
void renderItem (S32 i)
void onMouseDown (S32 x, S32 y)
void onMouseUp (S32 x, S32 y)
void onMouseDragged (S32 x, S32 y)
void onRightMouseDown (S32 x, S32 y)
void onMouseMoved (S32 x, S32 y)
void onKeyDown (U32 key)
void onKeyUp (U32 key)
void onActivate ()
void idle (U32 timeDelta)
void deleteSelection ()
void duplicateSelection ()
void setCurrentTeam (S32 currentTeam)
void flipSelectionVertical ()
void flipSelectionHorizontal ()
void rotateSelection (F32 angle)
void incBarrierWidth ()
void decBarrierWidth ()
void saveLevel ()
void testLevel ()
Point convertWindowToCanvasCoord (Point p)
Point convertCanvasToLevelCoord (Point p)
Point convertLevelToCanvasCoord (Point p)
Point snapToLevelGrid (Point p)

Static Public Attributes

bool editorEnabled

Private Member Functions

void clearSelection ()
S32 countSelectedItems ()
S32 countSelectedVerts ()
void findHitVertex (Point canvasPos, S32 &hitItem, S32 &hitVertex)
void findHitItemAndEdge (Point canvasPos, S32 &hitItem, S32 &hitEdge)
void computeSelectionMinMax (Point &min, Point &max)
void processLevelLoadLine (int argc, const char **argv)
void constructItem (U32 itemIndex)

Private Attributes

char mGameType [256]
Vector< const char * > mGameTypeArgs
Vector< WorldItemmItems
Vector< WorldItemmOriginalItems
Vector< TeammTeams
Vector< Vector< const char * > > mUnknownItems
char mEditFileName [255]
WorldItem mNewItem
F32 mCurrentScale
Point mCurrentOffset
Point mMousePos
Point mMouseDownPos
S32 mCurrentTeam
F32 mGridSize
bool mCreatingPoly
bool mDragSelecting
bool mUp
bool mDown
bool mLeft
bool mRight
bool mIn
bool mOut

Member Function Documentation

void Zap::EditorUserInterface::clearSelection  )  [private]
 

S32 Zap::EditorUserInterface::countSelectedItems  )  [private]
 

S32 Zap::EditorUserInterface::countSelectedVerts  )  [private]
 

void Zap::EditorUserInterface::findHitVertex Point  canvasPos,
S32 hitItem,
S32 hitVertex
[private]
 

void Zap::EditorUserInterface::findHitItemAndEdge Point  canvasPos,
S32 hitItem,
S32 hitEdge
[private]
 

void Zap::EditorUserInterface::computeSelectionMinMax Point min,
Point max
[private]
 

void Zap::EditorUserInterface::processLevelLoadLine int  argc,
const char **  argv
[private, virtual]
 

Implements Zap::LevelLoader.

void Zap::EditorUserInterface::constructItem U32  itemIndex  )  [private]
 

void Zap::EditorUserInterface::setEditName const char *  name  ) 
 

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

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::renderPoly WorldItem p  ) 
 

void Zap::EditorUserInterface::renderItem S32  i  ) 
 

void Zap::EditorUserInterface::onMouseDown S32  x,
S32  y
[virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::onMouseUp S32  x,
S32  y
[virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::onMouseDragged S32  x,
S32  y
[virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::onRightMouseDown S32  x,
S32  y
[virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::onMouseMoved S32  x,
S32  y
[virtual]
 

Reimplemented from Zap::UserInterface.

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

Reimplemented from Zap::UserInterface.

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

Reimplemented from Zap::UserInterface.

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

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::idle U32  timeDelta  )  [virtual]
 

Reimplemented from Zap::UserInterface.

void Zap::EditorUserInterface::deleteSelection  ) 
 

void Zap::EditorUserInterface::duplicateSelection  ) 
 

void Zap::EditorUserInterface::setCurrentTeam S32  currentTeam  ) 
 

void Zap::EditorUserInterface::flipSelectionVertical  ) 
 

void Zap::EditorUserInterface::flipSelectionHorizontal  ) 
 

void Zap::EditorUserInterface::rotateSelection F32  angle  ) 
 

void Zap::EditorUserInterface::incBarrierWidth  ) 
 

void Zap::EditorUserInterface::decBarrierWidth  ) 
 

void Zap::EditorUserInterface::saveLevel  ) 
 

void Zap::EditorUserInterface::testLevel  ) 
 

Point Zap::EditorUserInterface::convertWindowToCanvasCoord Point  p  )  [inline]
 

Point Zap::EditorUserInterface::convertCanvasToLevelCoord Point  p  )  [inline]
 

Point Zap::EditorUserInterface::convertLevelToCanvasCoord Point  p  )  [inline]
 

Point Zap::EditorUserInterface::snapToLevelGrid Point  p  ) 
 


Field Documentation

char Zap::EditorUserInterface::mGameType[256] [private]
 

Vector<const char *> Zap::EditorUserInterface::mGameTypeArgs [private]
 

Vector<WorldItem> Zap::EditorUserInterface::mItems [private]
 

Vector<WorldItem> Zap::EditorUserInterface::mOriginalItems [private]
 

Vector<Team> Zap::EditorUserInterface::mTeams [private]
 

Vector<Vector<const char *> > Zap::EditorUserInterface::mUnknownItems [private]
 

char Zap::EditorUserInterface::mEditFileName[255] [private]
 

WorldItem Zap::EditorUserInterface::mNewItem [private]
 

F32 Zap::EditorUserInterface::mCurrentScale [private]
 

Point Zap::EditorUserInterface::mCurrentOffset [private]
 

Point Zap::EditorUserInterface::mMousePos [private]
 

Point Zap::EditorUserInterface::mMouseDownPos [private]
 

S32 Zap::EditorUserInterface::mCurrentTeam [private]
 

F32 Zap::EditorUserInterface::mGridSize [private]
 

bool Zap::EditorUserInterface::mCreatingPoly [private]
 

bool Zap::EditorUserInterface::mDragSelecting [private]
 

bool Zap::EditorUserInterface::mUp [private]
 

bool Zap::EditorUserInterface::mDown [private]
 

bool Zap::EditorUserInterface::mLeft [private]
 

bool Zap::EditorUserInterface::mRight [private]
 

bool Zap::EditorUserInterface::mIn [private]
 

bool Zap::EditorUserInterface::mOut [private]
 

bool Zap::EditorUserInterface::editorEnabled [static]