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

x33g5p2x  于2022-01-16 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(173)

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

Actor.setVisible介绍

[英]If false, the actor will not be drawn and will not receive touch events. Default is true.
[中]如果为false,则不会绘制演员,也不会接收触摸事件。默认值为true。

代码示例

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

public boolean act (float delta) {
  target.setVisible(visible);
  return true;
}

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

public boolean act (float delta) {
  target.setVisible(visible);
  return true;
}

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

public boolean act (float delta) {
  target.setVisible(visible);
  return true;
}

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

public TypedGdxQuery<T> visible(boolean v){
  t.setVisible(v);
  return this;
}

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

/**
 * Set visible for multiple actors at once
 * */
public static void setVisible(boolean isVisible, Actor... actors) {
  for (Actor a : actors) {
    a.setVisible(isVisible);
  }
}

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

public TypedGdxQuery<T> hide(){
  t.setVisible(false);
  return this;
}

代码示例来源:origin: Var3D/var3dframe

public UI<T> setVisible(boolean isVisible) {
  t.setVisible(isVisible);
  return this;
}

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

public TypedGdxQuery<T> show(){
  t.setVisible(true);
  return this;
}

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

public GdxQuery show(){
  for(Actor actor:list())
    actor.setVisible(true);
  return this;
}

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

public GdxQuery hide(){
  for(Actor actor:list())
    actor.setVisible(false);
  return this;
}

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

public GdxQuery visible(boolean v){
  for(Actor actor:list())
    actor.setVisible(v);
  return this;
}

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

@Override
public void onValid() {
  Gdx.app.log(TAG, "Tinify API key validation succeed");
  pleaseWaitDialog.findActor("groupChecking").setVisible(false);
  pleaseWaitDialog.findActor("groupValid").setVisible(true);
  pleaseWaitDialog.closeOnEscape();
  btnClose.setDisabled(false);
}

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

@Override
public void onInvalid() {
  Gdx.app.log(TAG, "Tinify API key validation failed");
  pleaseWaitDialog.findActor("groupChecking").setVisible(false);
  pleaseWaitDialog.findActor("groupInvalid").setVisible(true);
  pleaseWaitDialog.closeOnEscape();
  btnClose.setDisabled(false);
}

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

private void updateCompression() {
    if (model == null) return;

    PngCompressionModel compModel = model.getCompression();
    WidgetData.PngCompression compValue = WidgetData.PngCompression.valueOf(compModel == null ? null : compModel.getType());
    cboCompression.setSelected(compValue);
    containerPngCompSettings.setVisible(compValue.hasSettings);
  }
}

代码示例来源:origin: peakgames/libgdx-stagebuilder

@Override
  public void clicked(InputEvent event, float x, float y) {
    Actor popup = findActor("popup");
    if (popup.isVisible()) {
      button.setText("Show Popup");
      popup.setVisible(false);
    } else {
      button.setText("Hide Popup");
      popup.setVisible(true);
      popup.addAction(Actions.sequence(Actions.alpha(0), Actions.alpha(1, 0.5f)));
    }
  }
});

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

private void setSelectedTab(boolean value) {
  TabTitleButton tabTitleButton = ((TabTitleButton) tabTitleTable.getCells().get(selectedIndex).getActor());
  tabTitleButton.setDisabled(value); // Can't toggle the selected tab
  tabTitleButton.setChecked(value);
  tabBodyStack.getChildren().get(selectedIndex).setVisible(value);
}

代码示例来源:origin: peakgames/libgdx-stagebuilder

@Override
  public void clicked(InputEvent event, float x, float y) {
    findActor("loading_widget").setVisible(true);
    String key = "async_asset_loading_test";
    game.getAssetsInterface().removeAssetConfiguration(key);
    game.getAssetsInterface().addAssetConfiguration(key, "large.atlas", TextureAtlas.class);
    game.getAssetsInterface().loadAssetsAsync(key, new AssetLoaderListener() {
      @Override
      public void onAssetsLoaded() {
        findActor("loading_widget").setVisible(false);
        AsyncAssetLoadingScreen screen = new AsyncAssetLoadingScreen(game);
        game.addScreen(screen);
      }
    });
  }
});

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

dialogUI.setVisible(false);
  inventoryUI.hide();
  inventoryButton.setVisible(false);
  dialogUI.setVisible(true);
  inventoryUI.cancelDragging();
} else {
  inventoryUI.hide();
  dialogUI.setVisible(false);
  inventoryButton.setVisible(w.getInventory().isVisible());

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

/**
 * @param actor has the listener attached.
 * @param event touch down event which triggered mimic spawning.
 * @param x actor's relative X event position.
 * @param y actor's relative Y event position.
 */
protected void attachMimic (final Actor actor, final InputEvent event, final float x, final float y) {
  mimic.clearActions();
  mimic.getColor().a = alpha;
  mimic.setActor(actor);
  offsetX = -x;
  offsetY = -y;
  getStageCoordinates(event);
  dragStartX = MIMIC_COORDINATES.x;
  dragStartY = MIMIC_COORDINATES.y;
  mimic.setPosition(dragStartX, dragStartY);
  actor.getStage().addActor(mimic);
  mimic.toFront();
  actor.setVisible(!invisibleWhenDragged);
  if (blockInput) {
    addBlocker(actor.getStage());
  }
}

代码示例来源:origin: gearvrf/GearVRf-Demos

mResetSlider = false;
mColorButtonActor.setVisible(true);
mLookInsideButtonActor.setVisible(false);
mStage.draw();

相关文章