aboutsummaryrefslogtreecommitdiff
path: root/include/Text.hpp
diff options
context:
space:
mode:
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
{