2017-12-31 22:58:35 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-01-11 20:16:25 +01:00
|
|
|
#include "messages/image.hpp"
|
2017-12-31 22:58:35 +01:00
|
|
|
#include "util/concurrentmap.hpp"
|
|
|
|
|
2018-01-07 02:56:45 +01:00
|
|
|
#include <cassert>
|
|
|
|
|
2017-12-31 22:58:35 +01:00
|
|
|
namespace chatterino {
|
|
|
|
namespace util {
|
|
|
|
|
|
|
|
struct EmoteData {
|
|
|
|
EmoteData()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-01-11 20:16:25 +01:00
|
|
|
EmoteData(messages::Image *_image)
|
2018-01-07 02:56:45 +01:00
|
|
|
: image1x(_image)
|
2017-12-31 22:58:35 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-01-07 02:56:45 +01:00
|
|
|
// Emotes must have a 1x image to be valid
|
|
|
|
bool isValid() const
|
|
|
|
{
|
|
|
|
return this->image1x != nullptr;
|
|
|
|
}
|
|
|
|
|
2018-01-11 20:16:25 +01:00
|
|
|
messages::Image *image1x = nullptr;
|
|
|
|
messages::Image *image2x = nullptr;
|
|
|
|
messages::Image *image3x = nullptr;
|
2017-12-31 22:58:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef ConcurrentMap<QString, EmoteData> EmoteMap;
|
2018-01-07 02:56:45 +01:00
|
|
|
|
|
|
|
} // namespace util
|
|
|
|
} // namespace chatterino
|