Class Button


public class Button extends Sprite
Button Class - Used to add a button into a Game
  • Constructor Details

    • Button

      public Button(processing.core.PApplet p, String shape, float x, float y, float w, float h, String text)
  • Method Details

    • show

      public void show()
      Description copied from class: Sprite
      Displays the Sprite image on the screen
      Overrides:
      show in class Sprite
    • isClicked

      public boolean isClicked()
    • isMouseOverButton

      public boolean isMouseOverButton()
    • setText

      public void setText(String text)
    • setTextColor

      public void setTextColor(int color)
    • setFontStyle

      public void setFontStyle(String fontStyleFile)
    • setFontFactor

      public void setFontFactor(float ff)
    • setButtonColor

      public void setButtonColor(int color)
    • setOutlineColor

      public void setOutlineColor(int color)
    • setHoverHighlight

      public void setHoverHighlight(boolean highlight)
    • setHoverColor

      public void setHoverColor(Integer color)
    • setClickHighlight

      public void setClickHighlight(boolean b)
    • setClickColor

      public void setClickColor(Integer color)
    • setVisible

      public void setVisible(boolean visible)
    • setShapeRounding

      public void setShapeRounding(float shapeRounding)
    • toString

      public String toString()
      Overrides:
      toString in class Sprite
      Returns:
      String includes Sprite's filename, centerX, centerY, left edge, top edge, speedX, speedY, w, h, isAnimated