Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CMiniMap Class Reference

#include <MiniMap.h>

Inheritance diagram for CMiniMap:
IGUIObject

Public Member Functions

 CMiniMap ()
 
virtual ~CMiniMap ()
 
- Public Member Functions inherited from IGUIObject
 IGUIObject ()
 
virtual ~IGUIObject ()
 
virtual bool MouseOver ()
 Checks if mouse is hovering this object. More...
 
virtual bool MouseOverIcon ()
 Test if mouse position is over an icon. More...
 
const CStr & GetName () const
 Get object name, name is unique. More...
 
void SetName (const CStr &Name)
 Get object name. More...
 
CStr GetPresentableName () const
 
void AddToPointersMap (map_pObjects &ObjectMap)
 Adds object and its children to the map, it's name being the first part, and the second being itself. More...
 
void AddChild (IGUIObject *pChild)
 Notice nothing will be returned or thrown if the child hasn't been inputted into the GUI yet. More...
 
vector_pObjects::iterator ChildrenItBegin ()
 
vector_pObjects::iterator ChildrenItEnd ()
 
bool SettingExists (const CStr &Setting) const
 Checks if settings exists, only available for derived classes that has this set up, that's why the base class just returns false. More...
 
virtual void UpdateCachedSize ()
 All sizes are relative to resolution, and the calculation is not wanted in real time, therefore it is cached, update the cached size with this function. More...
 
PSRETURN SetSetting (const CStr &Setting, const CStrW &Value, const bool &SkipMessage=false)
 Set a setting by string, regardless of what type it is. More...
 
PSRETURN GetSettingType (const CStr &Setting, EGUISettingType &Type) const
 Retrieves the type of a named setting. More...
 
void RegisterScriptHandler (const CStr &Action, const CStr &Code, CGUI *pGUI)
 Set the script handler for a particular object-specific action. More...
 
JSObject * GetJSObject ()
 Retrieves the JSObject representing this GUI object. More...
 
CGUIGetGUI ()
 
const CGUIGetGUI () const
 
void SetFocus ()
 Take focus! More...
 

Protected Member Functions

virtual void Draw ()
 Draws the object. More...
 
virtual void HandleMessage (SGUIMessage &Message)
 
void CreateTextures ()
 
void RebuildTerrainTexture ()
 
void Destroy ()
 Calls Destroy on all children, and deallocates all memory. More...
 
void SetCameraPos ()
 
void FireWorldClickEvent (int button, int clicks)
 
void DrawTexture (float coordMax, float angle, float x, float y, float x2, float y2, float z)
 
void DrawViewRect ()
 
void GetMouseWorldCoordinates (float &x, float &z)
 
float GetAngle ()
 
- Protected Member Functions inherited from IGUIObject
void AddSetting (const EGUISettingType &Type, const CStr &Name)
 Add a setting to m_Settings. More...
 
virtual InReaction ManuallyHandleEvent (const SDL_Event_ *ev)
 Some objects need to handle the SDL_Event_ manually. More...
 
void LoadStyle (CGUI &GUIinstance, const CStr &StyleName)
 Loads a style. More...
 
void LoadStyle (const SGUIStyle &Style)
 Loads a style. More...
 
virtual float GetBufferedZ () const
 Returns not the Z value, but the actual buffered Z value, i.e. More...
 
void SetGUI (CGUI *const &pGUI)
 
void SetParent (IGUIObject *pParent)
 Set parent of this object. More...
 
virtual void ResetStates ()
 Reset internal state of this object. More...
 
bool IsFocused () const
 Check if object is focused. More...
 
IGUIObjectGetParent () const
 NOTE! This will not just return m_pParent, when that is need use it! There is one exception to it, when the parent is the top-node (the object that isn't a real object), this will return NULL, so that the top-node's children are seemingly parentless. More...
 
CPos GetMousePos () const
 Get Mouse from CGUI. More...
 
virtual bool HandleAdditionalChildren (const XMBElement &child, CXeromyces *pFile)
 Handle additional children to the <object>-tag. More...
 
InReaction SendEvent (EGUIMessageType type, const CStr &EventName)
 Send event to this GUI object (HandleMessage and ScriptEvent) More...
 
void ScriptEvent (const CStr &Action)
 Execute the script for a particular action. More...
 
void ScriptEvent (const CStr &Action, const CScriptValRooted &Argument)
 Execute the script for a particular action. More...
 
void SetScriptHandler (const CStr &Action, JSObject *Function)
 
void UpdateMouseOver (IGUIObject *const &pMouseOver)
 Inputes the object that is currently hovered, this function updates this object accordingly (i.e. More...
 

Protected Attributes

const CTerrainm_Terrain
 
const CCameram_Camera
 
bool m_Clicking
 
GLuint m_TerrainTexture
 
u32m_TerrainData
 
bool m_TerrainDirty
 
ssize_t m_Width
 
ssize_t m_Height
 
ssize_t m_MapSize
 
GLsizei m_TextureSize
 
float m_MapScale
 
float m_ShallowPassageHeight
 
VertexIndexArray m_IndexArray
 
VertexArray m_VertexArray
 
VertexArray::Attribute m_AttributePos
 
VertexArray::Attribute m_AttributeColor
 
size_t m_EntitiesDrawn
 
double m_PingDuration
 
double m_HalfBlinkDuration
 
double m_NextBlinkTime
 
bool m_BlinkState
 
- Protected Attributes inherited from IGUIObject
CRect m_CachedActualSize
 Cached size, real size m_Size is actually dependent on resolution and can have different real outcomes, this is the real outcome cached to avoid slow calculations in real time. More...
 
CStr m_Name
 
vector_pObjects m_Children
 
IGUIObjectm_pParent
 
double m_LastClickTime [6]
 
bool m_MouseHovering
 This is an array of true or false, each element is associated with a string representing a setting. More...
 

Detailed Description

Definition at line 28 of file MiniMap.h.

Constructor & Destructor Documentation

CMiniMap::CMiniMap ( )

Definition at line 60 of file MiniMap.cpp.

CMiniMap::~CMiniMap ( )
virtual

Definition at line 131 of file MiniMap.cpp.

Member Function Documentation

void CMiniMap::CreateTextures ( )
protected

Definition at line 672 of file MiniMap.cpp.

void CMiniMap::Destroy ( )
protectedvirtual

Calls Destroy on all children, and deallocates all memory.

MEGA TODO Should it destroy it's children?

Reimplemented from IGUIObject.

Definition at line 761 of file MiniMap.cpp.

void CMiniMap::Draw ( )
protectedvirtual

Draws the object.

Exceptions
PSERRORif any. But this will mostlikely be very rare since if an object is drawn unsuccessfully it'll probably only output in the Error log, and not disrupt the whole GUI drawing.

Implements IGUIObject.

Definition at line 359 of file MiniMap.cpp.

void CMiniMap::DrawTexture ( float  coordMax,
float  angle,
float  x,
float  y,
float  x2,
float  y2,
float  z 
)
protected

Definition at line 335 of file MiniMap.cpp.

void CMiniMap::DrawViewRect ( )
protected

Definition at line 263 of file MiniMap.cpp.

void CMiniMap::FireWorldClickEvent ( int  button,
int  clicks 
)
protected

Definition at line 238 of file MiniMap.cpp.

float CMiniMap::GetAngle ( )
protected

Definition at line 232 of file MiniMap.cpp.

void CMiniMap::GetMouseWorldCoordinates ( float &  x,
float &  z 
)
protected

Definition at line 206 of file MiniMap.cpp.

void CMiniMap::HandleMessage ( SGUIMessage Message)
protectedvirtual
See Also
IGUIObject::HandleMessage()

Reimplemented from IGUIObject.

Definition at line 136 of file MiniMap.cpp.

void CMiniMap::RebuildTerrainTexture ( )
protected

Definition at line 699 of file MiniMap.cpp.

void CMiniMap::SetCameraPos ( )
protected

Definition at line 222 of file MiniMap.cpp.

Member Data Documentation

VertexArray::Attribute CMiniMap::m_AttributeColor
protected

Definition at line 97 of file MiniMap.h.

VertexArray::Attribute CMiniMap::m_AttributePos
protected

Definition at line 96 of file MiniMap.h.

bool CMiniMap::m_BlinkState
protected

Definition at line 104 of file MiniMap.h.

const CCamera* CMiniMap::m_Camera
protected

Definition at line 58 of file MiniMap.h.

bool CMiniMap::m_Clicking
protected

Definition at line 61 of file MiniMap.h.

size_t CMiniMap::m_EntitiesDrawn
protected

Definition at line 99 of file MiniMap.h.

double CMiniMap::m_HalfBlinkDuration
protected

Definition at line 102 of file MiniMap.h.

ssize_t CMiniMap::m_Height
protected

Definition at line 72 of file MiniMap.h.

VertexIndexArray CMiniMap::m_IndexArray
protected

Definition at line 94 of file MiniMap.h.

float CMiniMap::m_MapScale
protected

Definition at line 81 of file MiniMap.h.

ssize_t CMiniMap::m_MapSize
protected

Definition at line 75 of file MiniMap.h.

double CMiniMap::m_NextBlinkTime
protected

Definition at line 103 of file MiniMap.h.

double CMiniMap::m_PingDuration
protected

Definition at line 101 of file MiniMap.h.

float CMiniMap::m_ShallowPassageHeight
protected

Definition at line 84 of file MiniMap.h.

const CTerrain* CMiniMap::m_Terrain
protected

Definition at line 56 of file MiniMap.h.

u32* CMiniMap::m_TerrainData
protected

Definition at line 67 of file MiniMap.h.

bool CMiniMap::m_TerrainDirty
protected

Definition at line 70 of file MiniMap.h.

GLuint CMiniMap::m_TerrainTexture
protected

Definition at line 64 of file MiniMap.h.

GLsizei CMiniMap::m_TextureSize
protected

Definition at line 78 of file MiniMap.h.

VertexArray CMiniMap::m_VertexArray
protected

Definition at line 95 of file MiniMap.h.

ssize_t CMiniMap::m_Width
protected

Definition at line 72 of file MiniMap.h.


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