screen
The Screen Class
You can create a screen using one of the two provided constructors as shown in the Quick Start Guide.
// this = any JME Application
Screen screen = new Screen(this);
guiNode.addControl(screen);
Optionally, you can provide a path to a custom Style theme:
// this = any JME Application
Screen screen = new Screen(this, "tonegod/gui/style/def/style_map.xml");
guiNode.addControl(screen);
To make use of custom cursors, call this method prior to initializing the screen:
screen.setUseCustomCursors(true);
You can disable and re-enable custom cursors at any point, but they must be initialized with the screen to be loaded.
Cursor Effects can be enabled/disabled at anytime by calling:
screen.setUseCursorEffects(boolean useCursorEffects);
Tool Tips can be enabled/disabled at anytime by calling:
screen.setUseToolTips(boolean useToolTips);
Audio can be enabled/disabled at anytime by calling:
screen.setUseUIAudio(boolean useUIAudio);
Application quick references methods:
screen.getApplication();
// Screen dimensions
screen.getWidth();
screen.getHeight();
// Mouse position
screen.getMouseXY(); // returns a Vector2f containing current mouse x/y
Methods for adding remove base level controls:
screen.addElement(Element element);
screen.removeElement(Element element);
Custom Cursor Related Methods:
screen.setCursor(Screen.CursorType cur); // called by controls
screen.setForcedCursor(Screen.CursorType cur); // Overrides control manipulation of cursor.
screen.releaseForcedCursor(); // Release cursor manipulation back to controls