Package de.lessvoid.nifty

Examples of de.lessvoid.nifty.Nifty$NiftyInputConsumerImpl


   */
  public NiftyGameState(final int slickGameStateId) {
    this.id = slickGameStateId;

    SlickCallable.enterSafeBlock();
    this.nifty = new Nifty(
        new SlickRenderDevice(container),
        new SlickSoundDevice(),
        new InputSystem() {
          public void forwardEvents(final NiftyInputConsumer inputEventConsumer) {
            for (MouseEvent event : mouseEvents) {
View Full Code Here


    return title;
  }

  @Override
  public void init(GameContainer container) throws SlickException {
    nifty = new Nifty(new SlickRenderDevice(container), new SlickSoundDevice(), new InputSystem() {
      public void forwardEvents(final NiftyInputConsumer inputEventConsumer) {
        for (MouseEvent event : mouseEvents) {
          event.processMouseEvents(inputEventConsumer);
        }
        mouseEvents.clear();
View Full Code Here

    if (!LwjglInitHelper.initSubSystems("Nifty Controls Demonstation")) {
      System.exit(0);
    }

    // create Nifty and load default styles and controls
    Nifty nifty = new Nifty(new LwjglRenderDevice(), new OpenALSoundDevice(), LwjglInitHelper.getInputSystem(), new TimeProvider());
    nifty.loadStyleFile("nifty-default-styles.xml");
    nifty.loadControlFile("nifty-default-controls.xml");
    nifty.registerSound("intro", "sound/19546__tobi123__Gong_mf2.wav");
    nifty.registerMusic("credits", "sound/Loveshadow_-_Almost_Given_Up.ogg");
    nifty.registerMouseCursor("hand", "mouse-cursor-hand.png", 5, 4);
    registerMenuButtonHintStyle(nifty);
    registerStyles(nifty);
    registerConsolePopup(nifty);
    registerCreditsPopup(nifty);

    // register some helper controls
    MenuButtonControlDefinition.register(nifty);
    DialogPanelControlDefinition.register(nifty);

    // register the dialog controls
    ListBoxDialogControlDefinition.register(nifty);
    DropDownDialogControlDefinition.register(nifty);
    ScrollPanelDialogControlDefinition.register(nifty);
    ChatControlDialogDefinition.register(nifty);
    TextFieldDialogControlDefinition.register(nifty);
    SliderAndScrollbarDialogControlDefinition.register(nifty);
    DragAndDropDialogDefinition.register(nifty);

    createIntroScreen(nifty);
    createDemoScreen(nifty);
    nifty.gotoScreen("start");

    // start the render loop
    LwjglInitHelper.renderLoop(nifty, null);
    LwjglInitHelper.destroy();
  }
View Full Code Here

    StateManager.init();
    StateManager.push((State) (new Intro()));

    // create new Nifty userinterface
    nifty = new Nifty(
      new LwjglRenderDevice(false),
      new NullSoundDevice(),
      new NullInputSystem(),
      new LWJGLTimeProvider());
   
View Full Code Here

    GlobalObjectStore.registerObject(objectController = new ObjectController(gameApp), IObjectController.class, ObjectController.class);
    aiCtrl = new AIController(gameApp);
    logicCallbacksCtrl = new LogicThreadCtrl(gameApp, GlobalObjectStore.<Timer>getObject(Timer.class));

    // Nifty: Hud, Usermenu, etc...
    Nifty nifty = niftyDisplay.getNifty();
    nifty.setGlobalProperties(ResourceConstants.getUserProperties());
    nifty.fromXml("hud/onBoardUI.xml", "onBoard");
    ((OnBoardUIController) nifty.getScreen("onBoard").getScreenController()).initialize();

    // datamodel laden
    // int sectorID = userData.getSectorId();
    Sector sector = null;
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.Nifty$NiftyInputConsumerImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.