aboutsummaryrefslogtreecommitdiff
path: root/src/Text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text.cpp')
-rw-r--r--src/Text.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Text.cpp b/src/Text.cpp
index 5191ca5..7503d61 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -845,6 +845,7 @@ namespace dchat
}
*/
+
states.transform.translate(pos);
states.texture = &font->getTexture(characterSize);
target.draw(vertices, states);
@@ -951,6 +952,15 @@ namespace dchat
contentByUrlResult.webPagePreview->title.setLineSpacing(0.0f);
contentByUrlResult.webPagePreview->title.setFillColor(URL_COLOR);
contentByUrlResult.webPagePreview->title.draw(target, cache);
+
+ pos.y += contentByUrlResult.webPagePreview->title.getHeight();
+
+ contentByUrlResult.webPagePreview->description.setCharacterSize(characterSize);
+ contentByUrlResult.webPagePreview->description.setMaxWidth(previewWidth);
+ contentByUrlResult.webPagePreview->description.setPosition(pos);
+ contentByUrlResult.webPagePreview->description.setLineSpacing(0.0f);
+ contentByUrlResult.webPagePreview->description.setFillColor(color);
+ contentByUrlResult.webPagePreview->description.draw(target, cache);
break;
}
}