当前位置: 首页>>代码示例>>Java>>正文


Java ImageButton.setName方法代码示例

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ImageButton.setName方法的典型用法代码示例。如果您正苦于以下问题:Java ImageButton.setName方法的具体用法?Java ImageButton.setName怎么用?Java ImageButton.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.scenes.scene2d.ui.ImageButton的用法示例。


在下文中一共展示了ImageButton.setName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ItemBox

import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; //导入方法依赖的package包/类
public ItemBox(ItemStack stack, int inventoryX, int inventoryY, String extra) {
	this.stack = stack;
	this.inventoryX = inventoryX;
	this.inventoryY = inventoryY;
	this.extra = extra;

	btnGroup = CachePool.getGroup();
	btnGroup.setBounds(0, 0, 60, 60);

	style = new ImageButton.ImageButtonStyle();
	style.up = inventoryBoxDrawable;
	btn = new ImageButton(style);
	btn.setBounds(0, 0, 60, 60);
	btn.setName(extra);
	btnGroup.addActor(btn);

	setupBox();
	add(btnGroup);
}
 
开发者ID:jmrapp1,项目名称:TerraLegion,代码行数:20,代码来源:ItemBox.java

示例2: getActors

import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; //导入方法依赖的package包/类
@Override
   public Actor[] getActors(Skin skin) {
ImageButton musicTooltip = new OwnImageButton(skin, "tooltip");
musicTooltip.addListener(new TextTooltip(
	I18n.bundle.format("gui.tooltip.music", SysUtilsFactory.getSysUtils().getDefaultMusicDir()), skin));

ImageButton reloadMusic = new OwnImageButton(skin, "reload");
reloadMusic.setName("reload music");
reloadMusic.addListener(new EventListener() {
    @Override
    public boolean handle(Event event) {
	if (event instanceof ChangeEvent) {
	    EventManager.instance.post(Events.MUSIC_RELOAD_CMD);
	    return true;
	}
	return false;
    }
});
reloadMusic.addListener(new TextTooltip(I18n.bundle.get("gui.music.reload"), skin));

return new Actor[] { musicTooltip, reloadMusic };
   }
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:23,代码来源:DesktopMusicActors.java

示例3: SiggdImageButton

import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; //导入方法依赖的package包/类
public SiggdImageButton(String down, String disabled, String metaData) {
	Texture texture2 = new Texture(Gdx.files.internal(down));
	Texture texture3 = new Texture(Gdx.files.internal(disabled));
	TextureRegion imageDown = new TextureRegion(texture2);
	TextureRegion imageDisabled = new TextureRegion(texture3);
	TextureRegionDrawable drawableDown = new TextureRegionDrawable(imageDown);
	TextureRegionDrawable drawableDisabled = new TextureRegionDrawable(imageDisabled);
	ImageButtonStyle imageButtonStyle = new ImageButtonStyle(drawableDown, drawableDown,
			drawableDown, drawableDown, drawableDown, drawableDown);
	imageButtonStyle.imageDisabled = drawableDisabled;
	mImageButton = new ImageButton(imageButtonStyle);
	mImageButton.setName(metaData);

	if (GLOW == null)
		GLOW = new Texture("data/gfx/glow.png");
	mGlow = new Image(GLOW);
}
 
开发者ID:underclocker,项目名称:Blob-Game,代码行数:18,代码来源:SiggdImageButton.java

示例4: circleButton

import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; //导入方法依赖的package包/类
public static ImageButton circleButton(String icon) {
	ButtonStyle circleStyle = skin.get(SkinConstants.STYLE_CIRCLE,
			ButtonStyle.class);
	ImageButtonStyle imageButtonStyle = new ImageButtonStyle(circleStyle);
	imageButtonStyle.imageUp = skin.getDrawable(icon);
	ImageButton imageButton = new ImageButton(imageButtonStyle);
	imageButton.setName(icon);
	return imageButton;
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:10,代码来源:WidgetBuilder.java

示例5: addParameterButton

import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; //导入方法依赖的package包/类
private void addParameterButton() {
	parameterButton = new ImageButton(
			((ParameterOptionStyle) style).parameterButton);
	parameterButton.setName(PARAMETER_BUTTON);
	add(parameterButton);
	parameterButton.addListener(new ClickListener() {
		@Override
		public void clicked(InputEvent event, float x, float y) {
			setExpressionEditorVisible(optionContainer.getActor() == optionWidget);
		}
	});
}
 
开发者ID:e-ucm,项目名称:ead,代码行数:13,代码来源:ParameterOption.java


注:本文中的com.badlogic.gdx.scenes.scene2d.ui.ImageButton.setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。