diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoemotepreview.h | 32 | ||||
| -rw-r--r-- | include/courtroom.h | 9 |
2 files changed, 41 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 diff --git a/include/courtroom.h b/include/courtroom.h index 43cecf36..eee84a6d 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -24,6 +24,7 @@ #include "lobby.h" #include "scrolltext.h" #include "eventfilters.h" +#include "aoemotepreview.h" #include <QCheckBox> #include <QCloseEvent> @@ -690,6 +691,9 @@ private: AOButton *ui_emote_left; AOButton *ui_emote_right; + QMenu *emote_menu; + AOEmotePreview *emote_preview; + QComboBox *ui_emote_dropdown; QComboBox *ui_pos_dropdown; AOButton *ui_pos_remove; @@ -920,6 +924,8 @@ private slots: void on_custom_objection_clicked(); void show_custom_objection_menu(const QPoint &pos); + void show_emote_menu(const QPoint &pos); + void on_realization_clicked(); void on_screenshake_clicked(); @@ -999,6 +1005,9 @@ private slots: // Proceed to parse the oldest chatmessage and remove it from the stack void chatmessage_dequeue(); + + void preview_emote(QString emote); + void update_emote_preview(); }; #endif // COURTROOM_H |
