We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb79c3a commit cfe86cdCopy full SHA for cfe86cd
2 files changed
Sources/Overload/OvUI/include/OvUI/Widgets/AWidget.h
@@ -71,6 +71,7 @@ namespace OvUI::Widgets
71
virtual void _Draw_Impl() = 0;
72
73
public:
74
+ std::string tooltip;
75
bool enabled = true;
76
bool disabled = false;
77
bool lineBreak = true;
Sources/Overload/OvUI/src/OvUI/Widgets/AWidget.cpp
@@ -56,6 +56,14 @@ void OvUI::Widgets::AWidget::Draw()
56
57
_Draw_Impl();
58
59
+ if (!tooltip.empty())
60
+ {
61
+ if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled))
62
63
+ ImGui::SetTooltip(tooltip.c_str());
64
+ }
65
66
+
67
if (disabled)
68
{
69
ImGui::EndDisabled();
0 commit comments