1#ifndef YAZE_APP_GUI_WIDGETS_PROPERTY_INSPECTOR_H_
2#define YAZE_APP_GUI_WIDGETS_PROPERTY_INSPECTOR_H_
9#include "imgui/imgui.h"
59 const PropertyOptions& opts = {});
61 const PropertyOptions& opts = {});
62bool DrawProperty(
const char* label, std::uint16_t* value,
63 const PropertyOptions& opts = {});
64bool DrawProperty(
const char* label, std::uint32_t* value,
65 const PropertyOptions& opts = {});
67 const PropertyOptions& opts = {});
69 const PropertyOptions& opts = {});
71 const PropertyOptions& opts = {});
73 const PropertyOptions& opts = {});
75 const PropertyOptions& opts = {});
80 const PropertyOptions& opts = {});
82 const PropertyOptions& opts = {});
84 const PropertyOptions& opts = {});
94template <
typename EnumT>
96 const char*
const* items,
97 const PropertyOptions& opts = {});
102namespace property_inspector_internal {
109void BeginRow(
const char* label,
const char* tooltip);
120template <
typename EnumT>
123 static_assert(std::is_enum_v<EnumT>,
124 "DrawPropertyCombo requires an enum type");
126 while (items[count] !=
nullptr)
128 int current =
static_cast<int>(*value);
129 if (current < 0 || current >= count)
136 const bool changed = ImGui::Combo(
id.c_str(), ¤t, items, count);
137 ImGui::EndDisabled();
140 *value =
static_cast<EnumT
>(current);
void BeginRow(const char *label, const char *tooltip)
std::string ResolveWidgetId(const char *label)
bool DrawProperty(const char *label, bool *value, const PropertyOptions &opts)
bool DrawPropertyCombo(const char *label, EnumT *value, const char *const *items, const PropertyOptions &opts={})
bool DrawPropertyHex(const char *label, std::uint8_t *value, const PropertyOptions &opts)
ImGuiInputTextFlags text_flags