Skip to content

Commit

Permalink
[MENU] fixed issue hoffstadt#69
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Aug 13, 2020
1 parent 6ced9ab commit b9fba00
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 512 deletions.
28 changes: 28 additions & 0 deletions DearPyGui/src/Core/AppItems/mvMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ namespace Marvel {
// Regular Tooltip (simple)
if (!item->getTip().empty() && ImGui::IsItemHovered())
ImGui::SetTooltip("%s", item->getTip().c_str());

item->setHovered(ImGui::IsItemHovered());
item->setActive(ImGui::IsItemActive());
item->setFocused(ImGui::IsItemFocused());
item->setClicked(ImGui::IsItemClicked());
item->setVisible(ImGui::IsItemVisible());
item->setEdited(ImGui::IsItemEdited());
item->setActivated(ImGui::IsItemActivated());
item->setDeactivated(ImGui::IsItemDeactivated());
item->setDeactivatedAfterEdit(ImGui::IsItemDeactivatedAfterEdit());
item->setToggledOpen(ImGui::IsItemToggledOpen());
item->setRectMin({ ImGui::GetItemRectMin().x, ImGui::GetItemRectMin().y });
item->setRectMax({ ImGui::GetItemRectMax().x, ImGui::GetItemRectMax().y });
item->setRectSize({ ImGui::GetItemRectSize().x, ImGui::GetItemRectSize().y });
}
ImGui::EndMenuBar();
}
Expand Down Expand Up @@ -106,6 +120,20 @@ namespace Marvel {
// Regular Tooltip (simple)
if (!item->getTip().empty() && ImGui::IsItemHovered())
ImGui::SetTooltip("%s", item->getTip().c_str());

item->setHovered(ImGui::IsItemHovered());
item->setActive(ImGui::IsItemActive());
item->setFocused(ImGui::IsItemFocused());
item->setClicked(ImGui::IsItemClicked());
item->setVisible(ImGui::IsItemVisible());
item->setEdited(ImGui::IsItemEdited());
item->setActivated(ImGui::IsItemActivated());
item->setDeactivated(ImGui::IsItemDeactivated());
item->setDeactivatedAfterEdit(ImGui::IsItemDeactivatedAfterEdit());
item->setToggledOpen(ImGui::IsItemToggledOpen());
item->setRectMin({ ImGui::GetItemRectMin().x, ImGui::GetItemRectMin().y });
item->setRectMax({ ImGui::GetItemRectMax().x, ImGui::GetItemRectMax().y });
item->setRectSize({ ImGui::GetItemRectSize().x, ImGui::GetItemRectSize().y });
}

registerWindowFocusing();
Expand Down
Loading

0 comments on commit b9fba00

Please sign in to comment.