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

x33g5p2x  于2022-01-17 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(133)

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

Button.isOver介绍

暂无

代码示例

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

public void setStyle (ButtonStyle style) {
  if (style == null) throw new IllegalArgumentException("style cannot be null.");
  this.style = style;
  Drawable background = null;
  if (isPressed() && !isDisabled())
    background = style.down == null ? style.up : style.down;
  else {
    if (isDisabled() && style.disabled != null)
      background = style.disabled;
    else if (isChecked && style.checked != null) {
      if (isOver() && style.checkedOver != null)
        background = style.checkedOver;
      else if (focused && style.checkedFocused != null)
        background = style.checkedFocused;
      else
        background = style.checked;
    } else if (isOver() && style.over != null)
      background = style.over;
    else if (focused && style.focused != null)
      background = style.focused;
    else
      background = style.up;
  }
  setBackground(background);
}

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

public void setStyle (ButtonStyle style) {
  if (style == null) throw new IllegalArgumentException("style cannot be null.");
  this.style = style;
  Drawable background = null;
  if (isPressed() && !isDisabled())
    background = style.down == null ? style.up : style.down;
  else {
    if (isDisabled() && style.disabled != null)
      background = style.disabled;
    else if (isChecked && style.checked != null) {
      if (isOver() && style.checkedOver != null)
        background = style.checkedOver;
      else if (focused && style.checkedFocused != null)
        background = style.checkedFocused;
      else
        background = style.checked;
    } else if (isOver() && style.over != null)
      background = style.over;
    else if (focused && style.focused != null)
      background = style.focused;
    else
      background = style.up;
  }
  setBackground(background);
}

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

boolean isPressed = isPressed();
boolean isChecked = isChecked();
boolean isOver = isOver();

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

boolean isPressed = isPressed();
boolean isChecked = isChecked();
boolean isOver = isOver();

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

@Override
public boolean isOver () {
  if (containerMenu == null || containerMenu.getActiveItem() == null) {
    return super.isOver();
  } else {
    return containerMenu.getActiveItem() == this;
  }
}

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

@Override
public boolean isOver() {
  if (containerMenu == null || containerMenu.getActiveItem() == null) {
    return super.isOver();
  } else {
    return containerMenu.getActiveItem() == this;
  }
}

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

public void setStyle (ButtonStyle style) {
  if (style == null) throw new IllegalArgumentException("style cannot be null.");
  this.style = style;
  Drawable background = null;
  if (isPressed() && !isDisabled())
    background = style.down == null ? style.up : style.down;
  else {
    if (isDisabled() && style.disabled != null)
      background = style.disabled;
    else if (isChecked && style.checked != null) {
      if (isOver() && style.checkedOver != null)
        background = style.checkedOver;
      else if (focused && style.checkedFocused != null)
        background = style.checkedFocused;
      else
        background = style.checked;
    } else if (isOver() && style.over != null)
      background = style.over;
    else if (focused && style.focused != null)
      background = style.focused;
    else
      background = style.up;
  }
  setBackground(background);
}

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

boolean isPressed = isPressed();
boolean isChecked = isChecked();
boolean isOver = isOver();

相关文章