public class GuiEvent extends AbstractCinematicEvent
Modifier and Type | Field and Description |
---|---|
protected de.lessvoid.nifty.Nifty |
nifty
associated Nifty instance (not null)
|
protected java.lang.String |
screen
name of the associated Nifty screen(not null)
|
initialDuration, listeners, loopMode, playState, resuming, speed, time
Constructor and Description |
---|
GuiEvent()
No-argument constructor needed by SavableClassUtil.
|
GuiEvent(de.lessvoid.nifty.Nifty nifty,
java.lang.String screen)
Instantiate an event with the default initial duration (10) and mode
(DontLoop).
|
GuiEvent(de.lessvoid.nifty.Nifty nifty,
java.lang.String screen,
float initialDuration)
Instantiate an event the default mode (DontLoop).
|
GuiEvent(de.lessvoid.nifty.Nifty nifty,
java.lang.String screen,
float initialDuration,
LoopMode loopMode)
Instantiate an event with the specified initial duration and loop mode.
|
GuiEvent(de.lessvoid.nifty.Nifty nifty,
java.lang.String screen,
LoopMode loopMode)
Instantiate an event with the default initial duration (10).
|
Modifier and Type | Method and Description |
---|---|
void |
onPause()
Invoked when the event is paused.
|
void |
onPlay()
Invoked when the event is started.
|
void |
onStop()
Invoked when the event is stopped.
|
void |
onUpdate(float tpf)
Invoked once per frame, provided the event is playing.
|
void |
read(JmeImporter im)
De-serialize this event, for example when loading from a J3O file.
|
void |
setNifty(de.lessvoid.nifty.Nifty nifty)
Alter the Nifty instance for this event.
|
void |
setScreen(java.lang.String screen)
Alter the screen for this event.
|
void |
write(JmeExporter ex)
Serialize this event, for example when saving to a J3O file.
|
addListener, dispose, forceStop, getDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, getTime, initEvent, internalUpdate, pause, play, removeListener, setInitialDuration, setLoopMode, setSpeed, setTime, stop
protected java.lang.String screen
protected de.lessvoid.nifty.Nifty nifty
public GuiEvent()
public GuiEvent(de.lessvoid.nifty.Nifty nifty, java.lang.String screen)
nifty
- the Nifty instance (not null, alias created)screen
- the name of the Nifty screen (not null)public GuiEvent(de.lessvoid.nifty.Nifty nifty, java.lang.String screen, float initialDuration)
nifty
- the Nifty instance (not null, alias created)screen
- the name of the Nifty screen (not null)initialDuration
- the initial duration (in seconds, ≥0)public GuiEvent(de.lessvoid.nifty.Nifty nifty, java.lang.String screen, LoopMode loopMode)
nifty
- the Nifty instance (not null, alias created)screen
- the name of the Nifty screen (not null)loopMode
- the loop mode (not null)public GuiEvent(de.lessvoid.nifty.Nifty nifty, java.lang.String screen, float initialDuration, LoopMode loopMode)
nifty
- the Nifty instance (not null, alias created)screen
- the name of the Nifty screen (not null)initialDuration
- the initial duration (in seconds, ≥0)loopMode
- the loop mode (not null)public void onPlay()
onPlay
in class AbstractCinematicEvent
public void onStop()
onStop
in class AbstractCinematicEvent
public void onPause()
onPause
in class AbstractCinematicEvent
public void setNifty(de.lessvoid.nifty.Nifty nifty)
nifty
- the new instance (not null)public void setScreen(java.lang.String screen)
screen
- the name of the new screen (not null)public void onUpdate(float tpf)
onUpdate
in class AbstractCinematicEvent
tpf
- the time interval between frames (in seconds, ≥0)public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class AbstractCinematicEvent
ex
- exporter (not null)java.io.IOException
- from exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class AbstractCinematicEvent
im
- importer (not null)java.io.IOException
- from importer