diff options
Diffstat (limited to 'src/Entry.cpp')
-rw-r--r-- | src/Entry.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp index ba9718b..7e1b6d9 100644 --- a/src/Entry.cpp +++ b/src/Entry.cpp @@ -95,6 +95,14 @@ namespace QuickMedia { text.appendText(std::move(str)); } + void Entry::replace(size_t start_index, size_t length, const sf::String &insert_str) { + text.replace(start_index, length, insert_str); + } + + int Entry::get_caret_index() const { + return text.getCaretIndex(); + } + void Entry::set_position(const sf::Vector2f &pos) { background.set_position(pos); text.setPosition(pos + sf::Vector2f(background_margin_horizontal, background_margin_vertical)); |