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
+8
View File
@@ -24,6 +24,8 @@ namespace gui {
class Label : public UINode {
LabelCache cache;
glm::vec2 calcSize();
protected:
std::wstring text;
std::string fontName;
@@ -47,6 +49,9 @@ namespace gui {
/// @brief Text line height multiplied by line interval
int totalLineHeight = 1;
/// @brief Auto resize label to fit text
bool autoresize = false;
public:
Label(std::string text, std::string fontName="normal");
Label(std::wstring text, std::string fontName="normal");
@@ -95,6 +100,9 @@ namespace gui {
virtual void textSupplier(wstringsupplier supplier);
virtual void setAutoResize(bool flag);
virtual bool isAutoResize() const;
virtual void setMultiline(bool multiline);
virtual bool isMultiline() const;