DDraceNetwork Docs
CMapGrid Class Reference

#include <map_grid.h>

Inheritance diagram for CMapGrid:
[legend]
Collaboration diagram for CMapGrid:
[legend]

Public Member Functions

void OnReset () override
 
void OnRender (CUIRect View) override
 
void SnapToGrid (float &x, float &y) const
 
int GridLineDistance () const
 
bool IsEnabled () const
 
void Toggle ()
 
int Factor () const
 
void SetFactor (int Factor)
 
void DoSettingsPopup (vec2 Position)
 
- Public Member Functions inherited from CEditorComponent
virtual bool OnInput (const IInput::CEvent &Event) override
 
void InitSubComponents ()
 
void RegisterSubComponent (CEditorComponent &Component)
 
- Public Member Functions inherited from CEditorObject
virtual ~CEditorObject ()=default
 
virtual void OnInit (CEditor *pEditor)
 
virtual void OnUpdate ()
 
virtual bool OnInput (const IInput::CEvent &Event)
 
virtual void OnRender (CUIRect View)
 
virtual void OnHot ()
 
virtual void OnActive ()
 
virtual void OnReset ()
 
virtual void OnMapLoad ()
 
bool IsHot ()
 
void SetHot ()
 
void UnsetHot ()
 
bool IsActive ()
 
void SetActive ()
 
void SetInactive ()
 
CEditorEditor ()
 
const CEditorEditor () const
 
IInputInput ()
 
IClientClient ()
 
CConfigConfig ()
 
IConsoleConsole ()
 
IEngineEngine ()
 
IGraphicsGraphics ()
 
ISoundSound ()
 
ITextRenderTextRender ()
 
IStorageStorage ()
 
CUiUi ()
 
CRenderToolsRenderTools ()
 

Static Private Member Functions

static CUi::EPopupMenuFunctionResult PopupGridSettings (void *pContext, CUIRect View, bool Active)
 

Private Attributes

bool m_GridActive
 
int m_GridFactor
 
SPopupMenuId m_PopupGridSettingsId
 

Member Function Documentation

◆ DoSettingsPopup()

void CMapGrid::DoSettingsPopup ( vec2  Position)

◆ Factor()

int CMapGrid::Factor ( ) const

◆ GridLineDistance()

int CMapGrid::GridLineDistance ( ) const

◆ IsEnabled()

bool CMapGrid::IsEnabled ( ) const

Returns whether the grid is rendered.

◆ OnRender()

void CMapGrid::OnRender ( CUIRect  View)
overridevirtual

Reimplemented from CEditorObject.

◆ OnReset()

void CMapGrid::OnReset ( )
overridevirtual

Reimplemented from CEditorObject.

◆ PopupGridSettings()

CUi::EPopupMenuFunctionResult CMapGrid::PopupGridSettings ( void *  pContext,
CUIRect  View,
bool  Active 
)
staticprivate

◆ SetFactor()

void CMapGrid::SetFactor ( int  Factor)

◆ SnapToGrid()

void CMapGrid::SnapToGrid ( float &  x,
float &  y 
) const

◆ Toggle()

void CMapGrid::Toggle ( )

Member Data Documentation

◆ m_GridActive

bool CMapGrid::m_GridActive
private

◆ m_GridFactor

int CMapGrid::m_GridFactor
private

◆ m_PopupGridSettingsId

SPopupMenuId CMapGrid::m_PopupGridSettingsId
private

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