Skip to content

Commit

Permalink
SliderInt for integer typed params
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Oct 11, 2023
1 parent a2568c7 commit 59cd913
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hvcc/generators/c2dpf/templates/HeavyDPF_UI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class ImGuiPluginUI : public UI
{%- else %}
{%- if v.attributes.type == 'bool': %}
if (ImGui::Toggle("{{v.display.replace('_', ' ')}}", &f{{v_display}}))
{%- elif v.attributes.type == 'int' %}
if (ImGui::SliderInt("{{v.display.replace('_', ' ')}}", &f{{v_display}}, {{v.attributes.min}}f, {{v.attributes.max}}f))
{%- else %}
if (ImGui::SliderFloat("{{v.display.replace('_', ' ')}}", &f{{v_display}}, {{v.attributes.min}}f, {{v.attributes.max}}f))
{%- endif %}
Expand Down

0 comments on commit 59cd913

Please sign in to comment.