#ifndef TEXT_INPUT_H #define TEXT_INPUT_H #include "utils/List.h" class TextInput final { List input; int cursor; int limit; bool active; public: TextInput(); void setLimit(int limit); void reset(); void setActive(bool b); void onKeyEvent(int key, int scancode, int action, int mods); void onCharEvent(unsigned int codepoint); template void toString(StringBuffer& s) const { for(unsigned int c : input) { s.appendUnicode(c); } } int getCursor() const; }; #endif