public class SpriteButton extends Sprite
Constructor and Description |
---|
SpriteButton(float x,
float y,
com.badlogic.gdx.graphics.Texture texture)
A sprite which can be clicked on.
|
Modifier and Type | Method and Description |
---|---|
protected void |
onClicked()
Called whenever the Sprite is clicked on.
|
protected void |
onMouseEnter()
Called upon the mouse hovering over the sprite.
|
protected void |
onMouseExit()
Called upon a mouse leaving an image region.
|
act, draw, getPosition, getTexture, getX, getY, increaseX, increaseY, refreshBounds, setPosition, setTexture, setX, setY
addAction, addCaptureListener, addListener, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getY, getZIndex, hasParent, hit, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString
public SpriteButton(float x, float y, com.badlogic.gdx.graphics.Texture texture)
x
- xPosition on screeny
- yPosition on screentexture
- Image texture to useprotected void onClicked()
protected void onMouseEnter()
protected void onMouseExit()