23#ifndef VCL_IMGUI_IMGUI_HELPERS_H
24#define VCL_IMGUI_IMGUI_HELPERS_H
29#include <vclib/space/core/color.h>
35 std::function<
bool()> get,
36 std::function<
void(
bool)> set)
39 const bool ret = ImGui::Checkbox(label, &value);
44inline bool RadioButton(
46 std::function<
bool()> get,
47 std::function<
void(
bool)> set)
50 const bool ret = ImGui::RadioButton(label, value);
57inline bool SliderFloat(
59 std::function<
float()> get,
60 std::function<
void(
float)> set,
65 const bool ret = ImGui::SliderFloat(label, &value, vMin, vMax);
72inline bool ColorEdit4(
76 ImGuiColorEditFlags flags)
81 const bool ret = ImGui::ColorEdit4(label, color, flags);
83 c.
setRgbF(color[0], color[1], color[2], color[3]);
The Color class represents a 32 bit color.
Definition color.h:48
float greenF() const
Returns the float green component of this color [0-1].
Definition color.h:207
void setRgbF(float red, float green, float blue, float alpha=1.0)
Sets the RGB values of this color.
Definition color.h:559
float blueF() const
Returns the float blue component of this color [0-1].
Definition color.h:213
float alphaF() const
Returns the float alpha component of this color [0-1].
Definition color.h:219
float redF() const
Returns the float red component of this color [0-1].
Definition color.h:201