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

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

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

Table.left介绍

[英]Adds Align#left and clears Align#right for the alignment of the logical table within the table actor.
[中]添加Align#left并清除Align#right,以便在table actor中对齐逻辑表。

代码示例

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

  1. private void setupUI () {
  2. Skin skin = assets.get(DEFAULT_SKIN);
  3. Table table = new Table();
  4. table.setFillParent(true);
  5. table.top().left().add(new Label("FPS ", skin)).left();
  6. table.add(fpsLabel = new Label("", skin)).left().expandX().row();
  7. ui.addActor(table);
  8. }

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

  1. private void setupUI () {
  2. ui = new Stage(new ExtendViewport(640, 480));
  3. Skin skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  4. skipCleanup = new CheckBox("Skip blend function clean-up", skin);
  5. skipCleanup.addListener(listener);
  6. logLabel = new Label("", skin.get(LabelStyle.class));
  7. clearEmitters = new TextButton("Clear screen", skin);
  8. clearEmitters.addListener(listener);
  9. scaleEffects = new TextButton("Scale existing effects", skin);
  10. scaleEffects.addListener(listener);
  11. Table table = new Table();
  12. table.setTransform(false);
  13. table.setFillParent(true);
  14. table.defaults().padTop(5).left();
  15. table.top().left().padLeft(5);
  16. table.add(skipCleanup).colspan(2).row();
  17. table.add(clearEmitters).spaceRight(10);
  18. table.add(scaleEffects).row();
  19. table.add(logLabel).colspan(2);
  20. ui.addActor(table);
  21. }

代码示例来源:origin: kotcrab/vis-ui

  1. public MenuBar (MenuBarStyle style) {
  2. menuItems = new VisTable();
  3. mainTable = new VisTable() {
  4. @Override
  5. protected void sizeChanged () {
  6. super.sizeChanged();
  7. closeMenu();
  8. }
  9. };
  10. mainTable.left();
  11. mainTable.add(menuItems);
  12. mainTable.setBackground(style.background);
  13. }

代码示例来源:origin: moribitotech/MTX

  1. /**
  2. * Set benchmark table position
  3. * */
  4. public void setUpPosition(BenchmarkPosition benchmarkPosition) {
  5. switch (benchmarkPosition) {
  6. case CENTER:
  7. table.center();
  8. break;
  9. case TOP_LEFT:
  10. table.top().left();
  11. break;
  12. case TOP_RIGHT:
  13. table.top().right();
  14. break;
  15. case BOTTOM_LEFT:
  16. table.bottom().left();
  17. break;
  18. case BOTTOM_RIGHT:
  19. table.bottom().right();
  20. break;
  21. default:
  22. table.top().left();
  23. break;
  24. }
  25. }
  26. }

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

  1. public PropertyTable(Skin skin) {
  2. // super(skin);
  3. table = new Table(skin);
  4. this.skin = skin;
  5. top().left();
  6. table.top().left();
  7. table.add(new Label("Name", skin));
  8. table.add(new Label("Value", skin));
  9. table.setFillParent(true);
  10. fill();
  11. prefHeight(1000);
  12. setActor(table);
  13. }

代码示例来源:origin: moribitotech/MTX

  1. levelsTable1.setPosition(-999, 0);
  2. levelsTable1.addAction(Actions.moveTo(0, 0, 0.7f));
  3. levelsTable1.top().left().pad(30, 30, 30, 30);

代码示例来源:origin: langurmonkey/gaiasky

  1. final Table visibilityTable = new Table(skin);
  2. visibilityTable.setName("visibility table");
  3. visibilityTable.top().left();
  4. buttonMap = new HashMap<String, Button>();
  5. Set<Button> buttons = new HashSet<Button>();

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

  1. rightPanel.top().left();
  2. rightPanel.add(actorPanel).expand().fill().left();
  3. rightPanel.setBackground("background");
  4. leftPanel.top().left().padLeft(10);
  5. leftPanel.add(img).expand().fill().padBottom(20).padTop(20).padLeft(0).left();
  6. leftPanel.row();

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

  1. public DialogUI(UI ui) {
  2. super(new Table(ui.getSkin()), ui.getSkin());
  3. this.ui = ui;
  4. setFadeScrollBars(true);
  5. setOverscroll(false, false);
  6. up = new Button(ui.getSkin(), "dialog-up");
  7. down = new Button(ui.getSkin(), "dialog-down");
  8. panel = (Table) getActor();
  9. style = ui.getSkin().get(DialogUIStyle.class);
  10. this.recorder = ui.getRecorder();
  11. if (style.background != null)
  12. panel.setBackground(style.background);
  13. panel.top().left();
  14. panel.pad(DPIUtils.getMarginSize());
  15. setVisible(false);
  16. panel.defaults().expandX().fillX().top().left().padBottom(DPIUtils.getSpacing());
  17. up.addListener(new ChangeListener() {
  18. @Override
  19. public void changed(ChangeEvent event, Actor actor) {
  20. setScrollY(getScrollY() - DPIUtils.getPrefButtonSize());
  21. }
  22. });
  23. down.addListener(new ChangeListener() {
  24. @Override
  25. public void changed(ChangeEvent event, Actor actor) {
  26. setScrollY(getScrollY() + DPIUtils.getPrefButtonSize());
  27. }
  28. });
  29. }

代码示例来源:origin: langurmonkey/gaiasky

  1. content.top().left();
  2. content.defaults().space(5 * GlobalConf.SCALE_FACTOR);
  3. this.padLeft(10 * GlobalConf.SCALE_FACTOR);

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

  1. bottomTable.setBackground(drawable);
  2. bottomTable.left();
  3. add(bottomTable).fill();

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

  1. table.left().top();
  2. table.pad(margin);
  3. versionStack.pad(0);
  4. versionStack.add(version);
  5. versionStack.bottom().left();
  6. versionStack.setFillParent(true);
  7. versionStack.pack();

代码示例来源:origin: kotcrab/vis-editor

  1. @Override
  2. public void create () {
  3. VisUI.load();
  4. stage = new Stage(new ScreenViewport());
  5. final Table root = new Table();
  6. root.setFillParent(true);
  7. stage.addActor(root);
  8. TestWindow window = new TestWindow();
  9. TestCollapsible collapsible = new TestCollapsible();
  10. window.setKeepWithinParent(true);
  11. window.setPosition(110, 110);
  12. collapsible.setKeepWithinParent(true);
  13. collapsible.setPosition(200, 200);
  14. FloatingGroup floatingGroup = new FloatingGroup(1000, 600);
  15. floatingGroup.addActor(window);
  16. floatingGroup.addActor(collapsible);
  17. root.debugAll();
  18. root.left().bottom();
  19. root.add(floatingGroup).padLeft(100).padBottom(100);
  20. Gdx.input.setInputProcessor(stage);
  21. }

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

  1. top().left();

代码示例来源:origin: langurmonkey/gaiasky

  1. cb.bottom().left();

代码示例来源:origin: dingjibang/GDX-RPG

  1. $.add(UI.base()).color("333333").size(Game.width(), 43).a(0.85f).to(console);
  2. out = new Table().left().top();
  3. out.setWidth(Game.width());

代码示例来源:origin: manuelbua/uracer-kotd

  1. buttons.add(quit).pad(0, 2, 0, 2);
  2. bottom.left().bottom();
  3. bottom.add(UIUtils.newVersionInfoLabel());

代码示例来源:origin: jsjolund/GdxDemo3D

  1. rootTable.add(bottomRightTable).width(bottomRightTable.getPrefWidth()).height(bottomRightTable.getPrefHeight()).bottom().right();
  2. rootTable.left().bottom();

相关文章