Debug Draw 3D (and 2D) 1.5.0
Draw 3D debug graphics and 2D overlays with this add-on.
Loading...
Searching...
No Matches
stats_2d.h
1#pragma once
2
3#include "utils/compiler.h"
4
5GODOT_WARNING_DISABLE()
6#include <godot_cpp/classes/ref_counted.hpp>
7GODOT_WARNING_RESTORE()
8using namespace godot;
9
18class DebugDraw2DStats : public RefCounted {
19 GDCLASS(DebugDraw2DStats, RefCounted)
20
21protected:
23 static void _bind_methods();
24
25#define DEFINE_DEFAULT_PROP(name, type, def) \
26private: \
27 type name = def; \
28 \
29public: \
30 type get_##name() const { return name; } \
31 void set_##name(int64_t val) {}
32
33 DEFINE_DEFAULT_PROP(overlay_text_groups, int64_t, 0);
34 DEFINE_DEFAULT_PROP(overlay_text_lines, int64_t, 0);
35
36#undef DEFINE_DEFAULT_PROP
37
38 DebugDraw2DStats(){};
39
41 void setup(
42 const int64_t &p_overlay_text_groups,
43 const int64_t &p_overlay_text_lines);
44};