MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / TextInput

Method TextInput

src/ui/elements/ui_text_input.cpp:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 TextInput::TextInput(Element *parent, bool text_visible) : Element(parent, Events(EventType::Text, EventType::Focus), "input") {
32 if (!text_visible) {
33 set_attribute("type", "password");
34 }
35 set_min_width(60.0f);
36 set_border_color(Color{ 242, 242, 242, 255 });
37 set_border_bottom_width(1.0f);
38 set_padding_bottom(6.0f);
39 set_focusable(true);
40 set_nav_auto(NavDirection::Up);
41 set_nav_auto(NavDirection::Down);
42 set_tab_index_auto();
43 }
44
45 void TextInput::set_text(std::string_view text) {
46 this->text = std::string(text);

Callers

nothing calls this directly

Calls 1

EventsFunction · 0.85

Tested by

no test coverage detected