Example usage for com.badlogic.gdx.scenes.scene2d Touchable childrenOnly

List of usage examples for com.badlogic.gdx.scenes.scene2d Touchable childrenOnly

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d Touchable childrenOnly.

Prototype

Touchable childrenOnly

To view the source code for com.badlogic.gdx.scenes.scene2d Touchable childrenOnly.

Click Source Link

Document

No touch input events will be received by the actor, but children will still receive events.

Usage

From source file:com.crashinvaders.common.scene2d.HorizontalGroupExtended.java

License:Apache License

public HorizontalGroupExtended() {
    setTouchable(Touchable.childrenOnly);
}

From source file:com.jmolina.orb.widgets.ui.MultiOption.java

License:Open Source License

/**
 * Constructor//from   ww w  .  j  ava  2 s.c o  m
 *
 * @param am AssetManager
 * @param name Nombre de la opcion
 */
public MultiOption(AssetManager am, String name) {
    super(am);

    Label.LabelStyle style = new Label.LabelStyle();
    style.fontColor = new Color(Var.COLOR_LILAC_DARK);
    style.font = new BitmapFont(Gdx.files.internal(Font.FONT_ROBOTO_MEDIUM_45),
            findRegion(Atlas.FONT_ROBOTO_MEDIUM_45));

    label = new Label(name, style);
    label.setTouchable(Touchable.disabled);
    label.setPosition(0f, 0f);
    label.setHeight(Utils.cell(1.5f));

    checkboxes = new ArrayList<Checkbox>();
    for (int i = 0; i < OPTIONS; i++) {
        checkboxes.add(new Checkbox(getAssetManager(), false));
        checkboxes.get(i).setPositionGrid(5.5f + i * 1.5f, 0);
        checkboxes.get(i).setName(String.valueOf(i));
    }

    lever = new Image(getAsset(Asset.UI_MULTICHECK_1, Texture.class));
    lever.setTouchable(Touchable.disabled);
    lever.setSize(Utils.cell(4.5f), Utils.cell(1.5f));
    lever.setPosition(Utils.cell(5.5f), Utils.cell(0));

    addActor(label);
    for (Actor actor : checkboxes)
        addActor(actor);
    addActor(lever);

    setHeight(Utils.cell(1.5f));
    setTouchable(Touchable.childrenOnly);
    setValue(DEFAULT_VALUE);
}

From source file:com.jmolina.orb.widgets.ui.Option.java

License:Open Source License

/**
 * Constructor/*from   w  ww .  ja va 2  s  .  c o m*/
 *
 * @param am AssetManager
 * @param name Etiqueta
 * @param checked Estado
 */
public Option(AssetManager am, String name, boolean checked) {
    super(am);

    Label.LabelStyle style = new Label.LabelStyle();
    style.fontColor = new Color(Var.COLOR_LILAC_DARK);
    style.font = new BitmapFont(Gdx.files.internal(Font.FONT_ROBOTO_MEDIUM_45),
            findRegion(Atlas.FONT_ROBOTO_MEDIUM_45));

    label = new Label(name, style);
    label.setTouchable(Touchable.disabled);
    label.setPosition(0f, 0f);
    label.setHeight(Utils.cell(1.5f));

    checkbox = new Checkbox(getAssetManager(), checked);
    checkbox.setPosition(Utils.cell(8.5f), 0f);

    addActor(label);
    addActor(checkbox);
    setHeight(Utils.cell(1.5f));
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.editor.ui.HorizontalFlowGroup.java

License:Apache License

public HorizontalFlowGroup() {
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.ui.layout.ColumnGroup.java

License:Apache License

public ColumnGroup() {
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.ui.layout.FloatingGroup.java

License:Apache License

/**
 * Creates floating group without preferred sizes set. Group size should be controlled by parent, note that
 * most group relies on correctness of preferred width and height so not all groups can be applied.
 * <p>//from  w w  w  .  j  a  v a 2  s  . c  om
 * This can be useful for adding group to {@link Table}. For example: add(floatingGroup).grow() to fill all available
 * space.
 */
public FloatingGroup() {
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.ui.layout.FloatingGroup.java

License:Apache License

/**
 * Creates floating group with fixed area size.
 * @param prefHeight preferred height of group. If set to to lower than 0 then {@link #getHeight()} is used as preferred height.
 * @param prefWidth preferred width of group. If set to to lower than 0 then {@link #getWidth()} is used as preferred width.
 *//*from  ww w. j  ava2s  .c o m*/
public FloatingGroup(float prefWidth, float prefHeight) {
    setTouchable(Touchable.childrenOnly);
    setPrefWidth(prefWidth);
    setPrefHeight(prefHeight);
}

From source file:com.kotcrab.vis.ui.layout.GridGroup.java

License:Apache License

public GridGroup() {
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.ui.layout.GridGroup.java

License:Apache License

public GridGroup(float itemSize) {
    this.itemWidth = itemSize;
    this.itemHeight = itemSize;
    setTouchable(Touchable.childrenOnly);
}

From source file:com.kotcrab.vis.ui.layout.GridGroup.java

License:Apache License

public GridGroup(float itemSize, float spacing) {
    this.spacing = spacing;
    this.itemWidth = itemSize;
    this.itemHeight = itemSize;
    setTouchable(Touchable.childrenOnly);
}