Examples of LabelComponent


Examples of com.sertaogames.cactus2d.components.LabelComponent

    sound.play();
    createTip();
  }

  private void createTip() {
    messageLabel = new LabelComponent(message);
    messageLabel.setFontName(TerremotoApplication.fontName);
    tip = GameObjectsFactory.createTip(messageLabel, nextState);
    GameControllerComponent.tipGameObject = tip;
    gameObject.parent.addGameObject(tip);
  }
View Full Code Here

Examples of com.sertaogames.cactus2d.components.LabelComponent

    subGameObject.AddComponent(new ButtonComponent(tmp[0][2], tmp[0][3]));
    subGameObject.AddComponent(new AudioComponent("data/sound/click.wav"));
    subGameObject.AddComponent(new PauseComponent());
    gui.addGameObject(subGameObject);
   
    LabelComponent label = null;
    GameObject time = new GameObject("Time");
    label = new LabelComponent(" ");
    time.transform.getLocalPosition().add(100* Cactus2DApplication.invCameraZoom, 80* Cactus2DApplication.invCameraZoom);
    label.setFontName(TerremotoApplication.fontName);
    time.AddComponent(label);
    time.AddComponent(new SpriteRendererComponent(null));
    time.spriteRenderer.gui = true;
    gui.addGameObject(time);
   
    GameObject points = new GameObject("Points");
    label = new LabelComponent(" ");
    points.transform.getLocalPosition().add(300* Cactus2DApplication.invCameraZoom, 80* Cactus2DApplication.invCameraZoom);
    label.setFontName(TerremotoApplication.fontName);
    points.AddComponent(label);
    points.AddComponent(new SpriteRendererComponent(null));
    points.spriteRenderer.gui = true;
    gui.addGameObject(points);
   
View Full Code Here

Examples of org.spout.api.component.widget.LabelComponent

        backgroundRect.setSprite(new Rectangle(-WIDTH * SCALE, -WIDTH, HEIGHT * 2 * SCALE, HEIGHT * 2));
        backgroundRect.setSource(new Rectangle(0, 0, WIDTH, HEIGHT));
        popup.attachWidget(plugin, background);

        // Draw title
        LabelComponent labelComponent = label.add(LabelComponent.class);
        labelComponent.setFont(VanillaRenderMaterials.FONT);
        labelComponent.setText(ChatStyle.GRAY + title);
        label.getTransform().add(0, 0.45f);
        popup.attachWidget(plugin, label);

        for (InventoryConverter converter : converters) {
          for (Widget widget : converter.getWidgets()) {
View Full Code Here

Examples of org.spout.api.component.widget.LabelComponent

  private final RenderPartPack expPack = new RenderPartPack(VanillaRenderMaterials.ICONS_MATERIAL);

  @Override
  public void init(Widget exp, HUD hud) {
    super.init(exp, hud);
    final LabelComponent lvlTxt = widget.add(LabelComponent.class);
    widget.getTransform().add(-0.02f, -0.79f);
    lvlTxt.setFont(VanillaRenderMaterials.FONT);
    lvlTxt.setText(ChatStyle.GREEN + "50");

    // Setup survival-specific hud components
    boolean survival = true;
    if (survival) {
      // Experience bar
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.