aboutsummaryrefslogtreecommitdiff
path: root/include/Body.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-09 15:59:09 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-09 15:59:09 +0200
commitf6a07804546cb0ee0e1a243929dbe7ec25214c9e (patch)
tree5e48a85366d791a7efe72bd6b3301e705e264509 /include/Body.hpp
parentc90eab0046f95b5ff20e85be46fa4d70d451f3b6 (diff)
Redesign login, refactor keyboard movement
Diffstat (limited to 'include/Body.hpp')
-rw-r--r--include/Body.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 39ad19d..b50b695 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -218,7 +218,7 @@ namespace QuickMedia {
void clamp_selection();
// Returns true if the event was handled
- bool on_event(const sf::RenderWindow &window, const sf::Event &event);
+ bool on_event(const sf::RenderWindow &window, const sf::Event &event, bool keyboard_navigation = true);
void draw(sf::RenderWindow &window, sf::Vector2f pos, sf::Vector2f size);
void draw(sf::RenderWindow &window, sf::Vector2f pos, sf::Vector2f size, const Json::Value &content_progress);
// |size| is the clip size, another outside this will be cut off.
@@ -262,6 +262,9 @@ namespace QuickMedia {
sf::Shader *thumbnail_mask_shader;
AttachSide attach_side = AttachSide::TOP;
bool title_mark_urls = false;
+
+ std::function<void()> on_top_reached = nullptr;
+ std::function<void()> on_bottom_reached = nullptr;
private:
void draw_item(sf::RenderWindow &window, BodyItem *item, const sf::Vector2f &pos, const sf::Vector2f &size, const float item_height, const int item_index, const Json::Value &content_progress, bool include_embedded_item = true, bool merge_with_previous = false);
void update_dirty_state(BodyItem *body_item, float width);