DDraceNetwork Docs
map_grid.h
Go to the documentation of this file.
1#ifndef GAME_EDITOR_MAP_GRID_H
2#define GAME_EDITOR_MAP_GRID_H
3
4#include "component.h"
5
6#include <game/client/ui.h>
7
9{
10public:
11 void OnReset() override;
12 void OnRender(CUIRect View) override;
13
14 void SnapToGrid(float &x, float &y) const;
15 int GridLineDistance() const;
16
20 bool IsEnabled() const;
21
22 void Toggle();
23
24 int Factor() const;
25 void SetFactor(int Factor);
26
27 void DoSettingsPopup(vec2 Position);
28
29private:
32
34 static CUi::EPopupMenuFunctionResult PopupGridSettings(void *pContext, CUIRect View, bool Active);
35};
36
37#endif
Definition: component.h:9
Definition: map_grid.h:9
bool m_GridActive
Definition: map_grid.h:30
void OnRender(CUIRect View) override
Definition: map_grid.cpp:16
static CUi::EPopupMenuFunctionResult PopupGridSettings(void *pContext, CUIRect View, bool Active)
Definition: map_grid.cpp:116
bool IsEnabled() const
Definition: map_grid.cpp:91
void OnReset() override
Definition: map_grid.cpp:10
int m_GridFactor
Definition: map_grid.h:31
int GridLineDistance() const
Definition: map_grid.cpp:64
void Toggle()
Definition: map_grid.cpp:96
void SetFactor(int Factor)
Definition: map_grid.cpp:106
void SnapToGrid(float &x, float &y) const
Definition: map_grid.cpp:84
SPopupMenuId m_PopupGridSettingsId
Definition: map_grid.h:33
void DoSettingsPopup(vec2 Position)
Definition: map_grid.cpp:111
int Factor() const
Definition: map_grid.cpp:101
Definition: ui_rect.h:11
EPopupMenuFunctionResult
Definition: ui.h:289
Definition: ui.h:272