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

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

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

Button.draw介绍

暂无

代码示例

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  super.draw(batch, parentAlpha);
}

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

public void draw (Batch batch, float parentAlpha) {
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

@Override
public void draw (Batch batch, float parentAlpha) {
  updateImage();
  super.draw(batch, parentAlpha);
  if (focusBorderEnabled && drawBorder && style.focusBorder != null)
    style.focusBorder.draw(batch, getX(), getY(), getWidth(), getHeight());
}

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

public void draw (Batch batch, float parentAlpha) {
  updateImage();
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
}

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

@Override
public void draw (Batch batch, float parentAlpha) {
  updateImage();
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked() && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  super.draw(batch, parentAlpha);
  if (focusBorderEnabled && drawBorder && style.focusBorder != null)
    style.focusBorder.draw(batch, getX(), getY(), getWidth(), getHeight());
}

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

@Override
public void draw (Batch batch, float parentAlpha) {
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked() && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null) label.getStyle().fontColor = fontColor;
  if (isDisabled())
    shortcutLabel.getStyle().fontColor = style.disabledFontColor;
  else
    shortcutLabel.getStyle().fontColor = shortcutLabelColor;
  if (image != null && generateDisabledImage) {
    if (isDisabled())
      image.setColor(Color.GRAY);
    else
      image.setColor(Color.WHITE);
  }
  super.draw(batch, parentAlpha);
}

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

@Override
public void draw(Batch batch, float parentAlpha) {
  Color fontColor;
  if (isDisabled() && style.disabledFontColor != null)
    fontColor = style.disabledFontColor;
  else if (isPressed() && style.downFontColor != null)
    fontColor = style.downFontColor;
  else if (isChecked() && style.checkedFontColor != null)
    fontColor = (isOver() && style.checkedOverFontColor != null) ? style.checkedOverFontColor : style.checkedFontColor;
  else if (isOver() && style.overFontColor != null)
    fontColor = style.overFontColor;
  else
    fontColor = style.fontColor;
  if (fontColor != null)
    label.getStyle().fontColor = fontColor;
  if (isDisabled())
    shortcutLabel.getStyle().fontColor = style.disabledFontColor;
  else
    shortcutLabel.getStyle().fontColor = shortcutLabelColor;
  if (image != null && generateDisabledImage) {
    if (isDisabled())
      image.setColor(Color.GRAY);
    else
      image.setColor(Color.WHITE);
  }
  super.draw(batch, parentAlpha);
}

相关文章