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

x33g5p2x  于2022-01-30 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(163)

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

Stage.getViewport介绍

暂无

代码示例

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

@Override
  public void resize (int width, int height) {
    stage.getViewport().update(width, height, true);
  }
}

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

public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
  // Gdx.gl.glViewport(100, 100, width - 200, height - 200);
  // stage.setViewport(800, 600, false, 100, 100, width - 200, height - 200);
}

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

@Override
public void resize (int width, int height) {
  ui.getViewport().update(width, height);
}

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

@Override
public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
}

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

@Override
public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
}

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

@Override
public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
}

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

@Override
  public void resize (int width, int height) {
    ui.getViewport().update(width, height, true);
  }
}

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

public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
  // Gdx.gl.glViewport(100, 100, width - 200, height - 200);
  // stage.setViewport(800, 600, false, 100, 100, width - 200, height - 200);
}

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

@Override
  public void resize (int width, int height) {
    stage.getViewport().update(width, height, true);
  }
}

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

@Override
  public void resize (int width, int height) {
    stage.getViewport().update(width, height, true);
// root.width = width;
// root.height = height;
// root.invalidate();
  }

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

@Override
public void resize (int width, int height) {
  hud.getViewport().update(width, height, true);
}

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

@Override
public void resize (int width, int height) {
  stage1.getViewport().update(width, height, true);
  stage2.getViewport().update(width, height, true);
}

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

public void resize (int width, int height) {
  stage.getViewport().update(width, height, true);
  table.invalidateHierarchy();
  renderer.setProjectionMatrix(stage.getViewport().getCamera().combined);
  graphSize = 0.75f * Math.min(stage.getViewport().getWorldWidth(), stage.getViewport().getWorldHeight());
  steps = graphSize * 0.5f;
}

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

@Override
public void resize (int width, int height) {
  super.resize(width, height);
  ui.getViewport().setWorldSize(width, height);
  ui.getViewport().update(width, height, true);
}

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

@Override
public void resize (int width, int height) {
  Gdx.input.setInputProcessor(new InputMultiplexer(ui, cameraInputController));
  Gdx.gl.glViewport(0, 0, width, height);
  worldCamera.viewportWidth = width;
  worldCamera.viewportHeight = height;
  worldCamera.update();
  ui.getViewport().setWorldSize(width, height);
  ui.getViewport().update(width, height, true);
}

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

public void resize (int width, int height) {
  ui.getViewport().update(width, height, true);
  container.setSize(width, height);
  if (test != null) {
    test.resize(width, height);
  }
}

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

@Override
  public void resize (int width, int height) {
    stage.getViewport().update(width, height, true);
    batch.getProjectionMatrix().setToOrtho2D(0, 0, width, height);
  }
}

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

@Override
public void resize (int width, int height) {
  ui.setSize(width, height);
  ui.invalidate();
  stage.getViewport().update(width, height, true);
}

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

@Override
public void resize (int width, int height) {
  Gdx.input.setInputProcessor(new InputMultiplexer(ui, cameraInputController));
  Gdx.gl.glViewport(0, 0, width, height);
  worldCamera.viewportWidth = width;
  worldCamera.viewportHeight = height;
  worldCamera.update();
  ui.getViewport().setWorldSize(width, height);
  ui.getViewport().update(width, height, true);
}

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

public void resize (int width, int height) {
  spriteBatch.getProjectionMatrix().setToOrtho2D(0, 0, width, height);
  renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix());
  stage.getViewport().update(width, height, true);
}

相关文章