本文整理汇总了Java中com.kotcrab.vis.ui.widget.VisImageButton.setStyle方法的典型用法代码示例。如果您正苦于以下问题:Java VisImageButton.setStyle方法的具体用法?Java VisImageButton.setStyle怎么用?Java VisImageButton.setStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.kotcrab.vis.ui.widget.VisImageButton
的用法示例。
在下文中一共展示了VisImageButton.setStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseButton
import com.kotcrab.vis.ui.widget.VisImageButton; //导入方法依赖的package包/类
public static void parseButton(VisImageButton button, XmlReader.Element element){
String upPath = element.get("up");
String downPath = element.get("down");
String checkPath = element.get("check");
Drawable up = new TextureRegionDrawable(new TextureRegion(new Texture(Config.getImageFilePath(upPath))));
Drawable down = new TextureRegionDrawable(new TextureRegion(new Texture(Config.getImageFilePath(downPath))));
Drawable checked = new TextureRegionDrawable(new TextureRegion(new Texture(Config.getImageFilePath(checkPath))));
VisImageButton.VisImageButtonStyle buttonStyle = new VisImageButton.VisImageButtonStyle(
up,down,checked,up,down,checked
);
button.setStyle(buttonStyle);
attr2Button(button, new String[]{upPath, downPath, checkPath});
}
示例2: process
import com.kotcrab.vis.ui.widget.VisImageButton; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final VisImageButton actor,
final String rawAttributeData) {
final VisImageButtonStyle style = new VisImageButtonStyle(actor.getStyle());
style.imageUp = parser.getData().getDefaultSkin().getDrawable(parser.parseString(rawAttributeData, actor));
actor.setStyle(style);
}