BeginGroup() and Tooltip don't have return values

This commit is contained in:
Seth Kingsley 2018-11-14 01:57:55 -08:00
parent e6ff68a3b0
commit 027861074c
2 changed files with 6 additions and 3 deletions

View File

@ -60,7 +60,10 @@ EOT
when 'BeginChild' then 'ImGui::EndChild();'
when 'BeginChildFrame' then 'ImGui::EndChildFrame();'
when /^BeginPopup/ then "if (#{@state_var}) ImGui::EndPopup();"
when /^Begin(.*)/ then "if (#{@state_var}) ImGui::End#{$1}();"
when /^Begin(.*)/
body = "ImGui::End#{$1}();"
body = "if (#{@state_var}) " + body if @state_var
body
when /^TreeNode/ then "if (#{@state_var}) ImGui::TreePop();"
when 'TreePush' then 'ImGui::TreePop();'
when /^Push(.*)/ then "ImGui::Pop#{$1}();"

View File

@ -96,7 +96,7 @@ namespace ImScoped
struct Group
{
Group() { ImGui::BeginGroup(); }
~Group() { if () ImGui::EndGroup(); }
~Group() { ImGui::EndGroup(); }
IMGUI_DELETE_MOVE_COPY(Group);
};
@ -217,7 +217,7 @@ namespace ImScoped
struct Tooltip
{
Tooltip() { ImGui::BeginTooltip(); }
~Tooltip() { if () ImGui::EndTooltip(); }
~Tooltip() { ImGui::EndTooltip(); }
IMGUI_DELETE_MOVE_COPY(Tooltip);
};