aboutsummaryrefslogtreecommitdiff
path: root/src/BodyItem.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-17 09:47:45 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-17 09:59:29 +0100
commit453eac7f1f5ef70390ec51087fc1f190811a7507 (patch)
tree21a32ef6de9a3d7c29562484104b56c12518a6f0 /src/BodyItem.cpp
parentfc49d40c0d2f6edbbe9dde1f1b53d6a17e9d9f7d (diff)
Replace sfml with mgl
Diffstat (limited to 'src/BodyItem.cpp')
-rw-r--r--src/BodyItem.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/BodyItem.cpp b/src/BodyItem.cpp
index 6523738..ebc3ead 100644
--- a/src/BodyItem.cpp
+++ b/src/BodyItem.cpp
@@ -45,7 +45,7 @@ namespace QuickMedia {
post_number = other.post_number;
userdata = other.userdata;
loaded_height = 0.0f;
- loaded_image_size = sf::Vector2f(0.0f, 0.0f);
+ loaded_image_size = mgl::vec2f(0.0f, 0.0f);
loaded_content_height = 0.0f;
embedded_item_status = other.embedded_item_status;
if(other.embedded_item) {
@@ -77,14 +77,13 @@ namespace QuickMedia {
}
void BodyItem::add_reaction(std::string text, void *userdata) {
- sf::String str = sf::String::fromUtf8(text.begin(), text.end());
Reaction reaction;
- reaction.text = std::make_unique<Text>(std::move(str), false, std::floor(get_config().body.reaction_font_size * get_config().scale * get_config().font_scale), 0.0f);
+ reaction.text = std::make_unique<Text>(std::move(text), false, std::floor(get_config().body.reaction_font_size * get_config().scale * get_config().font_scale), 0.0f);
reaction.userdata = userdata;
reactions.push_back(std::move(reaction));
}
- void BodyItem::draw_list(Body *body, sf::RenderTarget &render_target) {
+ void BodyItem::draw_list(Body *body, mgl::Window &render_target) {
}
} \ No newline at end of file