aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrickyLeifa <date.epoch@gmail.com>2024-05-23 00:02:07 +0200
committerTrickyLeifa <date.epoch@gmail.com>2024-05-23 00:02:07 +0200
commit29284c0b21408131b280744f58b78b2792d6a826 (patch)
treed664f474696f4728a4ba75600fff57d24650097e
parentd135bbc51144667fb3ee323a7635e3dbfc3f41a8 (diff)
Removed theme submodule, ...
* Removed theme submodule. * This should be handled by the CI. * Fixed effects not disappearing when they should (cull / repeat)
-rw-r--r--.gitmodules3
-rw-r--r--bin/base/misc/default/chatbox.pngbin505 -> 0 bytes
-rw-r--r--bin/base/misc/default/holdit.opusbin15238 -> 0 bytes
-rw-r--r--bin/base/misc/default/holdit_bubble.gifbin39003 -> 0 bytes
-rw-r--r--bin/base/misc/default/objection.opusbin15238 -> 0 bytes
-rw-r--r--bin/base/misc/default/objection_bubble.gifbin43029 -> 0 bytes
-rw-r--r--bin/base/misc/default/takethat.opusbin15238 -> 0 bytes
-rw-r--r--bin/base/misc/default/takethat_bubble.gifbin40634 -> 0 bytes
m---------bin/base/themes0
-rw-r--r--src/animationlayer.cpp21
-rw-r--r--src/animationlayer.h2
-rw-r--r--src/courtroom.cpp4
12 files changed, 22 insertions, 8 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index d056f050..00000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "bin/base/themes"]
- path = bin/base/themes
- url = https://github.com/AttorneyOnline/AO2-Themes.git
diff --git a/bin/base/misc/default/chatbox.png b/bin/base/misc/default/chatbox.png
deleted file mode 100644
index 0c3bae1e..00000000
--- a/bin/base/misc/default/chatbox.png
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/holdit.opus b/bin/base/misc/default/holdit.opus
deleted file mode 100644
index a454be83..00000000
--- a/bin/base/misc/default/holdit.opus
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/holdit_bubble.gif b/bin/base/misc/default/holdit_bubble.gif
deleted file mode 100644
index 536f8cd7..00000000
--- a/bin/base/misc/default/holdit_bubble.gif
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/objection.opus b/bin/base/misc/default/objection.opus
deleted file mode 100644
index 7e15d05e..00000000
--- a/bin/base/misc/default/objection.opus
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/objection_bubble.gif b/bin/base/misc/default/objection_bubble.gif
deleted file mode 100644
index 22c2169b..00000000
--- a/bin/base/misc/default/objection_bubble.gif
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/takethat.opus b/bin/base/misc/default/takethat.opus
deleted file mode 100644
index 2f143e12..00000000
--- a/bin/base/misc/default/takethat.opus
+++ /dev/null
Binary files differ
diff --git a/bin/base/misc/default/takethat_bubble.gif b/bin/base/misc/default/takethat_bubble.gif
deleted file mode 100644
index 795552a8..00000000
--- a/bin/base/misc/default/takethat_bubble.gif
+++ /dev/null
Binary files differ
diff --git a/bin/base/themes b/bin/base/themes
deleted file mode 160000
-Subproject 32a130d1a35220b27deecf22f59c83e92cac1fe
diff --git a/src/animationlayer.cpp b/src/animationlayer.cpp
index a21e20c4..708aef26 100644
--- a/src/animationlayer.cpp
+++ b/src/animationlayer.cpp
@@ -143,6 +143,11 @@ void AnimationLayer::jumpToFrame(int number)
}
}
+bool AnimationLayer::isPlayOnce()
+{
+ return m_play_once;
+}
+
void AnimationLayer::setPlayOnce(bool enabled)
{
m_play_once = enabled;
@@ -324,6 +329,7 @@ void AnimationLayer::frameTicker()
return;
}
+ stopPlayback();
return;
}
@@ -595,11 +601,20 @@ void BackgroundAnimationLayer::loadAndPlayAnimation(QString fileName)
}
#endif
- setFileName(file_path);
+ bool is_different_file = file_path != this->fileName();
+ if (is_different_file)
+ {
+ setFileName(file_path);
+ }
+
VPath design_path = ao_app->get_background_path("design.ini");
setTransformationMode(ao_app->get_scaling(ao_app->read_design_ini("scaling", design_path)));
setStretchToFit(ao_app->read_design_ini("stretch", design_path).startsWith("true"));
- startPlayback();
+
+ if (is_different_file)
+ {
+ startPlayback();
+ }
}
SplashAnimationLayer::SplashAnimationLayer(AOApplication *ao_app, QWidget *parent)
@@ -640,7 +655,7 @@ void EffectAnimationLayer::setHideWhenStopped(bool enabled)
void EffectAnimationLayer::maybeHide()
{
- if (m_hide_when_stopped)
+ if (m_hide_when_stopped && isPlayOnce())
{
hide();
}
diff --git a/src/animationlayer.h b/src/animationlayer.h
index c67f7026..820703d6 100644
--- a/src/animationlayer.h
+++ b/src/animationlayer.h
@@ -62,6 +62,8 @@ public:
int currentFrameNumber();
void jumpToFrame(int number);
+ bool isPlayOnce();
+
void setPlayOnce(bool enabled);
void setStretchToFit(bool enabled);
void setResetCacheWhenStopped(bool enabled);
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 13467976..4540c270 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -3157,6 +3157,8 @@ void Courtroom::do_effect(QString fx_path, QString fx_sound, QString p_char, QSt
QString effect = ao_app->get_effect(fx_path, p_char, p_folder);
if (effect == "")
{
+ ui_vp_effect->stopPlayback();
+ ui_vp_effect->hide();
return;
}
@@ -3173,8 +3175,6 @@ void Courtroom::do_effect(QString fx_path, QString fx_sound, QString p_char, QSt
ui_vp_effect->setTransformationMode(ao_app->get_scaling(ao_app->get_effect_property(fx_path, p_char, p_folder, "scaling")));
ui_vp_effect->setStretchToFit(ao_app->get_effect_property(fx_path, p_char, p_folder, "stretch").startsWith("true"));
ui_vp_effect->setFlipped(ao_app->get_effect_property(fx_path, p_char, p_folder, "respect_flip").startsWith("true") && m_chatmessage[FLIP].toInt() == 1);
- ui_vp_effect->setPlayOnce(false); // The effects themselves dictate whether or not they're looping.
- // Static effects will linger.
bool looping = ao_app->get_effect_property(fx_path, p_char, p_folder, "loop").startsWith("true");