diff options
Diffstat (limited to 'src/Text.cpp')
-rw-r--r-- | src/Text.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text.cpp b/src/Text.cpp index fc3effe..fa46277 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -318,7 +318,11 @@ namespace dchat pos.y += floor(vspace); // Origin is at bottom left, we want it to be at top left // TODO: Do not use maxWidth here. Max width might be set to 99999 and actual text width might be 200. Text width should be calculated instead - if(pos.x + maxWidth <= 0.0f || pos.x >= maxWidth || pos.y + totalHeight <= 0.0f || pos.y >= target.getSize().y) return; + //sf::FloatRect targetRect(0.0f, 0.0f, maxWidth, target.getSize().y); + //sf::FloatRect textRect(pos.x, pos.y, maxWidth, ) + //colRect.contains() + //if(pos.x + maxWidth <= 0.0f || pos.x >= maxWidth || pos.y + totalHeight <= 0.0f || pos.y >= target.getSize().y) return; + if(pos.y + totalHeight <= 0.0f || pos.y >= target.getSize().y) return; states.transform.translate(pos); states.texture = &font.getTexture(characterSize); |