com.badlogic.gdx.scenes.scene2d.ui
Class TextButton
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
com.badlogic.gdx.scenes.scene2d.ui.Table
com.badlogic.gdx.scenes.scene2d.ui.Button
com.badlogic.gdx.scenes.scene2d.ui.TextButton
- All Implemented Interfaces:
- Cullable, Disableable, Layout
- Direct Known Subclasses:
- CheckBox
public class TextButton
- extends Button
A button with a child Label
to display text.
- Author:
- Nathan Sweet
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Button |
getClickListener, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, isChecked, isDisabled, isOver, isPressed, setChecked, setDisabled, toggle |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.Table |
add, add, add, add, add, add, align, bottom, center, clearChildren, columnDefaults, debug, debug, debugCell, debugTable, debugWidget, defaults, drawDebug, getAlign, getBackground, getCell, getCells, getClip, getDebug, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getRow, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, reset, right, row, setBackground, setBackground, setClip, setRound, setSkin, stack, top |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group |
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, findActor, getChildren, hasChildren, isTransform, localToDescendantCoordinates, print, setCullingArea, setTransform, swapActor, swapActor |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
addAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, getActions, getCaptureListeners, getColor, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotate, scale, scale, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setVisible, setWidth, setX, setY, setZIndex, size, size, stageToLocalCoordinates, toBack, toFront, toString, translate |
TextButton
public TextButton(String text,
Skin skin)
TextButton
public TextButton(String text,
Skin skin,
String styleName)
TextButton
public TextButton(String text,
TextButton.TextButtonStyle style)
setStyle
public void setStyle(Button.ButtonStyle style)
- Overrides:
setStyle
in class Button
getStyle
public TextButton.TextButtonStyle getStyle()
- Description copied from class:
Button
- Returns the button's style. Modifying the returned style may not have an effect until
Button.setStyle(ButtonStyle)
is
called.
- Overrides:
getStyle
in class Button
draw
public void draw(SpriteBatch batch,
float parentAlpha)
- Description copied from class:
WidgetGroup
- If this method is overridden, the super method or
WidgetGroup.validate()
should be called to ensure the widget group is laid
out.
- Overrides:
draw
in class Button
parentAlpha
- Should be multiplied with the actor's alpha, allowing a parent's alpha to affect all children.
getLabel
public Label getLabel()
getLabelCell
public Cell getLabelCell()
setText
public void setText(String text)
getText
public CharSequence getText()
Copyright © 2013. All Rights Reserved.