mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
Add textbox selection and layout API for custom rendering
This commit is contained in:
parent
bb6bd27b94
commit
61b3f8f973
7 changed files with 393 additions and 5 deletions
|
|
@ -60,6 +60,8 @@ namespace gui {
|
|||
|
||||
/// @brief Auto resize label to fit text
|
||||
bool autoresize = false;
|
||||
bool renderText = true;
|
||||
glm::vec2 textOrigin {0};
|
||||
|
||||
/// @brief Text markup language
|
||||
std::string markup;
|
||||
|
|
@ -111,6 +113,10 @@ namespace gui {
|
|||
uint getLinesNumber() const;
|
||||
bool isFakeLine(size_t line) const;
|
||||
|
||||
bool prepareLayout(const Assets& assets);
|
||||
glm::vec2 getTextOrigin() const;
|
||||
void setRenderText(bool value);
|
||||
|
||||
void draw(const DrawContext& pctx, const Assets& assets) override;
|
||||
|
||||
void textSupplier(wstringsupplier supplier);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue