aboutsummaryrefslogtreecommitdiff
path: root/src/Entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entry.cpp')
-rw-r--r--src/Entry.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp
index 5416724..8aa2bba 100644
--- a/src/Entry.cpp
+++ b/src/Entry.cpp
@@ -107,6 +107,10 @@ namespace QuickMedia {
return text.getCaretIndex();
}
+ void Entry::set_caret_index(int index) {
+ text.setCaretIndex(index);
+ }
+
void Entry::set_position(const mgl::vec2f &pos) {
background.set_position(pos);
text.set_position(pos + mgl::vec2f(background_margin_horizontal * padding_scale, background_margin_vertical * padding_scale - (float)text.get_character_size() * 0.3f).floor());