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.tablelayout.Table
com.badlogic.gdx.scenes.scene2d.ui.Button
com.badlogic.gdx.scenes.scene2d.ui.TextButton
- All Implemented Interfaces:
- Cullable, Layout
- Direct Known Subclasses:
- CheckBox
public class TextButton
- extends Button
A button with a child Label
to display text.
- Author:
- Nathan Sweet
Fields inherited from class com.badlogic.gdx.scenes.scene2d.ui.tablelayout.Table |
clip, isPressed |
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Group |
batchTransform, children, cullingArea, debug, debugTexture, groups, immutableChildren, immutableGroups, lastTouchedChild, localTransform, namesToActors, oldBatchTransform, point, transform, worldTransform |
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
actions, color, height, name, originX, originY, parent, rotation, scaleX, scaleY, stage, touchable, visible, width, x, y |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.ui.tablelayout.Table |
add, add, add, align, align, bottom, center, clear, click, columnDefaults, debug, debug, debug, defaults, drawBackground, drawDebug, getAlign, getAllCells, getAllCells, getBackgroundPatch, getCell, getCell, getCells, getClickListener, getDebug, getHeight, getPadBottom, getPadLeft, getPadRight, getPadTop, getRow, getTableLayout, getWidget, getWidgets, getWidgets, height, height, invalidate, layout, left, newTable, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, parse, parse, register, reset, right, row, setAssetManager, setBackground, setClip, setSkin, setWidget, size, size, stack, top, touchDown, touchUp, width, width |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group |
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, disableDebugging, drawChild, drawChildren, enableDebugging, findActor, getActors, getGroups, hit, isDescendant, removeActor, removeActorRecursive, resetTransform, setCullingArea, sortChildren, swapActor, swapActor, toChildCoordinates, toLocalCoordinates, touchMoved, updateTransform |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
action, clearActions, getStage, isMarkedToRemove, keyDown, keyTyped, keyUp, markToRemove, remove, scrolled, toLocalCoordinates, toString, touchDragged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TextButton
public TextButton(Skin skin)
TextButton
public TextButton(java.lang.String text,
Skin skin)
TextButton
public TextButton(java.lang.String text,
TextButton.TextButtonStyle style)
TextButton
public TextButton(java.lang.String text,
TextButton.TextButtonStyle style,
java.lang.String name)
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
- Parameters:
batch
- the spritebatch to render withparentAlpha
- the parent's alpha value.
getLabel
public Label getLabel()
getLabelCell
public Cell getLabelCell()
setText
public void setText(java.lang.String text)
getText
public java.lang.CharSequence getText()
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)