Interactive input text with cursor. More...
#include <le2d/drawable/input_text.hpp>
Public Types | |
| using | Params = InputTextParams |
Public Member Functions | |
| InputText (gsl::not_null< IFont * > font, Params const ¶ms={}) | |
| auto | get_size () const -> glm::vec2 |
| auto | get_font () const -> IFont & |
| auto | get_atlas () const -> IFontAtlas & |
| auto | is_interactive () const -> bool |
| void | set_interactive (bool interactive) |
| auto | get_string () const -> std::string_view |
| void | set_string (std::string line) |
| void | append (std::string_view str) |
| void | write (char ch) |
| void | backspace () |
| void | delete_front () |
| void | clear () |
| auto | get_cursor () const -> int |
| void | set_cursor (int cursor) |
| void | move_cursor (int const delta) |
| void | cursor_left () |
| void | cursor_right () |
| void | cursor_home () |
| void | cursor_end () |
| void | on_key (event::Key const &key) |
| void | on_codepoint (event::Codepoint codepoint) |
| void | tick (kvf::Seconds dt) |
| void | draw (IRenderer &renderer) const override |
Additional Inherited Members | |
Public Attributes inherited from le::RenderInstance | |
| Transform | transform {} |
| kvf::Color | tint {kvf::white_v} |
Interactive input text with cursor.
|
explicit |
| void le::drawable::InputText::append | ( | std::string_view | str | ) |
| void le::drawable::InputText::backspace | ( | ) |
| void le::drawable::InputText::clear | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void le::drawable::InputText::delete_front | ( | ) |
|
overridevirtual |
Implements le::IDrawable.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void le::drawable::InputText::on_codepoint | ( | event::Codepoint | codepoint | ) |
| void le::drawable::InputText::on_key | ( | event::Key const & | key | ) |
| void le::drawable::InputText::set_cursor | ( | int | cursor | ) |
| void le::drawable::InputText::set_interactive | ( | bool | interactive | ) |
| void le::drawable::InputText::set_string | ( | std::string | line | ) |
| void le::drawable::InputText::tick | ( | kvf::Seconds | dt | ) |
| void le::drawable::InputText::write | ( | char | ch | ) |