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