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, 4 insertions, 3 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 6895dcb..aafe987 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -1,5 +1,6 @@
#include "../include/SearchBar.hpp"
#include "../include/Scale.hpp"
+#include "../include/FontLoader.hpp"
#include <SFML/Window/Event.hpp>
#include <SFML/Window/Clipboard.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
@@ -17,7 +18,7 @@ static const float padding_bottom = 15.0f;
static const float background_margin_vertical = 4.0f;
namespace QuickMedia {
- SearchBar::SearchBar(sf::Font &font, sf::Texture *plugin_logo, const std::string &placeholder, bool input_masked) :
+ SearchBar::SearchBar(sf::Texture *plugin_logo, const std::string &placeholder, bool input_masked) :
onTextUpdateCallback(nullptr),
onTextSubmitCallback(nullptr),
onTextBeginTypingCallback(nullptr),
@@ -25,8 +26,8 @@ namespace QuickMedia {
text_autosearch_delay(0),
autocomplete_search_delay(0),
caret_visible(true),
- text(placeholder, font, 16),
- autocomplete_text("", font, 16),
+ text(placeholder, *FontLoader::get_font(FontLoader::FontType::LATIN), 16),
+ autocomplete_text("", *FontLoader::get_font(FontLoader::FontType::LATIN), 16),
background(sf::Vector2f(1.0f, 1.0f), 10.0f, 10),
placeholder_str(placeholder),
show_placeholder(true),