mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
refactor
This commit is contained in:
parent
d189bdc107
commit
e06350915e
9 changed files with 284 additions and 236 deletions
|
|
@ -25,7 +25,15 @@ public:
|
|||
|
||||
int getLineHeight() const;
|
||||
int getYOffset() const;
|
||||
|
||||
/// @brief Calculate text width in pixels
|
||||
/// @param text selected text
|
||||
/// @param length max text chunk length (default: no limit)
|
||||
/// @return pixel width of the text
|
||||
int calcWidth(std::wstring text, size_t length=-1);
|
||||
|
||||
/// @brief Check if character is visible (non-whitespace)
|
||||
/// @param codepoint character unicode codepoint
|
||||
bool isPrintableChar(uint codepoint) const;
|
||||
void draw(Batch2D* batch, std::wstring text, int x, int y);
|
||||
void draw(Batch2D* batch, std::wstring text, int x, int y, FontStyle style);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue