|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.geometry.hud.SplashScreen
SplashScreen
creates a screen encompassing splash screen to
be displayed. This is typically used for title screens, and company logos.
The class contains a holdDisplay
method to allow the screen
to be displayed for a set amount of time.
Constructor Summary | |
SplashScreen()
Constructor instantiates a new SplashScreen object. |
Method Summary | |
void |
holdDisplay()
holdDisplay will display the splash screen for the desired
amount of time define by setDelay . |
void |
render()
render display the splash screen to the display view. |
void |
setBlended(boolean value)
setBlended turns blending (using the alpha value of
the color) on and off. |
void |
setColor(float red,
float green,
float blue,
float alpha)
setColor sets the color to shade the splashscreen. |
void |
setDelay(long delay)
setDelay sets how long to display the splash screen
in milliseconds. |
void |
setPosition(float x,
float y)
setPosition sets the bottom left corner of the
splash screen display. |
void |
setSize(float height,
float width)
setSize sets the size of the splash. |
void |
setTexture(java.lang.String filename)
setTexture sets the image to display as the splash. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SplashScreen()
SplashScreen
object.
MonkeyGLException
- if this class is used before initializing
the OpenGL context.Method Detail |
public void setTexture(java.lang.String filename)
setTexture
sets the image to display as the splash.
filename
- the image for the splash screen.public void setColor(float red, float green, float blue, float alpha)
setColor
sets the color to shade the splashscreen.
red
- the red component of the color.green
- the green component of the color.blue
- the blue component of the color.alpha
- the alpha component of the color.public void setPosition(float x, float y)
setPosition
sets the bottom left corner of the
splash screen display. Default is (0,0).
x
- the x coordinate of the bottom left corner.y
- the y coordinate of the bottom left corner.public void setSize(float height, float width)
setSize
sets the size of the splash. This will
"grow" from the position of the bottom left corner which can
be set via setPosition
.
height
- the height of the splash.width
- the width of the splash.
MonkeyRuntimeException
- if height or width is negative.public void setBlended(boolean value)
setBlended
turns blending (using the alpha value of
the color) on and off.
value
- true if blending is on, false otherwise.public void setDelay(long delay)
setDelay
sets how long to display the splash screen
in milliseconds.
delay
- the amount of time to display the screen (in milliseconds).public void holdDisplay()
holdDisplay
will display the splash screen for the desired
amount of time define by setDelay
.
public void render()
render
display the splash screen to the display view.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |