Fix TextFieldElement
This commit is contained in:
parent
fabcf3cbef
commit
b087ccad1e
@ -263,6 +263,7 @@ UIElementType TextFieldElement::getType() {
|
||||
|
||||
void TextFieldElement::focusEnter() {
|
||||
cursor->visible = true;
|
||||
lastCharTyped = glfwGetTime();
|
||||
|
||||
capture = Input::captureKeyboardInput(
|
||||
KeyCharCallback([](KeyCharEvent event, void *data) {
|
||||
@ -337,8 +338,8 @@ void TextFieldElement::draw(UIPoint screenPos, glm::mat4 projection) {
|
||||
}
|
||||
|
||||
void TextFieldElement::setText(std::string text) {
|
||||
this->text = text;
|
||||
this->textElement->setText(text);
|
||||
this->cursorPos = 0;
|
||||
updateText(Unicode::convertStdToU32(text));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user