本文整理汇总了Java中de.lessvoid.nifty.Nifty.getScreen方法的典型用法代码示例。如果您正苦于以下问题:Java Nifty.getScreen方法的具体用法?Java Nifty.getScreen怎么用?Java Nifty.getScreen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.lessvoid.nifty.Nifty
的用法示例。
在下文中一共展示了Nifty.getScreen方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setNifty
import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
void setNifty(final Nifty nifty) {
this.nifty = nifty;
if (Globals.replayMode) {
return;
}
DeathMatchHeroSelectionLayerBuilder layerBuilder
= new DeathMatchHeroSelectionLayerBuilder();
Screen screen = nifty.getScreen("default_hud");
heroSelectionLayer = layerBuilder
.build(nifty, screen, screen.getRootElement());
heroSelectionLayer.hideWithoutEffect();
DeathMatchHeroSelectionLayerController control = heroSelectionLayer
.getControl(DeathMatchHeroSelectionLayerController.class);
control.setStateManager(states);
}
示例2: setNifty
import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
public void setNifty(Nifty nifty) {
this.nifty = nifty;
screen = nifty.getScreen("default_hud");
spellBar.setNifty(nifty);
spellBar.setScreen(screen);
statistics.setNifty(nifty);
statistics.setScreen(screen);
hudMenu.initialize(nifty, screen);
Globals.app.getInputManager().addListener(hudMenu,
InputMapping.HUD_TOGGLE_MENU);
// Globals.app.getInputManager().addListener(debug,
// InputMapping.CHANGE_MAT);
}
示例3: setNifty
import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
public void setNifty(Nifty nifty) {
this.nifty = nifty;
common.setNifty(nifty);
screen = nifty.getScreen("default_hud");
}
示例4: initialize
import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
public void initialize(Nifty nifty) {
this.nifty = nifty;
screen = nifty.getScreen("default_hud");
root = screen.findElementById("messages");
}
示例5: initializeNifty
import de.lessvoid.nifty.Nifty; //导入方法依赖的package包/类
private void initializeNifty() throws PromiseException
{
inputSystem = new LwjglInputSystem();
try
{
inputSystem.startup();
}
catch (Exception ex)
{
throw new Error(ex);
}
nifty = new Nifty(new LwjglRenderDevice(), new NullSoundDevice(), inputSystem, new AccurateTimeProvider());
NiftyResourceLoader niftyResourceLoader = nifty.getResourceLoader();
niftyResourceLoader.removeAllResourceLocations();
// nifty first tries stuff on the class path (needed for its internal files)
niftyResourceLoader.addResourceLocation(new ClasspathLocation());
// Then try the same reference as a resource key
// (add this second so that zones can not override nifty build-ins)
niftyResourceLoader.addResourceLocation(new DBNiftyResourceLocation(resourceDB));
TriggerOnShowEffect.registerEffect(nifty);
SpriteAnimationEffect.registerEffect(nifty);
BackgroundColorSpriteEffect.registerEffect(nifty);
BackgroundColorAnimated.registerEffect(nifty);
ClockTextEffect.registerEffect(nifty);
niftyCameraImpl = new NiftyCameraImpl(resourceDB, mapEntities, mapClassic, stars);
CameraNiftyController.registerControl(nifty, niftyCameraImpl);
boolean first = true;
/*{
Logger logger = Logger.getLogger("de.lessvoid.nifty");
logger.setLevel(Level.FINER);
ConsoleHandler handler = new ConsoleHandler();
handler.setLevel(Level.FINER);
logger.addHandler(handler);
}*/
for (String res : networkedGame.niftyGuiResources)
{
if (first)
{
nifty.fromXmlWithoutStartScreen(res);
first = false;
}
else
{
nifty.addXml(res);
}
}
mainScreen = nifty.getScreen("aphelion-main");
if (mainScreen == null)
{
throw new PromiseException("Missing nifty-gui screen: aphelion-main");
}
ScreenController screenControl = mainScreen.getScreenController();
if (screenControl instanceof MainScreenController)
{
((MainScreenController) screenControl).aphelionBind(networkedGame);
}
nifty.gotoScreen("aphelion-main");
}