gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-24 09:57:05 27 4
gpt4 key购买 nike

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

Window.<init>介绍

暂无

代码示例

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

@Override
public void create () {
  spriteBatch = new SpriteBatch();
  // font = new BitmapFont(Gdx.files.internal("data/verdana39.fnt"), false);
  font = new BitmapFont(Gdx.files.internal("data/arial-32-pad.fnt"), false);
  // font = new FreeTypeFontGenerator(Gdx.files.internal("data/arial.ttf")).generateFont(new FreeTypeFontParameter());
  font.getData().markupEnabled = true;
  font.getData().breakChars = new char[] {'-'};
  multiPageFont = new BitmapFont(Gdx.files.internal("data/multipagefont.fnt"));
  // Add user defined color
  Colors.put("PERU", Color.valueOf("CD853F"));
  renderer = new ShapeRenderer();
  renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix());
  stage = new Stage(new ScreenViewport());
  Skin skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  BitmapFont labelFont = skin.get("default-font", BitmapFont.class);
  labelFont.getData().markupEnabled = true;
  // Notice that the last [] has been deliberately added to test the effect of excessive pop operations.
  // They are silently ignored, as expected.
  label = new Label("<<[BLUE]M[RED]u[YELLOW]l[GREEN]t[OLIVE]ic[]o[]l[]o[]r[]*[MAROON]Label[][] [Unknown Color]>>", skin);
  label.setPosition(100, 200);
  stage.addActor(label);
  Window window = new Window("[RED]Multicolor[GREEN] Title", skin);
  window.setPosition(400, 300);
  window.pack();
  stage.addActor(window);
  layout = new GlyphLayout();
}

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

Window window = new Window("Moo", skin);
Label lbl = new Label("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJ", skin);
lbl.setWrap(true);

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

Window window = new Window("Dialog", skin);
window.getTitleTable().add(new TextButton("X", skin)).height(window.getPadTop());
window.setPosition(0, 0);

代码示例来源:origin: narfman0/GDXWorld

Window window = new Window("Temporary File Present", skin);
window.add(new Label("It appears GDXWorld did not gracefully exit " +
    "last run, and a temporary file has been found. Do you wish " +

代码示例来源:origin: narfman0/GDXWorld

Window window = new Window("GDX World Editor", skin);
window.add(newButton);
window.row();

代码示例来源:origin: yichen0831/Bomberman_libGdx

pauseWindow = new Window("Pause", skin);
pauseWindow.setPosition((640 - pauseWindow.getWidth()) / 2, (480 - pauseWindow.getHeight()) / 2);
pauseWindow.setVisible(paused);

代码示例来源:origin: dsaltares/libgdx-cookbook

Button thirdButton = new Button(new TextureRegionDrawable(new TextureRegion(actor)));
window = new Window("This is the title", ws);
window.debug();
window.setKeepWithinStage(false);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com