summaryrefslogtreecommitdiff
path: root/src/helpers/AnimatedVariable.hpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-05 14:02:30 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-05-05 14:02:30 +0200
commit77d37cd72ab87f67dd47930c61fa0ad8792f26c2 (patch)
treed0792b879bd01ec228cf9e08addfcaf7a9439900 /src/helpers/AnimatedVariable.hpp
parent8369f2980aa0c98f087aaf2133c94af8027f14fb (diff)
optimization: dont damage entire window on border anim
Diffstat (limited to 'src/helpers/AnimatedVariable.hpp')
-rw-r--r--src/helpers/AnimatedVariable.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp
index 6fb62654..008d0b84 100644
--- a/src/helpers/AnimatedVariable.hpp
+++ b/src/helpers/AnimatedVariable.hpp
@@ -10,14 +10,20 @@ enum ANIMATEDVARTYPE {
AVARTYPE_COLOR
};
+enum AVARDAMAGEPOLICY {
+ AVARDAMAGE_INVALID = -1,
+ AVARDAMAGE_ENTIRE = 0,
+ AVARDAMAGE_BORDER
+};
+
class CAnimationManager;
class CAnimatedVariable {
public:
CAnimatedVariable(); // dummy var
- void create(ANIMATEDVARTYPE, float* speed, int64_t* enabled, std::string* pBezier, void* pWindow);
- void create(ANIMATEDVARTYPE, std::any val, float* speed, int64_t* enabled, std::string* pBezier, void* pWindow);
+ void create(ANIMATEDVARTYPE, float* speed, int64_t* enabled, std::string* pBezier, void* pWindow, AVARDAMAGEPOLICY);
+ void create(ANIMATEDVARTYPE, std::any val, float* speed, int64_t* enabled, std::string* pBezier, void* pWindow, AVARDAMAGEPOLICY);
~CAnimatedVariable();
@@ -165,7 +171,8 @@ private:
std::chrono::system_clock::time_point animationBegin;
- ANIMATEDVARTYPE m_eVarType = AVARTYPE_INVALID;
+ ANIMATEDVARTYPE m_eVarType = AVARTYPE_INVALID;
+ AVARDAMAGEPOLICY m_eDamagePolicy = AVARDAMAGE_INVALID;
friend class CAnimationManager;
}; \ No newline at end of file