本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Button.setVisible()
方法的一些代码示例,展示了Button.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setVisible()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Button
类名称:Button
方法名:setVisible
暂无
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {
if (getParent() != null)
show();
} else {
up.setVisible(false);
down.setVisible(false);
up.remove();
down.remove();
}
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
private void setUpDownVisibility() {
EngineLogger.debug(
"setUpDownVisibility: " + isScrollY() + " maxY: " + getMaxY() + " Margin: " + DPIUtils.getMarginSize());
if (isScrollY() && getMaxY() > DPIUtils.getMarginSize()) {
if (getScrollPercentY() > 0f && up.isVisible() == false) {
up.setVisible(true);
} else if (getScrollPercentY() == 0f && up.isVisible() == true) {
up.setVisible(false);
}
if (getScrollPercentY() < 1f && down.isVisible() == false) {
down.setVisible(true);
} else if (getScrollPercentY() == 1f && down.isVisible() == true) {
down.setVisible(false);
}
} else {
up.setVisible(false);
down.setVisible(false);
}
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@LmlAction("onNinePatchChecked") void onNinePatchChecked() {
boolean checked = chbNinePatch.isChecked();
btnEditNinePatch.setVisible(checked);
// Apply model logic only for a file based nine patch
if (!inputFile.isFileBasedNinePatch()) {
inputFile.setProgrammaticNinePatch(checked);
}
// Open 9patch editor immediately
if (checked) {
navigateToNinePatchEditor();
}
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
talktoButton.setVisible(true);
pickupButton.setVisible(false);
rightButton = talktoButton;
} else {
talktoButton.setVisible(false);
pickupButton.setVisible(true);
rightButton = pickupButton;
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
chbNinePatch.setDisabled(true);
chbNinePatch.setChecked(true);
btnEditNinePatch.setVisible(true);
} else {
chbNinePatch.setDisabled(false);
chbNinePatch.setChecked(inputFile.isProgrammaticNinePatch());
btnEditNinePatch.setVisible(inputFile.isProgrammaticNinePatch());
内容来源于网络,如有侵权,请联系作者删除!