aboutsummaryrefslogtreecommitdiff
path: root/src/Message.cpp
blob: ca5082123d026cdd00783a25868ef4bf72025507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "../include/Message.hpp"
#include "../include/ResourceCache.hpp"
#include "../include/Settings.hpp"
#include "../include/ColorScheme.hpp"

using namespace std;

namespace dchat
{
    Message::Message(User *_user, const std::string &_text, u64 _timestampSeconds, bool plainText) : 
        user(_user),
        text(sf::String::fromUtf8(_text.begin(), _text.end()), ResourceCache::getFont("fonts/Nunito-Regular.ttf"), 18 * Settings::getScaling(), 0.0f, plainText),
        timestampSeconds(_timestampSeconds),
        type(Type::REGULAR)
    {
        text.setFillColor(ColorScheme::getTextRegularColor());
    }
}