public class GGButton extends GGButtonBase
Constructor and Description |
---|
GGButton(java.lang.String buttonImage)
Same as GGButton(String buttonImage, false) (no rollover).
|
GGButton(java.lang.String buttonImage,
boolean isRollover)
Creates a button from the given sprite images.
|
Modifier and Type | Method and Description |
---|---|
void |
addButtonListener(GGButtonListener listener)
Registers a GGButtonListener to get notifications when the button
is manipulated.
|
void |
addButtonOverListener(GGButtonOverListener listener)
Registers a GGOverButtonListener to get notifications when the mouse cursor
enters the active mouse area.
|
boolean |
isPressed()
Returns the current state of the ButtonA.
|
isEnabled, setEnabled, setHotspotArea, setRefreshEnabled
act, addActorCollisionListener, addBorderListener, addCollisionActor, addCollisionActors, addCollisionTile, addCollisionTiles, addMouseTouchListener, addMouseTouchListener, addTileCollisionListener, collide, collide, delay, displace, getBackground, getCollisionActors, getCollisionActorsInRange, getCollisionTiles, getCurrentImage, getDirection, getDirectionStart, getDisplacePosition, getHeight, getIdVisible, getImage, getImage, getIntDirection, getLocation, getLocationOffset, getLocationStart, getNbCycles, getNbHorzCells, getNbSprites, getNbVertCells, getNeighbours, getNeighbours, getNextMoveLocation, getPixelColor, getPixelLocation, getRotatedPosition, getRotationIndex, getScaledImage, getScaledImage, getScaledImage, getSlowDown, getWidth, getX, getXStart, getY, getYStart, hide, isActEnabled, isActorCollisionEnabled, isHorzMirror, isInGrid, isMoveValid, isNearBorder, isRemoved, isRotatable, isTileCollisionEnabled, isVertMirror, isVisible, move, move, nearBorder, removeSelf, reset, rotate, rotate, setActEnabled, setActorCollisionEnabled, setCollisionCircle, setCollisionCircle, setCollisionImage, setCollisionImage, setCollisionLine, setCollisionLine, setCollisionRectangle, setCollisionRectangle, setCollisionSpot, setCollisionSpot, setDirection, setDirection, setDisplacePosition, setHorzMirror, setLocation, setLocationOffset, setLocationOffset, setMouseTouchCircle, setMouseTouchCircle, setMouseTouchEnabled, setMouseTouchImage, setMouseTouchImage, setMouseTouchRectangle, setMouseTouchRectangle, setOnBottom, setOnTop, setPixelLocation, setSlowDown, setTileCollisionEnabled, setVertMirror, setX, setY, show, show, showNextSprite, showPreviousSprite, turn
public GGButton(java.lang.String buttonImage, boolean isRollover)
buttonImage
- the filename or URL of the 2 or 3 button spritesisRollover
- if true, a rollover image is usedpublic GGButton(java.lang.String buttonImage)
buttonImage
- the filename or URL of the 2 button spritespublic boolean isPressed()
public void addButtonListener(GGButtonListener listener)
listener
- the GGButtonListener to registerpublic void addButtonOverListener(GGButtonOverListener listener)
listener
- the GGButtonOverListener to register