mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +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
|
|
@ -56,14 +56,14 @@ public:
|
|||
/// @param text selected text
|
||||
/// @param length max substring length (default: no limit)
|
||||
/// @return pixel width of the substring
|
||||
int calcWidth(const std::wstring& text, size_t length=-1) const;
|
||||
int calcWidth(std::wstring_view text, size_t length=-1) const;
|
||||
|
||||
/// @brief Calculate text width in pixels
|
||||
/// @param text selected text
|
||||
/// @param offset start of the substring
|
||||
/// @param length max substring length
|
||||
/// @return pixel width of the substring
|
||||
int calcWidth(const std::wstring& text, size_t offset, size_t length) const;
|
||||
int calcWidth(std::wstring_view text, size_t offset, size_t length) const;
|
||||
|
||||
/// @brief Check if character is visible (non-whitespace)
|
||||
/// @param codepoint character unicode codepoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue