Andreas Garmannslund / Mbed 2 deprecated SimplePlatformGame

Dependencies:   N5110 PinDetect PowerControl mbed

Embed: (wiki syntax)

« Back to documentation index

SubmitHighscore Class Reference

SubmitHighscore Class Reference

State: Submit Highscore Displays a screen where the user is promted to input his or her initials. More...

#include <SubmitHighscore.h>

Inherits State.

Public Member Functions

virtual void update (float dt)
 Update logic.
virtual void render ()
 Draw to screen.

Protected Member Functions

template<size_t rows, size_t cols>
void drawImage (const int(&img)[rows][cols], int x=0, int y=0, bool inverse=false, bool flipX=false, bool flipY=false)
 Draws an image to the lcd.

Detailed Description

State: Submit Highscore Displays a screen where the user is promted to input his or her initials.

Definition at line 14 of file SubmitHighscore.h.


Member Function Documentation

void drawImage ( const int(&)  img[rows][cols],
int  x = 0,
int  y = 0,
bool  inverse = false,
bool  flipX = false,
bool  flipY = false 
) [protected, inherited]

Draws an image to the lcd.

Parameters:
imgArray with the same size as the display, where 1 is opaque, 0 is blank. Draws an image/sprite to the lcd Only the solid pixels are drawn. If two images overlap, the second image drawn will not clear pixels which are solid in the first image.
imgconst int array where a solid pixel equals 1, and a blank pixel equals zero
xHorizontal position of image (leftmost pixel)
yVertical position of image (uppermost pixel)
Inversesimages. Default value is false See seperate program for how this array can be generated from an image file using SFML!

Definition at line 75 of file State.h.

void render (  ) [virtual]

Draw to screen.

Implements State.

Definition at line 134 of file SubmitHighscore.cpp.

void update ( float  dt ) [virtual]

Update logic.

Implements State.

Definition at line 87 of file SubmitHighscore.cpp.