Package de.lessvoid.nifty.loaderv2.types

Examples of de.lessvoid.nifty.loaderv2.types.ElementType


  }

  public void registerEffect(final String name, final String classParam) {
    try {
      NiftyType niftyType = new NiftyType();
      RegisterEffectType registerEffect = new RegisterEffectType(name, classParam);
      niftyType.addRegisterEffect(registerEffect);
      niftyType.create(this, getTimeProvider());
      if (log.isLoggable(Level.INFO)) {
        log.info("registerEffect");
        log.info(niftyType.output());
View Full Code Here


    NiftyJmeDisplay niftyDisplay = new NiftyJmeDisplay(assetManager,
        inputManager, audioRenderer, guiViewPort);
    nifty = niftyDisplay.getNifty();
    nifty.setGlobalProperties(ResourceConstants.getUserProperties());
    nifty.registerEffect(new RegisterEffectType("spriteSwitch",
        "net.cis.client.game.ui.effects.SpriteSwitch"));
    nifty.registerEffect(new RegisterEffectType("showHide",
        "net.cis.client.game.ui.effects.ShowHide"));
    nifty.fromXml("hud/onBoardUISimple.xml", "onBoard");

    guiViewPort.addProcessor(niftyDisplay);
    inputManager.setCursorVisible(true);
View Full Code Here

  }

  public void registerMusic(final String id, final String filename) {
    try {
      NiftyType niftyType = new NiftyType();
      RegisterMusicType registerMusic = new RegisterMusicType();
      registerMusic.getAttributes().set("id", id);
      registerMusic.getAttributes().set("filename", filename);
      niftyType.addRegisterMusic(registerMusic);
      niftyType.create(this, getTimeProvider());
      if (log.isLoggable(Level.INFO)) {
        log.info("registerMusic");
        log.info(niftyType.output());
View Full Code Here

  }

  public void registerSound(final String id, final String filename) {
    try {
      NiftyType niftyType = new NiftyType();
      RegisterSoundType registerSound = new RegisterSoundType();
      registerSound.getAttributes().set("id", id);
      registerSound.getAttributes().set("filename", filename);
      niftyType.addRegisterSound(registerSound);
      niftyType.create(this, getTimeProvider());
      if (log.isLoggable(Level.INFO)) {
        log.info("registerSound");
        log.info(niftyType.output());
View Full Code Here

  }

  public void registerResourceBundle(final String id, final String filename) {
    try {
      NiftyType niftyType = new NiftyType();
      ResourceBundleType resourceBundle = new ResourceBundleType();
      resourceBundle.getAttributes().set("id", id);
      resourceBundle.getAttributes().set("filename", filename);
      niftyType.addResourceBundle(resourceBundle);
      niftyType.create(this, getTimeProvider());
      if (log.isLoggable(Level.INFO)) {
        log.info("registerResourceBundle");
        log.info(niftyType.output());
View Full Code Here

      e.setInteract(interact.create());
    }
  }

  public StyleType createStyleType(final Attributes styleAttributes) {
    StyleType styleType = new StyleType(styleAttributes);
    if (attributes != null) {
      styleType.setAttributes(new AttributesType(attributes));
    }
    if (effects != null) {
      styleType.setEffect(effects.create());
    }
    if (interact != null) {
      styleType.setInteract(interact.create());
    }
    return styleType;
  }
View Full Code Here

  }

  public void build(final Nifty nifty) {
    connectAttributes();

    StyleType style = attributes.createStyleType(styleAttributes);
    nifty.registerStyle(style);
  }
View Full Code Here

  protected Element createText(
      final Nifty nifty,
      final Screen screen,
      final Element parent) {
    TextType textType = new TextType(attributes);
    return buildControl(nifty, screen, parent, textType, new LayoutPart());
  }
View Full Code Here

    return parent.findElementByName(attributes.get("id"));
  }

  @Override
  public ElementType createType() {
    return new TextType(attributes);
  }
View Full Code Here

    this.layoutManager = convert.layoutManager(attributes.get("childLayout"));
    this.focusable = attributes.getAsBoolean("focusable", Convert.DEFAULT_FOCUSABLE);
    this.focusableInsertBeforeElementId = attributes.get("focusableInsertBeforeElementId");
    for (int i=0; i<elementRenderer.length; i++) {
      ElementRenderer renderer = elementRenderer[i];
      ApplyRenderer rendererApply = rendererApplier.get(renderer.getClass());
      rendererApply.apply(this, attributes, renderEngine);
    }
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.loaderv2.types.ElementType

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.