aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 31e54fb..5b2d6ec 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -221,6 +221,11 @@ namespace QuickMedia {
backspace_pressed = false;
}
+ void SearchBar::set_text(const std::string &text) {
+ clear();
+ append_text(text);
+ }
+
void SearchBar::append_text(const std::string &text_to_add) {
if(text_to_add.empty())
return;
@@ -232,7 +237,7 @@ namespace QuickMedia {
}
sf::String str = text.getString();
- str += text_to_add;
+ str += sf::String::fromUtf8(text_to_add.begin(), text_to_add.end());;
text.setString(str);
if(!updated_search) {