From 02e029ed40f801e0710b09062069e7083cd30b93 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 17 Feb 2022 19:18:19 +0100 Subject: Add local anime tracking. Check readme for more info about local_anime config --- src/BodyItem.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/BodyItem.cpp') diff --git a/src/BodyItem.cpp b/src/BodyItem.cpp index ebc3ead..0c6e1ce 100644 --- a/src/BodyItem.cpp +++ b/src/BodyItem.cpp @@ -1,9 +1,12 @@ #include "../include/BodyItem.hpp" #include "../include/Theme.hpp" #include "../include/Config.hpp" -#include namespace QuickMedia { + static float floor(float v) { + return (int)v; + } + // static std::shared_ptr BodyItem::create(std::string title, bool selectable) { return std::shared_ptr(new BodyItem(std::move(title), selectable)); @@ -78,7 +81,7 @@ namespace QuickMedia { void BodyItem::add_reaction(std::string text, void *userdata) { Reaction reaction; - reaction.text = std::make_unique(std::move(text), false, std::floor(get_config().body.reaction_font_size * get_config().scale * get_config().font_scale), 0.0f); + reaction.text = std::make_unique(std::move(text), false, 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)); } -- cgit v1.2.3