i can´t load the sytle with lemur
this is my code
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.renderer.RenderManager;
import com.jme3.system.AppSettings;
import com.simsilica.lemur.Button;
import com.simsilica.lemur.Command;
import com.simsilica.lemur.Container;
import com.simsilica.lemur.GuiGlobals;
import com.simsilica.lemur.Label;
import com.simsilica.lemur.TextField;
import com.simsilica.lemur.PasswordField;
import com.simsilica.lemur.style.BaseStyles;
/**
* This is the Main Class of your Game. You should only do initialization here.
* Move your Logic into AppStates or Controls
* @author normenhansen
*/
public class Main extends SimpleApplication {
private GameRunningState gameRunningState;
private StartScreenState startScreenState;
private ServerScreenState server;
private CharactersScreenState charctersstate;
private SettingsScreenState settings;
public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setTitle("Cats Rockets");
settings.setResolution(1024, 800);
// settings.setUseJoysticks(true);
Main app = new Main();
app.setSettings(settings);
app.setShowSettings(false);
app.setDisplayStatView(false);
app.setDisplayFps(false);
app.start();
}
@Override
public void simpleInitApp() {
GuiGlobals.initialize(this);
startScreenState = new StartScreenState();
settings = new SettingsScreenState();
server = new ServerScreenState();
charctersstate = new CharactersScreenState();
gameRunningState = new GameRunningState();
stateManager.attach(startScreenState);
// Load the 'glass' style
BaseStyles.loadGlassStyle();
// Set 'glass' as the default style when not specified
GuiGlobals.getInstance().getStyles().setDefaultStyle("glass");
// Create a simple container for our elements
Container myWindow = new Container();
guiNode.attachChild(myWindow);
// Put it somewhere that we will see it
// Note: Lemur GUI elements grow down from the upper left corner.
myWindow.setLocalTranslation(400, 400, 0);
// Add some elements
myWindow.addChild(new Label("Username"));
myWindow.addChild(new TextField(""));
myWindow.addChild(new Label("Password"));
myWindow.addChild(new PasswordField(""));
Button clickMe = myWindow.addChild(new Button("Login"));
clickMe.addClickCommands(new Command<Button>() {
@Override
public void execute( Button source ) {
stateManager.detach(startScreenState); // Remove Yellow
stateManager.attach(server);
}
});
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}
an i have this error
run:
fev 20, 2017 6:52:07 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-stable
- Branch: HEAD
- Git Hash: af04bf9
- Build Date: 2017-02-19
fev 20, 2017 6:52:07 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 2.9.3 context running on thread jME3 Main - Graphics Adapter: C:\windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_02838dee03d82b94\nvd3dumx,C:\windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_02838dee03d82b94\nvwgf2umx,C:\windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_02838dee03d82b94\nvwgf2umx,C:\windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_02838dee03d82b94\nvwgf2umx
- Driver Version: 21.21.13.7849
- Scaling Factor: 1
fev 20, 2017 6:52:07 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information - Vendor: NVIDIA Corporation
- Renderer: GeForce GT 640/PCIe/SSE2
- OpenGL Version: 4.5.0 NVIDIA 378.49
- GLSL Version: 4.50 NVIDIA
- Profile: Compatibility
fev 20, 2017 6:52:07 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
fev 20, 2017 6:52:08 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information - Device: OpenAL Soft
- Vendor: OpenAL Community
- Renderer: OpenAL Soft
- Version: 1.1 ALSOFT 1.15.1
- Supported channels: 64
- ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
- AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
fev 20, 2017 6:52:08 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
fev 20, 2017 6:52:08 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
fev 20, 2017 6:52:08 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
[jME3 Main] INFO com.simsilica.lemur.GuiGlobals - Initializing GuiGlobals with:com.simsilica.lemur.GuiGlobals@7866f160
[jME3 Main] INFO com.simsilica.lemur.GuiGlobals - Lemur build date:20170212
[jME3 Main] INFO com.simsilica.lemur.style.BaseStyles - loadStyleResource(com/simsilica/lemur/style/base/glass-styles.groovy)
fev 20, 2017 6:52:08 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.RuntimeException: Groovy scripting engine not available.
at com.simsilica.lemur.style.StyleLoader.(StyleLoader.java:75)
at com.simsilica.lemur.style.StyleLoader.(StyleLoader.java:62)
at com.simsilica.lemur.style.BaseStyles.loadStyleResources(BaseStyles.java:72)
at com.simsilica.lemur.style.BaseStyles.loadGlassStyle(BaseStyles.java:62)
at mygame.Main.simpleInitApp(Main.java:52)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:745)
C:\Users\Pedro\AppData\Roaming.jmonkeyplatform\3.1.0-stable-FINAL\var\cache\executor-snippets\run.xml:53: Java returned: -1073740791
BUILD FAILED (total time: 12 seconds)