aboutsummaryrefslogtreecommitdiff
path: root/include/aoemotepreview.h
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-23 18:18:54 +0300
committerGitHub <noreply@github.com>2022-07-23 18:18:54 +0300
commitef49b46c37c3d1922db7afcbfd7a715a250a5b4c (patch)
tree04c3e245f90bf30b88984ac557f79642b583bd0b /include/aoemotepreview.h
parentad578eb0bd15dfa828c8c43518991ee8ce81e261 (diff)
Add Emote preview (#774)
* Add an emote preview which pops up from right click context menu * rename action names to "preanim/idle/talk" * Improve emote preview window * Preview no longer ignores offsets No longer override stylesheets Add "Preview Selected" option to the dropdown * bruh * Fix "set play once" being ignored when a (c) emote is loaded * Remove useless comments * Implement Salanto suggestions Co-authored-by: stonedDiscord <Tukz@gmx.de>
Diffstat (limited to 'include/aoemotepreview.h')
-rw-r--r--include/aoemotepreview.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/aoemotepreview.h b/include/aoemotepreview.h
new file mode 100644
index 00000000..315371b3
--- /dev/null
+++ b/include/aoemotepreview.h
@@ -0,0 +1,32 @@
+#ifndef AOEMOTEPREVIEW_H
+#define AOEMOTEPREVIEW_H
+
+#include "aolayer.h"
+#include <QWidget>
+
+class AOEmotePreview : public QWidget
+{
+ Q_OBJECT
+public:
+ AOEmotePreview(QWidget *parent = nullptr,
+ AOApplication *p_ao_app = nullptr);
+
+ void set_widgets();
+ void play(QString emote, QString char_name, bool flipped = false, int self_offset = 0, int self_offset_v = 0);
+private:
+ AOApplication *ao_app;
+ QWidget *ui_viewport;
+ BackgroundLayer *ui_vp_background;
+ SplashLayer *ui_vp_speedlines;
+ CharLayer *ui_vp_player_char;
+ BackgroundLayer *ui_vp_desk;
+
+ QLabel *ui_size_label;
+
+ QString m_emote = "";
+ QString m_char = "";
+protected:
+ void resizeEvent(QResizeEvent *);
+};
+
+#endif // AOEMOTEPREVIEW_H