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

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

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

Table.addListener介绍

暂无

代码示例

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

  1. buttonTable.defaults().space(6);
  2. buttonTable.addListener(new ChangeListener() {
  3. public void changed (ChangeEvent event, Actor actor) {
  4. if (!values.containsKey(actor)) return;

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

  1. buttonTable.defaults().space(6);
  2. buttonTable.addListener(new ChangeListener() {
  3. public void changed (ChangeEvent event, Actor actor) {
  4. if (!values.containsKey(actor)) return;

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

  1. table.pack();
  2. table.addListener(new ClickListener() {
  3. public void clicked (InputEvent event, float x, float y) {
  4. System.out.println("click!");

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

  1. getTitleTable().addListener(new EventListener() {
  2. @Override
  3. public boolean handle(Event event) {
  4. getTitleTable().addListener(new TextTooltip(I18n.bundle.get("gui.tooltip.expandcollapse"), skin));

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

  1. @OnEvent(ShowToastEvent.class) void onEvent(final ShowToastEvent event) {
  2. if (viewShown) {
  3. final Toast toast;
  4. if (event.getContent() != null) {
  5. toast = toastManager.show(event.getContent(), event.getDuration());
  6. } else {
  7. toast = toastManager.show(event.getMessage(), event.getDuration());
  8. }
  9. // Setup click listener (if provided).
  10. if (event.getClickAction() != null) {
  11. Table mainTable = toast.getMainTable();
  12. mainTable.setTouchable(Touchable.enabled);
  13. mainTable.addListener(new ClickListener() {
  14. @Override
  15. public void clicked(InputEvent e, float x, float y) {
  16. if (e.getTarget() == e.getListenerActor()) {
  17. event.getClickAction().run();
  18. toastManager.remove(toast);
  19. }
  20. }
  21. });
  22. }
  23. }
  24. }

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

  1. buttonTable.defaults().space(6);
  2. buttonTable.addListener(new ChangeListener() {
  3. public void changed (ChangeEvent event, Actor actor) {
  4. if (!values.containsKey(actor)) return;

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

  1. buttonTable.defaults().space(6);
  2. buttonTable.addListener(new ChangeListener() {
  3. @Override
  4. public void changed (ChangeEvent event, Actor actor) {

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

  1. buttonTable.defaults().space(6).padBottom(3);
  2. buttonTable.addListener(new ChangeListener() {
  3. @Override
  4. public void changed (ChangeEvent event, Actor actor) {

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

  1. .minWidth(Gdx.graphics.getWidth() * 0.5f);
  2. centerPanel.addListener(new InputListener() {
  3. @Override
  4. public void enter(InputEvent event, float x, float y, int pointer, com.badlogic.gdx.scenes.scene2d.Actor fromActor) {

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

  1. table.setBackground(bg);
  2. table.addListener(new InputListener() {
  3. @Override
  4. public boolean keyUp(InputEvent event, int keycode) {

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

  1. table.pad(margin);
  2. table.addListener(new InputListener() {
  3. @Override
  4. public boolean keyUp(InputEvent event, int keycode) {

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

  1. menuButtonTable.setBackground(bg);
  2. menuButtonTable.addListener(new InputListener() {
  3. @Override
  4. public boolean keyUp(InputEvent event, int keycode) {

相关文章