| 1393 | } |
| 1394 | |
| 1395 | void InputWidget_UpdateText(struct InputWidget* w) { |
| 1396 | int lines = w->GetMaxLines(); |
| 1397 | if (lines > 1) { |
| 1398 | WordWrap_Do(&w->text, w->lines, lines, INPUTWIDGET_LEN); |
| 1399 | } else { |
| 1400 | w->lines[0] = w->text; |
| 1401 | } |
| 1402 | |
| 1403 | Gfx_DeleteTexture(&w->inputTex.ID); |
| 1404 | InputWidget_CalculateLineSizes(w); |
| 1405 | w->RemakeTexture(w); |
| 1406 | InputWidget_UpdateCaret(w); |
| 1407 | OnscreenKeyboard_SetText(&w->text); |
| 1408 | if (w->OnTextChanged) w->OnTextChanged(w); |
| 1409 | } |
| 1410 | |
| 1411 | void InputWidget_SetText(struct InputWidget* w, const cc_string* str) { |
| 1412 | InputWidget_Clear(w); |
no test coverage detected