Remove TODO

This commit is contained in:
2025-04-30 02:42:23 -05:00
parent b0c3203f70
commit cf8c86c7c7
3 changed files with 28 additions and 1 deletions

View File

@@ -24,11 +24,20 @@ namespace JUI
public:
Event<Vector2> OnHoverEvent;
Event<Vector2> OnExitEvent;
Event<Vector2> OnHoverChildrenEvent;
Event<Vector2> OnExitChildrenEvent;
Event<Vector2> OnHoverDescendantsEvent;
Event<Vector2> OnExitDescendantsEvent;
public:
bool IsHovered() const { return hovered; };
public:
virtual void OnHover(const Vector2& MousePos);
virtual void OnExit(const Vector2& MousePos);
virtual void OnHoverChildren(const Vector2& mouse);
virtual void OnHoverDescendants(const Vector2& mouse);
virtual void OnExitChildren(const Vector2& mouse);
virtual void OnExitDescendants(const Vector2& mouse);
void Update(const Vector2& m_pos, float delta);
//virtual void SetTooltip(const std::string& content, float delay) {}

View File

@@ -17,7 +17,7 @@ namespace JUI
class UtilityBar;
// TODO: Automatically adjust to make this widget's width that of the widest subcomponent button.
/// A horizontal toolbar widget that is designed to be used at the top of windows, and subwindow widgets.
/// Convenience functions are provided for adding tool buttons and sub-menus.
@@ -45,6 +45,7 @@ namespace JUI
//std::vector<TextButton*> buttons;
//std::vector<ContextMenu*> submenus;
HorizontalListLayout* layout = nullptr;
private:
};
}

View File

@@ -10,6 +10,23 @@ void JUI::Hoverable::OnExit(const Vector2 &MousePos) {
//tooltip_threshold = 0;
}
void JUI::Hoverable::OnHoverChildren(const Vector2& mouse) {
// TODO: Implement
}
void JUI::Hoverable::OnHoverDescendants(const Vector2& mouse) {
// TODO: Implement
}
void JUI::Hoverable::OnExitChildren(const Vector2& mouse) {
// TODO: Implement
}
void JUI::Hoverable::OnExitDescendants(const Vector2& mouse) {
// TODO: Implement
}
void JUI::Hoverable::Update(const Vector2 &m_pos, float delta) {
/*if (tooltip != nullptr)