Add textbox selection and layout API for custom rendering

This commit is contained in:
boolean-false 2026-09-28 21:49:20 +07:00
parent bb6bd27b94
commit 61b3f8f973
7 changed files with 393 additions and 5 deletions

View file

@ -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);