Adding outdated source code into master
This commit is contained in:
parent
5cf467a421
commit
2810e06b3e
27 changed files with 6854 additions and 0 deletions
53
.outdated/graphics/inc/animations.h
Normal file
53
.outdated/graphics/inc/animations.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
#pragma once
|
||||
|
||||
#include "rect.h"
|
||||
#include "color.h"
|
||||
|
||||
namespace tp {
|
||||
namespace glw {
|
||||
|
||||
extern bool gInTransition;
|
||||
|
||||
struct AnimValue {
|
||||
halnf mValPrev = 0;
|
||||
halnf mVal = 0;
|
||||
time_ms mTimeStart = 0;
|
||||
halni mTimeAnim = 250;
|
||||
|
||||
halnf interpolate() const;
|
||||
|
||||
AnimValue();
|
||||
AnimValue(halnf val);
|
||||
|
||||
halnf prev() { return mValPrev; }
|
||||
void set(halnf val);
|
||||
void setNoTransition(halnf);
|
||||
void setAnimTime(halni time);
|
||||
halnf get() const;
|
||||
halnf getTarget() const;
|
||||
bool inTransition() const;
|
||||
explicit operator halnf() const;
|
||||
void operator=(halnf val);
|
||||
};
|
||||
|
||||
struct AnimRect : rect<AnimValue> {
|
||||
|
||||
AnimRect() {
|
||||
set({ 0, 0, 0, 0 });
|
||||
setAnimTime(450);
|
||||
}
|
||||
|
||||
rectf get() const;
|
||||
rectf getTarget() const;
|
||||
void setNoTransition(rectf);
|
||||
void set(const rectf&);
|
||||
void setAnimTime(halni time_ms);
|
||||
};
|
||||
|
||||
struct AnimColor {
|
||||
AnimRect mColor;
|
||||
rgba get() const;
|
||||
void set(const rgba&);
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue