mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
added tooltips
This commit is contained in:
parent
1c45236693
commit
eb10904069
10 changed files with 146 additions and 11 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue