#include <AFade.h>
Definition at line 8 of file AFade.h.
◆ AFade()
Definition at line 10 of file AFade.cpp.
11 : m_FadeFromColor( 255, 255, 255, 255 ), m_FadeToColor( 255, 255, 255, 255 ), m_fCurrentTime( 0.0f ), m_FadeOverEmitter( this )
12{
13}
◆ ~AFade()
virtual AFade::~AFade |
( |
| ) |
|
|
virtualdefault |
◆ GetCurrentColor()
Definition at line 30 of file AFade.cpp.
31{
32 TFLOAT fProgress = m_fCurrentTime / m_fFadeTime;
33 a_rColor.A =
TUINT8( Toshi::TMath::LERP( m_FadeFromColor.A / 255.0f, m_FadeToColor.A / 255.0f, fProgress ) * 255.0f );
34 a_rColor.R =
TUINT8( Toshi::TMath::LERP( m_FadeFromColor.R / 255.0f, m_FadeToColor.R / 255.0f, fProgress ) * 255.0f );
35 a_rColor.G =
TUINT8( Toshi::TMath::LERP( m_FadeFromColor.G / 255.0f, m_FadeToColor.G / 255.0f, fProgress ) * 255.0f );
36 a_rColor.B =
TUINT8( Toshi::TMath::LERP( m_FadeFromColor.B / 255.0f, m_FadeToColor.B / 255.0f, fProgress ) * 255.0f );
37
38 return &a_rColor;
39}
◆ GetFadeOverEmitter()
Toshi::TEmitter< AFade, TBOOL > & AFade::GetFadeOverEmitter |
( |
| ) |
|
|
inline |
Definition at line 59 of file AFade.h.
60 {
61 return m_FadeOverEmitter;
62 }
◆ GetRectangleElement()
Definition at line 54 of file AFade.h.
55 {
56 return m_Overlay;
57 }
◆ IsStillFading()
TBOOL AFade::IsStillFading |
( |
TBOOL | a_bThrowFadeOver | ) |
|
Definition at line 41 of file AFade.cpp.
42{
43 if ( m_fFadeTime <= m_fCurrentTime )
44 {
45 if ( a_bThrowFadeOver )
46 {
47 m_FadeOverEmitter.Throw(
TFALSE );
48 }
49
51 }
52
54}
◆ SetFadeFromColor()
void AFade::SetFadeFromColor |
( |
const Color & | a_rFadeFromColor | ) |
|
Definition at line 20 of file AFade.cpp.
21{
22 m_FadeFromColor = a_rFadeFromColor;
23}
◆ SetFadeTime()
void AFade::SetFadeTime |
( |
TFLOAT | a_fFadeTime | ) |
|
Definition at line 15 of file AFade.cpp.
16{
17 m_fFadeTime = a_fFadeTime;
18}
◆ SetFadeToColor()
void AFade::SetFadeToColor |
( |
const Color & | a_rFadeToColor | ) |
|
Definition at line 25 of file AFade.cpp.
26{
27 m_FadeToColor = a_rFadeToColor;
28}
◆ Update()
void AFade::Update |
( |
TFLOAT | a_fDeltaTime | ) |
|
|
inline |
Definition at line 42 of file AFade.h.
43 {
44 m_fCurrentTime += a_fDeltaTime;
45 }
◆ AFadeManager
The documentation for this class was generated from the following files:
- D:/_dev/OpenBarnyard/Source/OpenBarnyard/Source/GUI/AFade.h
- D:/_dev/OpenBarnyard/Source/OpenBarnyard/Source/GUI/AFade.cpp