本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Button.setDisabled()
方法的一些代码示例,展示了Button.setDisabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setDisabled()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Button
类名称:Button
方法名:setDisabled
[英]When true, the button will not toggle #isChecked() when clicked and will not fire a ChangeEvent.
[中]如果为true,则单击按钮时不会切换#isChecked(),也不会触发ChangeEvent。
代码示例来源:origin: dingjibang/GDX-RPG
public TypedGdxQuery<T> disabled(boolean b) {
if(t instanceof Button)
((Button)t).setDisabled(b);
return this;
}
代码示例来源:origin: dingjibang/GDX-RPG
public GdxQuery disabled(boolean b) {
for(Actor actor:list())
if(actor instanceof Button)
((Button)actor).setDisabled(b);
return this;
}
代码示例来源:origin: kotcrab/vis-ui
@Override
public void setDisabled (boolean disabled) {
super.setDisabled(disabled);
if (disabled) FocusManager.resetFocus(getStage(), this);
}
代码示例来源:origin: kotcrab/vis-ui
@Override
public void setDisabled (boolean disabled) {
super.setDisabled(disabled);
if (disabled) FocusManager.resetFocus(getStage(), this);
}
代码示例来源:origin: narfman0/GDXWorld
@Override
public void clicked(InputEvent event, float x, float y) {
Selection<Node> selection = tree.getSelection();
if(selection.size() < 1) {
chooseButton.setDisabled(true);
return;
}
if(!isDirectoriesChoosable()) {
Object lastObj = selection.getLastSelected().getObject();
if(lastObj instanceof FileHandle) {
FileHandle file = (FileHandle) lastObj;
if(file.isDirectory()) {
chooseButton.setDisabled(true);
return;
}
}
}
chooseButton.setDisabled(false);
}
};
代码示例来源:origin: narfman0/GDXWorld
/** builds {@link #chooseButton}, {@link #cancelButtonListener}, {@link #tree}, {@link #treePane} */
protected void buildWidgets() {
(tree = new Tree(style.treeStyle)).addListener(treeListener);
if(style.scrollPaneStyle != null)
treePane = new ScrollPane(tree, style.scrollPaneStyle);
else
treePane = new ScrollPane(tree);
(chooseButton = Scene2DUtils.newButton(style.selectButtonStyle, "select")).addListener(chooseButtonListener);
chooseButton.setDisabled(true);
(cancelButton = Scene2DUtils.newButton(style.cancelButtonStyle, "cancel")).addListener(cancelButtonListener);
}
代码示例来源:origin: narfman0/GDXWorld
saveButton.setDisabled(lastSavedFile == null);
add(clearButton);
row();
内容来源于网络,如有侵权,请联系作者删除!