mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
fix multiline width calculation & feat: multiline tooltips support
This commit is contained in:
parent
4400f7fbfb
commit
5394f202a1
5 changed files with 37 additions and 8 deletions
|
|
@ -18,9 +18,10 @@ namespace gui {
|
|||
/// @brief Reset cache flag
|
||||
bool resetFlag = true;
|
||||
size_t wrapWidth = -1;
|
||||
int multilineWidth = 0;
|
||||
|
||||
void prepare(Font* font, size_t wrapWidth);
|
||||
void update(const std::wstring& text, bool multiline, bool wrap);
|
||||
void update(std::wstring_view text, bool multiline, bool wrap);
|
||||
|
||||
size_t getTextLineOffset(size_t line) const;
|
||||
uint getLineByTextIndex(size_t index) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue