diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-04-30 13:54:10 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-04-30 13:54:13 +0200 |
commit | 9e576f9fbcbcc4603689b0b1215cf3d526bd9616 (patch) | |
tree | ef90a131458a84b4e993ec3d12dd5022a460248a /src/Message.cpp | |
parent | 1a967f184e55e2fa989d40e5bbaff3ba1efe54a0 (diff) |
Add timestamp to messages
Diffstat (limited to 'src/Message.cpp')
-rw-r--r-- | src/Message.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Message.cpp b/src/Message.cpp index 5cd8445..77e3cfa 100644 --- a/src/Message.cpp +++ b/src/Message.cpp @@ -7,9 +7,10 @@ using namespace std; namespace dchat { - Message::Message(User *_user, const std::string &_text) : + Message::Message(User *_user, const std::string &_text, u64 _timestampSeconds) : user(_user), - text(sf::String::fromUtf8(_text.begin(), _text.end()), ResourceCache::getFont("fonts/Roboto-Regular.ttf"), 18 * Settings::getScaling(), 0.0f, false) + text(sf::String::fromUtf8(_text.begin(), _text.end()), ResourceCache::getFont("fonts/Roboto-Regular.ttf"), 18 * Settings::getScaling(), 0.0f, false), + timestampSeconds(_timestampSeconds) { text.setFillColor(ColorScheme::getTextRegularColor()); } |