aboutsummaryrefslogtreecommitdiff
path: root/src/aoemotepreview.h
blob: 0cf88c9e31faa0520e78f3b5b51dafe28f65aaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include "aolayer.h"
#include <QWidget>

class AOEmotePreview : public QWidget
{
  Q_OBJECT

public:
  AOEmotePreview(AOApplication *ao_app, QWidget *parent = nullptr);

  void display(QString character, QString emote, bool flipped = false, int xOffset = 0, int yOffset = 0);

  void updateViewportGeometry();

protected:
  void resizeEvent(QResizeEvent *event);

private:
  AOApplication *ao_app;

  QString m_character;
  QString m_emote;

  QWidget *ui_viewport;
  BackgroundLayer *ui_vp_background;
  SplashLayer *ui_vp_speedlines;
  CharLayer *ui_vp_player_char;
  BackgroundLayer *ui_vp_desk;
  QLabel *ui_size_label;
};