Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
property_drawer.h
1#pragma once
2
3#include <rttr/type>
4
5// Draws RTTR properties to ImGui
6class property_drawer final
7{
8public:
9 static void draw_object(rttr::type type, rttr::instance instance);
10
11 static bool draw_property(rttr::property property, rttr::instance instance);
12
13 static bool draw_variant(rttr::variant& variant, rttr::string_view name, rttr::variant minMax = rttr::variant());
14
15 static void draw_readonly_variant(rttr::variant variant, bool disabled = true);
16
17public:
18 static bool draw_float(float& value, rttr::string_view name, std::pair<float, float>& minMax);
19
20 static bool draw_int(int& value, rttr::string_view name, std::pair<int, int>& minMax);
21
22 static bool draw_bool(bool& value, rttr::string_view name);
23
24 static bool draw_member_object(rttr::variant& value, rttr::string_view name);
25
26 static bool draw_sequential_container(rttr::variant_sequential_view& view, rttr::string_view name);
27
28 static bool draw_associate_container(rttr::variant_associative_view& view, rttr::string_view name);
29
30private:
31 static bool draw_payload_drop(rttr::variant& value, const rttr::variant& payloadString);
32 static bool draw_payload_drop(rttr::property property, rttr::instance object, const rttr::variant& payloadString);
33};
Definition property_drawer.h:7
static bool draw_associate_container(rttr::variant_associative_view &view, rttr::string_view name)
Definition property_drawer.cpp:444