Files
chatterino2/src/util/emotemap.hpp
Rasmus Karlsson 64160e60af Fix right-clicking of emotes
There are a few more actions that we might want to add at a later date,
      but a simple feature set has been implemented

Fix #386
2018-05-16 03:55:56 +02:00

35 lines
744 B
C++

#pragma once
#include "messages/image.hpp"
#include "util/concurrentmap.hpp"
namespace chatterino {
namespace util {
struct EmoteData {
EmoteData() = default;
EmoteData(messages::Image *_image)
: image1x(_image)
{
}
// Emotes must have a 1x image to be valid
bool isValid() const
{
return this->image1x != nullptr;
}
messages::Image *image1x = nullptr;
messages::Image *image2x = nullptr;
messages::Image *image3x = nullptr;
// Link to the emote page i.e. https://www.frankerfacez.com/emoticon/144722-pajaCringe
QString pageLink;
};
using EmoteMap = ConcurrentMap<QString, EmoteData>;
} // namespace util
} // namespace chatterino