本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Button.getStyle()
方法的一些代码示例,展示了Button.getStyle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getStyle()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Button
类名称:Button
方法名:getStyle
[英]Returns the button's style. Modifying the returned style may not have an effect until #setStyle(ButtonStyle) is called.
[中]返回按钮的样式。在调用#setStyle(ButtonStyle)之前,修改返回的样式可能不会产生效果。
代码示例来源:origin: peakgames/libgdx-stagebuilder
@Override
public Actor build(BaseModel model, Group parent) {
ButtonModel buttonModel = (ButtonModel) model;
setTextures(buttonModel);
Button button = new Button(up, down);
if (buttonModel.getFrameDisabled() != null) {
button.getStyle().disabled = disabled;
}
if ( buttonModel.getFrameChecked() != null){
button.getStyle().checked = checked;
}
normalizeModelSize(buttonModel, parent, up.getMinWidth(), up.getMinHeight());
setBasicProperties(model, button);
return button;
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
final Skin skin = ui.getSkin();
final Button button = new Button(new ButtonStyle());
final ButtonStyle style = button.getStyle();
style.up = style.down = skin.getDrawable("black");
内容来源于网络,如有侵权,请联系作者删除!