Modifier and Type | Field and Description |
---|---|
protected Config |
config
Configuration reference.
|
protected Map<Class<? extends InputDevice>,InputDevice> |
devices
Input devices.
|
protected Graphic |
graphics
Active graphic buffer reference.
|
protected Collection<ScreenListener> |
listeners
Screen listeners.
|
Modifier | Constructor and Description |
---|---|
protected |
ScreenBase(Config config,
long readyTimeout)
Create the screen.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ScreenListener listener)
Add a screen listener.
|
void |
awaitReady()
Wait until screen get ready.
|
Config |
getConfig()
Get the config.
|
Graphic |
getGraphic()
Get current graphic.
|
<T extends InputDevice> |
getInputDevice(Class<T> type)
Get the input device instance from its type.
|
long |
getReadyTimeOut()
Get the maximum time in milliseconds for screen to be ready.
|
void |
removeListener(ScreenListener listener)
Remove a screen listener.
|
void |
start()
Start the main frame if has.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addKeyListener, dispose, getX, getY, hideCursor, isReady, onSourceChanged, preUpdate, requestFocus, setIcon, showCursor, update
protected final Collection<ScreenListener> listeners
protected final Map<Class<? extends InputDevice>,InputDevice> devices
protected final Config config
protected final Graphic graphics
protected ScreenBase(Config config, long readyTimeout)
config
- The config reference.readyTimeout
- The time out before considering screen never ready.LionEngineException
- If null
config.public void start()
public final void awaitReady()
Screen
awaitReady
in interface Screen
public final void addListener(ScreenListener listener)
Screen
addListener
in interface Screen
listener
- The screen listener to add.public final void removeListener(ScreenListener listener)
Screen
removeListener
in interface Screen
listener
- The screen listener to remove.public final Graphic getGraphic()
Screen
getGraphic
in interface Screen
public final Config getConfig()
Context
public final <T extends InputDevice> T getInputDevice(Class<T> type)
Context
getInputDevice
in interface Context
T
- The input device.type
- The input device type.public final long getReadyTimeOut()
Screen
getReadyTimeOut
in interface Screen
Copyright © 2016 Byron 3D Games Studio. All rights reserved.