Class Button
java.lang.Object
Sprite
Button
Button Class - Used to add a button into a Game
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
setButtonColor
(int color) void
setClickColor
(Integer color) void
setClickHighlight
(boolean b) void
setFontFactor
(float ff) void
setFontStyle
(String fontStyleFile) void
setHoverColor
(Integer color) void
setHoverHighlight
(boolean highlight) void
setOutlineColor
(int color) void
setShapeRounding
(float shapeRounding) void
void
setTextColor
(int color) void
setVisible
(boolean visible) void
show()
Displays the Sprite image on the screentoString()
Methods inherited from class Sprite
copy, copyTo, doesCollideBottom, equals, getAccelerationX, getAccelerationY, getCenterX, getCenterY, getH, getImage, getImagePath, getIsAnimated, getName, getSpeedX, getSpeedY, getW, getX, getY, isOverlapping, isSolid, isTouchingBottom, isTouchingBottom, isTouchingLeft, isTouchingLeft, isTouchingRight, isTouchingRight, isTouchingTop, isTouchingTop, jump, jump, jump, move, moveTo, resize, rotate, setAccelerationX, setAccelerationY, setCenterX, setCenterY, setH, setImage, setIsAnimated, setName, setSolid, setSpeed, setSpeedX, setSpeedY, setW, startGravity, startGravity, stopGravity, update, update
-
Constructor Details
-
Button
-
-
Method Details
-
show
public void show()Description copied from class:Sprite
Displays the Sprite image on the screen -
isClicked
public boolean isClicked() -
isMouseOverButton
public boolean isMouseOverButton() -
setText
-
setTextColor
public void setTextColor(int color) -
setFontStyle
-
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
-
setClickHighlight
public void setClickHighlight(boolean b) -
setClickColor
-
setVisible
public void setVisible(boolean visible) -
setShapeRounding
public void setShapeRounding(float shapeRounding) -
toString
-