From 0147975faf939db389bebaa95e3a12e5e5a8753f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 23 Apr 2022 14:16:02 +0200 Subject: New animation system --- src/Window.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Window.hpp') diff --git a/src/Window.hpp b/src/Window.hpp index 6969213a..ccd4efcf 100644 --- a/src/Window.hpp +++ b/src/Window.hpp @@ -3,6 +3,7 @@ #include "defines.hpp" #include "events/Events.hpp" #include "helpers/SubsurfaceTree.hpp" +#include "helpers/AnimatedVariable.hpp" struct SWindowSpecialRenderData { float alpha = 1.f; @@ -10,7 +11,7 @@ struct SWindowSpecialRenderData { class CWindow { public: - + CWindow(); ~CWindow(); DYNLISTENER(commitWindow); @@ -36,8 +37,8 @@ public: Vector2D m_vEffectiveSize = Vector2D(0,0); // this is the real position and size used to draw the thing - Vector2D m_vRealPosition = Vector2D(0,0); - Vector2D m_vRealSize = Vector2D(0,0); + CAnimatedVariable m_vRealPosition; + CAnimatedVariable m_vRealSize; // this is used for pseudotiling bool m_bIsPseudotiled = false; @@ -69,10 +70,10 @@ public: SSurfaceTreeNode* m_pSurfaceTree = nullptr; // Animated border - CColor m_cRealBorderColor = CColor(0,0,0,0); + CAnimatedVariable m_cRealBorderColor; // Fade in-out - float m_fAlpha = 0.f; + CAnimatedVariable m_fAlpha; bool m_bFadingOut = false; bool m_bReadyToDelete = false; @@ -84,7 +85,7 @@ public: // For the list lookup bool operator==(const CWindow& rhs) { - return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && m_fAlpha == rhs.m_fAlpha && m_bFadingOut == rhs.m_bFadingOut; + return m_uSurface.xdg == rhs.m_uSurface.xdg && m_uSurface.xwayland == rhs.m_uSurface.xwayland && m_vPosition == rhs.m_vPosition && m_vSize == rhs.m_vSize && m_bFadingOut == rhs.m_bFadingOut; } }; \ No newline at end of file -- cgit v1.2.3