supertux
Public Types | Public Member Functions | List of all members
FadeToBlack Class Referencefinal

Fades a screen towards a specific color. More...

#include <fadetoblack.hpp>

Inheritance diagram for FadeToBlack:
Inheritance graph
[legend]
Collaboration diagram for FadeToBlack:
Collaboration graph
[legend]

Public Types

enum  Direction { FADEOUT, FADEIN }
 
- Public Types inherited from ScreenFade
enum  FadeType { NONE, FADE, CIRCLE }
 

Public Member Functions

 FadeToBlack (Direction direction, float fade_time, Color dest_color=Color(0, 0, 0))
 
virtual void update (float dt_sec) override
 gets called for once (per logical) frame. More...
 
virtual void draw (DrawingContext &context) override
 gets called once per frame. More...
 
virtual bool done () const override
 returns true if the effect is completed
 

Detailed Description

Fades a screen towards a specific color.

Member Function Documentation

◆ draw()

void FadeToBlack::draw ( DrawingContext context)
overridevirtual

gets called once per frame.

The ScreenFade should draw itself in this function. State changes should not be done in this function, but rather in update

Implements ScreenFade.

◆ update()

void FadeToBlack::update ( float  dt_sec)
overridevirtual

gets called for once (per logical) frame.

ScreenFades should do their state updates and logic here

Implements ScreenFade.


The documentation for this class was generated from the following files: