added tooltips

This commit is contained in:
MihailRis
2024-05-24 08:03:05 +03:00
parent 1c45236693
commit eb10904069
10 changed files with 146 additions and 11 deletions
+7 -3
View File
@@ -54,21 +54,25 @@ namespace gui {
/// @brief The main UI controller
class GUI {
std::shared_ptr<Container> container;
std::shared_ptr<UINode> hover = nullptr;
std::shared_ptr<UINode> pressed = nullptr;
std::shared_ptr<UINode> focus = nullptr;
std::shared_ptr<UINode> hover;
std::shared_ptr<UINode> pressed;
std::shared_ptr<UINode> focus;
std::shared_ptr<UINode> tooltip;
std::unordered_map<std::string, std::shared_ptr<UINode>> storage;
std::unique_ptr<Camera> uicamera;
std::shared_ptr<Menu> menu;
std::queue<runnable> postRunnables;
float tooltipTimer = 0.0f;
float tooltipDelay = 0.5f;
float doubleClickTimer = 0.0f;
float doubleClickDelay = 0.5f;
bool doubleClicked = false;
void actMouse(float delta);
void actFocused();
void updateTooltip(float delta);
public:
GUI();
~GUI();