| 1755 | TextInputWidget_BuildMesh, TextInputWidget_Render2, TextInputWidget_MaxVertices |
| 1756 | }; |
| 1757 | void TextInputWidget_Create(struct TextInputWidget* w, int width, const cc_string* text, struct MenuInputDesc* desc) { |
| 1758 | InputWidget_Reset(&w->base); |
| 1759 | w->base.VTABLE = &TextInputWidget_VTABLE; |
| 1760 | |
| 1761 | w->minWidth = Display_ScaleX(width); |
| 1762 | w->minHeight = Display_ScaleY(30); |
| 1763 | w->desc = *desc; |
| 1764 | |
| 1765 | w->base.convertPercents = false; |
| 1766 | w->base.padding = 3; |
| 1767 | w->base.showCaret = !Gui_TouchUI; |
| 1768 | w->base.flags = WIDGET_FLAG_SELECTABLE; |
| 1769 | |
| 1770 | w->base.GetMaxLines = TextInputWidget_GetMaxLines; |
| 1771 | w->base.RemakeTexture = TextInputWidget_RemakeTexture; |
| 1772 | w->base.OnPressedEnter = InputWidget_OnPressedEnter; |
| 1773 | w->base.AllowedChar = TextInputWidget_AllowedChar; |
| 1774 | |
| 1775 | String_InitArray(w->base.text, w->_textBuffer); |
| 1776 | String_Copy(&w->base.text, text); |
| 1777 | w->onscreenPlaceholder = ""; |
| 1778 | w->onscreenType = KEYBOARD_TYPE_TEXT; |
| 1779 | } |
| 1780 | |
| 1781 | void TextInputWidget_Add(void* screen, struct TextInputWidget* w, int width, const cc_string* text, struct MenuInputDesc* d) { |
| 1782 | TextInputWidget_Create(w, width, text, d); |
no test coverage detected