made char movies a bit more consistent in terms of quality
This commit is contained in:
parent
145dfa4f7d
commit
1e0531a3d3
@ -42,24 +42,20 @@ void AOCharMovie::play(QString p_char, QString p_emote, QString emote_prefix)
|
||||
m_movie->stop();
|
||||
m_movie->setFileName(gif_path);
|
||||
|
||||
if (m_flipped)
|
||||
{
|
||||
QImageReader *reader = new QImageReader(gif_path);
|
||||
QImageReader *reader = new QImageReader(gif_path);
|
||||
|
||||
flipped_movie.clear();
|
||||
QImage f_image = reader->read();
|
||||
while (!f_image.isNull())
|
||||
{
|
||||
flipped_movie.clear();
|
||||
QImage f_image = reader->read();
|
||||
while (!f_image.isNull())
|
||||
{
|
||||
if (m_flipped)
|
||||
flipped_movie.append(f_image.mirrored(true, false));
|
||||
f_image = reader->read();
|
||||
}
|
||||
else
|
||||
flipped_movie.append(f_image);
|
||||
f_image = reader->read();
|
||||
}
|
||||
|
||||
delete reader;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setMovie(m_movie);
|
||||
}
|
||||
delete reader;
|
||||
|
||||
this->show();
|
||||
m_movie->start();
|
||||
@ -157,7 +153,7 @@ void AOCharMovie::combo_resize(int w, int h)
|
||||
|
||||
void AOCharMovie::frame_change(int n_frame)
|
||||
{
|
||||
if (m_flipped && flipped_movie.size() > n_frame)
|
||||
if (flipped_movie.size() > n_frame)
|
||||
{
|
||||
QPixmap f_pixmap = QPixmap::fromImage(flipped_movie.at(n_frame));
|
||||
|
||||
|
@ -10,8 +10,6 @@ AOMovie::AOMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent)
|
||||
|
||||
m_movie = new QMovie();
|
||||
|
||||
this->setMovie(m_movie);
|
||||
|
||||
connect(m_movie, SIGNAL(frameChanged(int)), this, SLOT(frame_change(int)));
|
||||
}
|
||||
|
||||
|
@ -1631,7 +1631,7 @@ void Courtroom::on_pos_dropdown_changed(int p_index)
|
||||
f_pos = "";
|
||||
}
|
||||
|
||||
if (f_pos == "" || ui_ooc_chat_name == "")
|
||||
if (f_pos == "" || ui_ooc_chat_name->text() == "")
|
||||
return;
|
||||
|
||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/pos " + f_pos + "#%"));
|
||||
|
Loading…
Reference in New Issue
Block a user