Nebula
Loading...
Searching...
No Matches
navigationpanel.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
16//------------------------------------------------------------------------------
17#if WITH_NEBULA_EDITOR
18#include "neweditor/core/editorpanel.h"
19#include "math/vec4.h"
20#include "util/array.h"
21#include "util/string.h"
22
23namespace NavigationFeature
24{
25
26class NavigationPanel final : public Editor::EditorPanel
27{
29public:
31 virtual ~NavigationPanel();
32
33 void Draw() override;
34
35protected:
36 bool OnSetup() override;
37
38private:
40 struct EditableArea
41 {
42 unsigned char id = 0;
43 char name[64] = "";
44 float cost = 1.0f;
45 unsigned short flags = 1;
46 Math::vec4 color = Math::vec4(1.0f);
47 };
48
49 void DrawDisplay();
50 void DrawAreas();
51 void DrawPathTest();
52
54 void LoadEditAreas();
56 Util::String ValidateEditAreas() const;
58 bool SaveEditAreas();
60 void ReloadTable();
61
63 void CommandNav(const Util::Array<Util::String>& args);
64
66 bool editAreasLoaded;
67 bool editAreasChanged;
68 Util::String tableMessage;
69};
70
71} // namespace NavigationFeature
72#endif // WITH_NEBULA_EDITOR
73//------------------------------------------------------------------------------
The navigation panel: what the viewport shows of navigation, the project's area table,...
Nebula's dynamic array class.
Definition array.h:61
Nebula's universal string class.
Definition string.h:50
Queries on a loaded navmesh.
Definition agentmanager.cc:30
#define __DeclareClass(type)
A 4D vector.
Definition vec4.h:24