// wj_qrtexture.h -- wraps a QR code's RGBA pixel buffer (see wj_qr.h) as an
// FTexture so it can be drawn in a menu via DrawTexture/MakeGameTexture.
// Modeled directly on AnimTexture (src/common/textures/animtexture.h),
// minus the double-buffering and per-frame update machinery that class
// needs for video and this doesn't -- a QR code is built once and stays
// static for as long as the join token it encodes is valid.
#pragma once
#include "textures.h"
class WJQRTexture : public FTexture
{
TArray<uint8_t> Image; // RGBA, row-major, matches WJQRImage::rgba layout
public:
WJQRTexture() = default;
void SetImage(int width, int height, const uint8_t *rgba);
virtual FBitmap GetBgraBitmap(const PalEntry *remap, int *trans) override;
};