Skip to content

Commit

Permalink
added FadeIn and FadeOut 'transitions' to Animator
Browse files Browse the repository at this point in the history
  • Loading branch information
terrifictable committed Jan 31, 2023
1 parent c12328c commit f15d50e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
22 changes: 22 additions & 0 deletions imgui_old.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

[Window][TextEditor]
Pos=1010,48
Size=712,724
Collapsed=0

[Window][Options]
Pos=120,205
Size=375,362
Collapsed=0

[Window][Shader]
Pos=642,262
Size=1280,720
Collapsed=0

[Docking][Data]

12 changes: 6 additions & 6 deletions src/gui/Animator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ void Animator::Pulse(float *value, bool *tick) {
}

//template<typename T>
void Animator::FadeIn(float &value) {
if (value < Max)
value += Speed;
void Animator::FadeIn(float *value) {
if (*value < Max)
*value += Speed;
}
//template<typename T>
void Animator::FadeOut(float &value) {
if (value > Min)
value -= Speed;
void Animator::FadeOut(float *value) {
if (*value > Min)
*value -= Speed;
}

0 comments on commit f15d50e

Please sign in to comment.