本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Button.isDisabled()
方法的一些代码示例,展示了Button.isDisabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.isDisabled()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Button
类名称:Button
方法名:isDisabled
暂无
代码示例来源:origin: libgdx/libgdx
public void clicked (InputEvent event, float x, float y) {
if (isDisabled()) return;
setChecked(!isChecked, true);
}
});
代码示例来源:origin: libgdx/libgdx
public void clicked (InputEvent event, float x, float y) {
if (isDisabled()) return;
setChecked(!isChecked, true);
}
});
代码示例来源:origin: libgdx/libgdx
public void setStyle (ButtonStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
this.style = style;
Drawable background = null;
if (isPressed() && !isDisabled())
background = style.down == null ? style.up : style.down;
else {
if (isDisabled() && style.disabled != null)
background = style.disabled;
else if (isChecked && style.checked != null) {
if (isOver() && style.checkedOver != null)
background = style.checkedOver;
else if (focused && style.checkedFocused != null)
background = style.checkedFocused;
else
background = style.checked;
} else if (isOver() && style.over != null)
background = style.over;
else if (focused && style.focused != null)
background = style.focused;
else
background = style.up;
}
setBackground(background);
}
代码示例来源:origin: libgdx/libgdx
public void setStyle (ButtonStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
this.style = style;
Drawable background = null;
if (isPressed() && !isDisabled())
background = style.down == null ? style.up : style.down;
else {
if (isDisabled() && style.disabled != null)
background = style.disabled;
else if (isChecked && style.checked != null) {
if (isOver() && style.checkedOver != null)
background = style.checkedOver;
else if (focused && style.checkedFocused != null)
background = style.checkedFocused;
else
background = style.checked;
} else if (isOver() && style.over != null)
background = style.over;
else if (focused && style.focused != null)
background = style.focused;
else
background = style.up;
}
setBackground(background);
}
代码示例来源:origin: libgdx/libgdx
public void draw (Batch batch, float parentAlpha) {
validate();
boolean isDisabled = isDisabled();
boolean isPressed = isPressed();
boolean isChecked = isChecked();
代码示例来源:origin: libgdx/libgdx
public void draw (Batch batch, float parentAlpha) {
validate();
boolean isDisabled = isDisabled();
boolean isPressed = isPressed();
boolean isChecked = isChecked();
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void clicked (InputEvent event, float x, float y) {
if (isDisabled()) return;
setChecked(!isChecked, true);
}
});
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void setStyle (ButtonStyle style) {
if (style == null) throw new IllegalArgumentException("style cannot be null.");
this.style = style;
Drawable background = null;
if (isPressed() && !isDisabled())
background = style.down == null ? style.up : style.down;
else {
if (isDisabled() && style.disabled != null)
background = style.disabled;
else if (isChecked && style.checked != null) {
if (isOver() && style.checkedOver != null)
background = style.checkedOver;
else if (focused && style.checkedFocused != null)
background = style.checkedFocused;
else
background = style.checked;
} else if (isOver() && style.over != null)
background = style.over;
else if (focused && style.focused != null)
background = style.focused;
else
background = style.up;
}
setBackground(background);
}
代码示例来源:origin: kotcrab/vis-ui
if (treatDisabledFieldsAsValid && wrapper.button.isDisabled()) {
continue;
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void draw (Batch batch, float parentAlpha) {
validate();
boolean isDisabled = isDisabled();
boolean isPressed = isPressed();
boolean isChecked = isChecked();
代码示例来源:origin: narfman0/GDXWorld
@Override
public void clicked(InputEvent event, float x, float y) {
if(chooseButton.isDisabled())
return;
Selection<Node> selection = tree.getSelection();
内容来源于网络,如有侵权,请联系作者删除!