atrooney-online-2/include/aomovie.h
Crystalwarrior e76a83ddfe Allow AOMovie to have timers that take priority over the animated image frame count
Set it up so feeding the timer value when playing the AOMovie would use the timer but only in cases where a non-animated image is used
Update shouts and wtce to pass the 'duration' argument which will be used if the image used is non-animated. Otherwise, prioritize the animated image duration.
2019-09-12 22:45:02 +03:00

38 lines
654 B
C++

#ifndef AOMOVIE_H
#define AOMOVIE_H
#include <QLabel>
#include <QMovie>
class Courtroom;
class AOApplication;
class AOMovie : public QLabel
{
Q_OBJECT
public:
AOMovie(QWidget *p_parent, AOApplication *p_ao_app);
void set_play_once(bool p_play_once);
void start_timer(int delay);
void play(QString p_gif, QString p_char = "", QString p_custom_theme = "", int duration = 0);
void combo_resize(int w, int h);
void stop();
private:
QMovie *m_movie;
AOApplication *ao_app;
QTimer *timer;
bool play_once = true;
signals:
void done();
private slots:
void frame_change(int n_frame);
void timer_done();
};
#endif // AOMOVIE_H