Java Code Examples for com.badlogic.gdx.scenes.scene2d.Touchable#enabled()

The following examples show how to use com.badlogic.gdx.scenes.scene2d.Touchable#enabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 6 votes vote down vote up
public void reset() {
    name = null;
    alignment = Align.center;
    background = null;
    fillX = false;
    fillY = false;
    minWidth = -1;
    minHeight = -1;
    maxWidth = -1;
    maxHeight = -1;
    preferredWidth = -1;
    preferredHeight = -1;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    child = null;
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 2
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 6 votes vote down vote up
public void reset() {
    name = null;
    alignment = Align.center;
    expand = false;
    fill = false;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    reverse = false;
    rowAlignment = Align.center;
    space = 0;
    wrap = false;
    wrapSpace = 0;
    children.clear();
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 3
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 6 votes vote down vote up
public void reset() {
    name = null;
    alignment = Align.center;
    expand = false;
    fill = false;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    reverse = false;
    columnAlignment = Align.center;
    space = 0;
    wrap = false;
    wrapSpace = 0;
    touchable = Touchable.enabled;
    visible = true;
    children.clear();
}
 
Example 4
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 5 votes vote down vote up
public void reset() {
    cells.clear();
    name = null;
    background = null;
    color = null;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    paddingEnabled = false;
    alignment = Align.center;
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 5
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 5 votes vote down vote up
public void reset() {
    name = null;
    drawable = null;
    scaling  = Scaling.stretch;
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 6
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 5 votes vote down vote up
public void reset() {
    name = null;
    style = null;
    checked = false;
    disabled = false;
    color = null;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 7
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 5 votes vote down vote up
public void reset() {
    name = null;
    text = null;
    style = null;
    checked = false;
    disabled = false;
    color = null;
    padLeft = 0;
    padRight = 0;
    padTop = 0;
    padBottom = 0;
    touchable = Touchable.enabled;
    visible = true;
}
 
Example 8
Source File: BaseWidgetParser.java    From cocos-ui-libgdx with Apache License 2.0 5 votes vote down vote up
private Touchable deduceTouchable(Actor actor, ObjectData widget) {
    if (widget.isTouchEnable()) {
        return Touchable.enabled;
    } else if (Touchable.childrenOnly.equals(actor.getTouchable())) {
        return Touchable.childrenOnly;
    } else {
        return Touchable.disabled;
    }
}
 
Example 9
Source File: BeltGrid.java    From riiablo with Apache License 2.0 5 votes vote down vote up
private void updateItems(boolean hidden) {
  Touchable touchable = hidden ? Touchable.disabled : Touchable.enabled;
  SnapshotArray<Actor> snapshot = getChildren();
  Actor[] children = snapshot.begin();
  for (Actor child : children) {
    StoredItem item = (StoredItem) child;
    if (item == null) continue;
    if (item.getY() >= boxHeight) item.setTouchable(touchable);
  }
  snapshot.end();
}
 
Example 10
Source File: ScrollPane.java    From riiablo with Apache License 2.0 5 votes vote down vote up
public Actor hit (float x, float y, boolean touchable) {
	if (x < 0 || x >= getWidth() || y < 0 || y >= getHeight()) return null;
	if (touchable && getTouchable() == Touchable.enabled && isVisible()) {
		if (scrollX && touchScrollH && hScrollBounds.contains(x, y)) return this;
		if (scrollY && touchScrollV && vScrollBounds.contains(x, y)) return this;
	}
	return super.hit(x, y, touchable);
}
 
Example 11
Source File: DialogSceneComposerModel.java    From skin-composer with MIT License 4 votes vote down vote up
public void reset() {
    name = null;
    touchable = Touchable.enabled;
    visible = true;
    children.clear();
}
 
Example 12
Source File: StringSpin.java    From dice-heroes with GNU General Public License v3.0 4 votes vote down vote up
@Override public Actor hit(float x, float y, boolean touchable) {
    if (touchable && this.getTouchable() != Touchable.enabled) return null;
    return x >= 0 && x < getWidth() && y >= 0 && y < getHeight() ? this : null;
}
 
Example 13
Source File: ChatActor.java    From Cubes with MIT License 4 votes vote down vote up
@Override
public Touchable getTouchable() {
  return open.isEnabled() ? Touchable.enabled : Touchable.disabled;
}