public class GGPushButton extends GGButtonBase
| Constructor and Description |
|---|
GGPushButton(java.lang.String buttonImage)
Creates a button from the given sprite images.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPushButtonListener(GGPushButtonListener listener)
Registers a GGPushButtonListener to get notifications when the button
is manipulated.
|
boolean |
isPressed()
Returns the current state of the ButtonA.
|
void |
setRepeatDelay(int delayTime)
Sets the delay between the buttonPressed event until the first buttonRepeat event.
|
void |
setRepeatPeriod(int period)
Sets the period of succeeding buttonRepeated() notifications.
|
isEnabled, setEnabled, setHotspotArea, setRefreshEnabledact, addActorCollisionListener, addActorTouchListener, addActorTouchListener, addBorderListener, addCollisionActor, addCollisionActors, addCollisionTile, addCollisionTiles, addTileCollisionListener, collide, collide, containsPixel, 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, getRotatedImage, getRotatedPosition, getRotationIndex, getScaledImage, getScaledImage, getScaledImage, getSlowDown, getWidth, getX, getXStart, getY, getYStart, getZoomedImage, hide, isActEnabled, isActorCollisionEnabled, isHorzMirror, isInGrid, isMoveValid, isNearBorder, isRemoved, isRotatable, isTileCollisionEnabled, isVertMirror, isVisible, move, move, nearBorder, removeSelf, reset, rotate, rotate, setActEnabled, setActorCollisionEnabled, setActorTouchCircle, setActorTouchCircle, setActorTouchEnabled, setActorTouchImage, setActorTouchImage, setActorTouchRectangle, setActorTouchRectangle, setCollisionCircle, setCollisionCircle, setCollisionImage, setCollisionImage, setCollisionLine, setCollisionLine, setCollisionRectangle, setCollisionRectangle, setCollisionSpot, setCollisionSpot, setDirection, setDirection, setDisplacePosition, setHorzMirror, setLocation, setLocationOffset, setLocationOffset, setOnBottom, setOnTop, setPixelLocation, setSlowDown, setTileCollisionEnabled, setVertMirror, setX, setY, show, show, showNextSprite, showPreviousSprite, turnpublic GGPushButton(java.lang.String buttonImage)
buttonImage - the filename or URL of the two spritespublic boolean isPressed()
public void addPushButtonListener(GGPushButtonListener listener)
listener - the GGButtonListener to registerpublic void setRepeatPeriod(int period)
period - the time between buttonRepeat() notifications (in ms, default: 200 ms)public void setRepeatDelay(int delayTime)
delayTime - the delay until the first buttonRepeat() notification is generated (in ms, default: 400 ms)