本文整理了Java中com.badlogic.gdx.scenes.scene2d.Actor.setSize()
方法的一些代码示例,展示了Actor.setSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Actor.setSize()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Actor
类名称:Actor
方法名:setSize
[英]Sets the width and height.
[中]设置宽度和高度。
代码示例来源:origin: libgdx/libgdx
protected void update (float percent) {
target.setSize(startWidth + (endWidth - startWidth) * percent, startHeight + (endHeight - startHeight) * percent);
}
代码示例来源:origin: libgdx/libgdx
protected void update (float percent) {
target.setSize(startWidth + (endWidth - startWidth) * percent, startHeight + (endHeight - startHeight) * percent);
}
代码示例来源:origin: libgdx/libgdx
widget.setSize(widgetWidth, widgetHeight);
if (widget instanceof Layout) ((Layout)widget).validate();
代码示例来源:origin: libgdx/libgdx
widget.setSize(widgetWidth, widgetHeight);
if (widget instanceof Layout) ((Layout)widget).validate();
代码示例来源:origin: moribitotech/MTX
/**
* Set size for multiple actors at once
* */
public static void setSize(float w, float h, Actor... actors) {
for (Actor a : actors) {
a.setSize(w, h);
}
}
}
代码示例来源:origin: Var3D/var3dframe
public UI<T> setSize(float width, float height) {
t.setSize(width, height);
return this;
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
protected void update (float percent) {
target.setSize(startWidth + (endWidth - startWidth) * percent, startHeight + (endHeight - startHeight) * percent);
}
代码示例来源:origin: dingjibang/GDX-RPG
public TypedGdxQuery<T> size(float width, float height){
t.setSize((int)width, (int)height);
return this;
}
代码示例来源:origin: stackoverflow.com
button.addListener(new ClickListener() {
@Override
public void enter(InputEvent event, float x, float y, int pointer, Actor fromActor) {
super.enter(event, x, y, pointer, fromActor);
if (fromActor != null)
fromActor.setSize(overSize, overSize);
}
@Override
public void exit(InputEvent event, float x, float y, int pointer, Actor toActor) {
super.exit(event, x, y, pointer, toActor);
if (toActor != null)
toActor.setSize(defaultSize, defaultSize);
}
});
代码示例来源:origin: dingjibang/GDX-RPG
public GdxQuery size(float width,float height){
for(Actor actor:list())
actor.setSize((int)width, (int)height);
return this;
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public void layout() {
super.layout();
if (actor != null) {
actor.setPosition(0f, 0f);
if (actor instanceof Layout) {
Layout layout = (Layout) actor;
actor.setSize(layout.getPrefWidth(), layout.getPrefHeight());
} else {
actor.setSize(origWidth, origHeight);
}
}
}
代码示例来源:origin: Var3D/var3dframe
public UI<T> setSize(Actor actor) {
t.setSize(actor.getWidth(), actor.getHeight());
return this;
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public void layout() {
super.layout();
if (actor != null) {
actor.setPosition(0f, 0f);
actor.setSize(getWidth(), getHeight());
}
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
widget.setSize(widgetWidth, widgetHeight);
if (widget instanceof Layout) ((Layout)widget).validate();
代码示例来源:origin: 121077313/cocostudio-ui-libgdx
this.editor = editor;
actor.setName(widget.getName());
actor.setSize(widget.getSize().getWidth(), widget.getSize().getHeight());
内容来源于网络,如有侵权,请联系作者删除!