public class GGToggleButton extends GGButtonBase
| Constructor and Description | 
|---|
GGToggleButton(java.lang.String buttonImage)
Same as GGToggleButton(String buttonImage, false) (untoggled). 
 | 
GGToggleButton(java.lang.String buttonImage,
              boolean isToggled)
Creates a button from the given sprite images. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addToggleButtonListener(GGToggleButtonListener listener)
Registers a GGToggleButtonListener to get notifications when the button is manipulated. 
 | 
boolean | 
isToggled()
Returns the current state of the button. 
 | 
void | 
reset()
Overrides the actor's reset() called when the button is added to the game grid. 
 | 
void | 
setToggled(boolean b)
Sets the button in the toggled/untoggled state. 
 | 
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, 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 GGToggleButton(java.lang.String buttonImage,
              boolean isToggled)
buttonImage - the filename or URL of the two button spritesisToggled - if true, the button is initially toggled; otherwise it is untoggledpublic GGToggleButton(java.lang.String buttonImage)
buttonImage - the filename or URL of the 2 button spritespublic void reset()
public boolean isToggled()
public void setToggled(boolean b)
b - if true, the button is toggled; otherwise it is untoggledpublic void addToggleButtonListener(GGToggleButtonListener listener)
listener - the GGToggleButtonListener to register