MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / Checkbox

Class Checkbox

Source/Falcor/Utils/UI/PythonUI.cpp:264–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262};
263
264class Checkbox : public Property
265{
266 FALCOR_OBJECT(Checkbox)
267public:
268 Checkbox(Widget* parent, std::string_view label = "", ChangeCallback change_callback = {}, bool value = false)
269 : Property(parent, label, change_callback), m_value(value)
270 {}
271
272 bool get_value() const { return m_value; }
273 void set_value(bool value) { m_value = value; }
274
275 virtual void render() override
276 {
277 ScopedID id(this);
278 if (!m_visible)
279 return;
280 ScopedDisable disable(!m_enabled);
281 if (ImGui::Checkbox(m_label.c_str(), &m_value))
282 {
283 if (m_change_callback)
284 m_change_callback();
285 }
286 }
287
288private:
289 bool m_value;
290};
291
292class Combobox : public Property
293{

Callers 5

renderOptionsMethod · 0.85
renderMethod · 0.85
addCheckboxMethod · 0.85
renderUIMethod · 0.85
renderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected