aboutsummaryrefslogtreecommitdiff
path: root/include/Text.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-20 11:15:15 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-20 11:15:18 +0200
commit4c392178dac1de9a299beb78989c4e0f3fecade9 (patch)
tree552b7a7dfa58e8193705934059e28461815bb951 /include/Text.hpp
parent34e1d3d9d40f9b9139b801de99292a563c3c9a96 (diff)
Add image preview and url/image open in browser
Diffstat (limited to 'include/Text.hpp')
-rw-r--r--include/Text.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/Text.hpp b/include/Text.hpp
index d7d1e06..925dc94 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -57,10 +57,13 @@ namespace dchat
// Warning: won't update until @draw is called
float getHeight() const;
- void processEvent(const sf::Event &event);
+ void processEvent(const sf::Event &event, Cache &cache);
- // Performs culling. @updateGeometry is called even if text is not visible if text is dirty, because updateGeometry might change the dimension of the text and make is visible
- void draw(sf::RenderTarget &target, Cache &cache);
+ // Performs culling. @updateGeometry is called even if text is not visible if text is dirty, because updateGeometry might change the dimension of the text and make is visible.
+ // Returns true if text was drawn on screen (if text is within window borders)
+ bool draw(sf::RenderTarget &target, Cache &cache);
+ private:
+ void onMouseClick(const sf::Event::MouseButtonEvent &event, Cache &cache);
private:
enum class CaretMoveDirection : u8
{