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

x33g5p2x  于2022-01-17 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(134)

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

Button.setSize介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

public Button (ButtonStyle style) {
  initialize();
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (ButtonStyle style) {
  initialize();
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Skin skin, String styleName) {
  super(skin);
  initialize();
  setStyle(skin.get(styleName, ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Skin skin) {
  super(skin);
  initialize();
  setStyle(skin.get(ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Actor child, ButtonStyle style) {
  initialize();
  add(child);
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Skin skin, String styleName) {
  super(skin);
  initialize();
  setStyle(skin.get(styleName, ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Skin skin) {
  super(skin);
  initialize();
  setStyle(skin.get(ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: libgdx/libgdx

public Button (Actor child, ButtonStyle style) {
  initialize();
  add(child);
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

public void resize(int width, int height) {
    viewportWidth = width;
    viewportHeight = height;

    setBounds(0, 0, width, height);

    float size = DPIUtils.getPrefButtonSize();
    lookatButton.setSize(size, size);
    talktoButton.setSize(size, size);
    pickupButton.setSize(size, size);
  }
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

@Override
public void resize(int width, int height) {
  stage.getViewport().update(width, height, true);
  pointer.resize();
  float size = DPIUtils.getPrefButtonSize();
  credits.setSize(size, size);
  help.setSize(size, size);
  debug.setSize(size, size);
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

public Button (ButtonStyle style) {
  initialize();
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

public Button (Skin skin, String styleName) {
  super(skin);
  initialize();
  setStyle(skin.get(styleName, ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

public Button (Actor child, ButtonStyle style) {
  initialize();
  add(child);
  setStyle(style);
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

public Button (Skin skin) {
  super(skin);
  initialize();
  setStyle(skin.get(ButtonStyle.class));
  setSize(getPrefWidth(), getPrefHeight());
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

button.setSize(slotWidth, slotHeight);

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

menuButton.setSize(iconSize, iconSize);

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

up.setSize(size, size);
up.setPosition(getX() + getWidth() - size - margin, getY() + getHeight() - margin - size);
down.setSize(size, size);
down.setPosition(getX() + getWidth() - size - margin, getY() + margin);

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

@Override
public void resize(int width, int height) {
  final World world = ui.getWorld();
  if (!world.isDisposed()) {
    screenViewport.setWorldSize(world.getWidth(), world.getHeight());
    screenViewport.update(width, height, true);
    worldViewport.setScreenBounds(screenViewport.getScreenX(), screenViewport.getScreenY(),
        screenViewport.getScreenWidth(), screenViewport.getScreenHeight());
    world.resize(screenViewport.getWorldWidth(), screenViewport.getWorldHeight());
  }
  pointer.resize();
  verbUI.setSize(screenViewport.getScreenWidth(), screenViewport.getScreenHeight() * UI_SCREEN_PERCENT);
  float size = DPIUtils.getPrefButtonSize();
  float margin = DPIUtils.getMarginSize();
  menuButton.setSize(size, size);
  menuButton.setPosition(stage.getViewport().getScreenWidth() - menuButton.getWidth() - margin,
      stage.getViewport().getScreenHeight() - menuButton.getHeight() - margin);
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

@Override
public void resize(int width, int height) {
  final World world = ui.getWorld();
  if (!world.isDisposed()) {
    viewport.setWorldSize(world.getWidth(), world.getHeight());
    viewport.update(width, height, true);
    world.resize(viewport.getWorldWidth(), viewport.getWorldHeight());
  } else {
    viewport.setWorldSize(width, height);
    viewport.update(width, height, true);
  }
  updateUI();
  pie.resize(viewport.getScreenWidth(), viewport.getScreenHeight());
  inventoryUI.resize(viewport.getScreenWidth(), viewport.getScreenHeight());
  inventoryButton.resize(width, height);
  pointer.resize(width, height);
  float size = DPIUtils.getPrefButtonSize();
  float margin = DPIUtils.getMarginSize();
  menuButton.setSize(size, size);
  menuButton.setPosition(stage.getViewport().getScreenWidth() - menuButton.getWidth() - margin,
      stage.getViewport().getScreenHeight() - menuButton.getHeight() - margin);
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

float iconSize = DPIUtils.getPrefButtonSize();
menuButton.setSize(iconSize, iconSize);

相关文章