From eabcbed30df8ff5fdb63b5a4f844d01f436f9a2d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 21 Feb 2023 04:18:06 +0100 Subject: wip inspector stuff --- editor/inspect.cpp | 24 ++++++++++++++++++++++++ editor/inspect.hpp | 9 +++++++++ 2 files changed, 33 insertions(+) create mode 100644 editor/inspect.cpp create mode 100644 editor/inspect.hpp (limited to 'editor') diff --git a/editor/inspect.cpp b/editor/inspect.cpp new file mode 100644 index 00000000..c1f0840e --- /dev/null +++ b/editor/inspect.cpp @@ -0,0 +1,24 @@ +#include "inspect.hpp" +#include "entity/accessor.hpp" +#include + +namespace floormat { + +using namespace entities; + +template +static void do_inspect_field(const void* datum, const entities::erased_accessor& accessor) +{ + auto range = accessor.get_range(datum); + auto enabled = accessor.is_enabled(datum); + auto [min, max] = range.convert(); + + +} + +template<> void inspect_field(const void* datum, const entities::erased_accessor& accessor) +{ + do_inspect_field(datum, accessor); +} + +} // namespace floormat diff --git a/editor/inspect.hpp b/editor/inspect.hpp new file mode 100644 index 00000000..feca67d1 --- /dev/null +++ b/editor/inspect.hpp @@ -0,0 +1,9 @@ +#pragma once +//#include "entity/accessor.hpp" +namespace floormat::entities { struct erased_accessor; } + +namespace floormat { + +template void inspect_field(const void* datum, const entities::erased_accessor& accessor); + +} // namespace floormat -- cgit v1.2.3