com.badlogic.gdx.scenes.scene2d.Actor.setSize()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.Actor.setSize()方法的一些代码示例,展示了Actor.setSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Actor.setSize()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Actor
类名称:Actor
方法名:setSize

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());

相关文章