Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629016
fadetool.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
fadetool.h
View Options
#ifndef gui_fadetool_h
#define gui_fadetool_h
#include
"r-tech1/graphics/bitmap.h"
/*! Fade utility */
namespace
Graphics
{
class
Bitmap
;
}
class
Token
;
namespace
Gui
{
class
FadeTool
{
public
:
FadeTool
();
virtual
~
FadeTool
();
enum
State
{
FadeIn
,
FadeOut
,
NoFade
,
EndFade
,
};
//! Read info from Token
void
parseDefaults
(
const
Token
*
);
// Fade state
void
setState
(
const
State
&
);
// update
void
act
();
// Fade to whatever state it is at
virtual
void
draw
(
const
Graphics
::
Bitmap
&
);
inline
const
State
&
getState
()
const
{
return
currentState
;
}
inline
void
setFadeInTime
(
const
int
time
){
fadeInTime
=
time
;
}
inline
void
setFadeOutTime
(
const
int
time
){
fadeOutTime
=
time
;
}
inline
int
getFadeInTime
()
const
{
return
fadeInTime
;
}
inline
int
getFadeOutTime
()
const
{
return
fadeOutTime
;
}
inline
void
setFadeInColor
(
Graphics
::
Color
c
){
fadeInColor
=
c
;
}
inline
Graphics
::
Color
getFadeInColor
()
const
{
return
fadeInColor
;
}
inline
void
setFadeOutColor
(
Graphics
::
Color
c
){
fadeOutColor
=
c
;
}
inline
Graphics
::
Color
getFadeOutColor
()
const
{
return
fadeOutColor
;
}
protected
:
//! Read fade from Token
void
readFade
(
const
Token
*
,
const
State
&
);
State
currentState
;
State
lastState
;
int
fadeTime
;
int
fadeInTime
;
int
fadeOutTime
;
Graphics
::
Color
fadeInColor
;
Graphics
::
Color
fadeOutColor
;
};
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 5:43 AM (4 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
147862
Default Alt Text
fadetool.h (1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline