Update the debug overlay
This commit is contained in:
parent
9e028d56c0
commit
66b8629964
4 changed files with 65 additions and 6 deletions
|
|
@ -35,6 +35,10 @@ void CAnimationManager::addBezierWithName(std::string name, const Vector2D& p1,
|
|||
|
||||
void CAnimationManager::tick() {
|
||||
|
||||
static std::chrono::time_point lastTick = std::chrono::high_resolution_clock::now();
|
||||
m_fLastTickTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - lastTick).count() / 1000.0;
|
||||
lastTick = std::chrono::high_resolution_clock::now();
|
||||
|
||||
bool animGlobalDisabled = false;
|
||||
|
||||
static auto* const PANIMENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "../helpers/AnimatedVariable.hpp"
|
||||
#include "../helpers/BezierCurve.hpp"
|
||||
#include "../Window.hpp"
|
||||
#include "../helpers/Timer.hpp"
|
||||
|
||||
class CAnimationManager {
|
||||
public:
|
||||
|
|
@ -28,6 +29,8 @@ class CAnimationManager {
|
|||
|
||||
wl_event_source* m_pAnimationTick;
|
||||
|
||||
float m_fLastTickTime; // in ms
|
||||
|
||||
private:
|
||||
bool deltaSmallToFlip(const Vector2D& a, const Vector2D& b);
|
||||
bool deltaSmallToFlip(const CColor& a, const CColor& b);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue