public final class Config extends Object
Sequence
)true
for windowed, false
for
fullscreen)Example:
final Resolution output = new Resolution(640, 480, 60); final Config config = new Config(output, 16, true);
Resolution
,
Ratio
Constructor and Description |
---|
Config(Resolution output,
int depth,
boolean windowed)
Create a configuration.
|
Config(Resolution output,
int depth,
boolean windowed,
Media icon)
Create a configuration.
|
Modifier and Type | Method and Description |
---|---|
static Config |
fullscreen(Resolution output)
Create a 32 bits color depth and fullscreen configuration using output resolution.
|
<A extends Applet<A>> |
getApplet(Class<A> appletClass)
Get applet reference.
|
int |
getDepth()
Get the display depth.
|
Media |
getIcon()
Get the application icon.
|
Resolution |
getOutput()
Get the resolution output.
|
Resolution |
getSource()
Get the resolution source.
|
boolean |
hasApplet()
Check if has applet.
|
boolean |
isWindowed()
Get the windowed mode.
|
void |
setApplet(Applet<?> applet)
Set applet reference, and enable applet mode.
|
void |
setSource(Resolution source)
Set the resolution source.
|
static Config |
windowed(Resolution output)
Create a 32 bits color depth and windowed configuration using output resolution.
|
public Config(Resolution output, int depth, boolean windowed)
output
- The output resolution (used on rendering).depth
- The screen color depth in bits (usually 16 or 32).windowed
- The windowed mode: true
for windowed, false
for fullscreen.LionEngineException
- If arguments are null
or invalid.public Config(Resolution output, int depth, boolean windowed, Media icon)
output
- The output resolution (used on rendering).depth
- The screen color depth in bits (usually 16 or 32).windowed
- The windowed mode: true
for windowed, false
for fullscreen.icon
- The icon media (can be null
if none).LionEngineException
- If arguments are null
or invalid.public static Config windowed(Resolution output)
output
- The output resolution (used on rendering).public static Config fullscreen(Resolution output)
output
- The output resolution (used on rendering).public void setApplet(Applet<?> applet)
applet
- The applet reference.public void setSource(Resolution source)
source
- The source resolution (native).LionEngineException
- If source is null
.public Resolution getSource()
public Resolution getOutput()
public <A extends Applet<A>> A getApplet(Class<A> appletClass)
A
- The applet type used.appletClass
- The applet class.public Media getIcon()
public int getDepth()
public boolean isWindowed()
true
if is windowed, false
else.public boolean hasApplet()
true
if has applet, false
else.Copyright © 2017 Byron 3D Games Studio. All rights reserved.