From 700c2b37277867982bd7e308a23121918c4219fc Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Sat, 27 Jul 2024 19:41:40 -0600 Subject: [PATCH 1/7] Add zap animation --- metadata/animate.xml | 8 +++- plugins/animate/animate.cpp | 9 +++++ plugins/animate/zap.hpp | 79 +++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 plugins/animate/zap.hpp diff --git a/metadata/animate.xml b/metadata/animate.xml index 385de9276..ee360b9fb 100644 --- a/metadata/animate.xml +++ b/metadata/animate.xml @@ -25,6 +25,10 @@ fire <_name>Fire + + zap + <_name>Zap + + diff --git a/plugins/animate/zap.hpp b/plugins/animate/zap.hpp index 3f5c79a95..cbbc3d132 100644 --- a/plugins/animate/zap.hpp +++ b/plugins/animate/zap.hpp @@ -31,6 +31,9 @@ #include static const std::string zap_transformer_name = "zap-transformer"; + +wf::option_wrapper_t zap_duration{"animate/zap_duration"}; + namespace wf { namespace zap @@ -54,7 +57,7 @@ class zap_animation : public animation_base this->view = view; this->type = type; this->progression = - wf::zap::zap_animation_t(wf::create_option(dur)); + wf::zap::zap_animation_t(wf::create_option(zap_duration)); if (type & HIDING_ANIMATION) { From 1f341b5ba91716b2b8916bb97467de838d9eb856 Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Tue, 27 Aug 2024 09:46:32 -0600 Subject: [PATCH 7/7] zap: Move transformer name variable within plugin namespace --- plugins/animate/zap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/animate/zap.hpp b/plugins/animate/zap.hpp index cbbc3d132..e5b5f2211 100644 --- a/plugins/animate/zap.hpp +++ b/plugins/animate/zap.hpp @@ -30,7 +30,6 @@ #include #include -static const std::string zap_transformer_name = "zap-transformer"; wf::option_wrapper_t zap_duration{"animate/zap_duration"}; @@ -38,6 +37,7 @@ namespace wf { namespace zap { +static const std::string zap_transformer_name = "zap-transformer"; using namespace wf::animation; class zap_animation_t : public duration_t {