public class TextraDialog extends TextraWindow
result(Object) is called and the dialog is removed from the stage.| Modifier and Type | Field and Description |
|---|---|
protected com.badlogic.gdx.scenes.scene2d.InputListener |
ignoreTouchDown |
dragging, edge, font| Constructor and Description |
|---|
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin) |
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
Font replacementFont) |
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
java.lang.String windowStyleName) |
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
java.lang.String windowStyleName,
Font replacementFont) |
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle windowStyle) |
TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle windowStyle,
Font replacementFont) |
| Modifier and Type | Method and Description |
|---|---|
TextraDialog |
button(com.badlogic.gdx.scenes.scene2d.ui.Button button)
Adds the given button to the button table.
|
TextraDialog |
button(com.badlogic.gdx.scenes.scene2d.ui.Button button,
java.lang.Object object)
Adds the given button to the button table.
|
TextraDialog |
button(java.lang.String text)
Adds a text button to the button table.
|
TextraDialog |
button(java.lang.String text,
java.lang.Object object)
Adds a text button to the button table.
|
TextraDialog |
button(java.lang.String text,
java.lang.Object object,
com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle buttonStyle)
Adds a text button to the button table.
|
void |
cancel() |
com.badlogic.gdx.scenes.scene2d.ui.Table |
getButtonTable() |
com.badlogic.gdx.scenes.scene2d.ui.Table |
getContentTable() |
void |
hide()
Hides the dialog.
|
void |
hide(com.badlogic.gdx.scenes.scene2d.Action action)
Removes the dialog from the stage, restoring the previous keyboard and scroll focus, and adds the specified action to the
dialog.
|
TextraDialog |
key(int keycode,
java.lang.Object object)
If this key is pressed,
result(Object) is called with the specified object. |
protected TextraLabel |
newLabel(java.lang.String text,
Font font,
com.badlogic.gdx.graphics.Color color) |
protected TextraLabel |
newLabel(java.lang.String text,
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style) |
protected TypingLabel |
newTypingLabel(java.lang.String text,
Font font,
com.badlogic.gdx.graphics.Color color) |
protected TypingLabel |
newTypingLabel(java.lang.String text,
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style) |
protected void |
result(java.lang.Object object)
Called when a button is clicked.
|
void |
setObject(com.badlogic.gdx.scenes.scene2d.Actor actor,
java.lang.Object object) |
protected void |
setStage(com.badlogic.gdx.scenes.scene2d.Stage stage) |
TextraDialog |
show(com.badlogic.gdx.scenes.scene2d.Stage stage)
Centers the dialog in the stage and calls
show(Stage, Action) with a Actions.fadeIn(float, Interpolation)
action. |
TextraDialog |
show(com.badlogic.gdx.scenes.scene2d.Stage stage,
com.badlogic.gdx.scenes.scene2d.Action action)
Packs the dialog (but doesn't set the position), adds it to the stage, sets it as the keyboard and scroll
focus, clears any actions on the dialog, and adds the specified action to it. |
TextraDialog |
text(java.lang.String text)
Adds a TextraLabel to the content table.
|
TextraDialog |
text(java.lang.String text,
Font font)
Adds a TextraLabel to the content table.
|
TextraDialog |
text(java.lang.String text,
Font font,
com.badlogic.gdx.graphics.Color color)
Adds a TextraLabel to the content table.
|
TextraDialog |
text(java.lang.String text,
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle)
Adds a TextraLabel to the content table.
|
TextraDialog |
text(TextraLabel label)
Adds the given TextraLabel to the content table.
|
TextraDialog |
typing(java.lang.String text)
Adds a TypingLabel to the content table.
|
TextraDialog |
typing(java.lang.String text,
Font font)
Adds a TypingLabel to the content table.
|
TextraDialog |
typing(java.lang.String text,
Font font,
com.badlogic.gdx.graphics.Color color)
Adds a TypingLabel to the content table.
|
TextraDialog |
typing(java.lang.String text,
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle)
Adds a TypingLabel to the content table.
|
TextraDialog |
typing(TypingLabel label)
Adds the given TypingLabel to the content table.
|
draw, drawBackground, drawStageBackground, getPrefWidth, getStyle, getTitleLabel, getTitleTable, hit, isDragging, isModal, isMovable, isResizable, keepWithinStage, setKeepWithinStage, setModal, setMovable, setResizable, setResizeBorder, setStyle, setStyle, setStyleadd, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, drawDebug, drawDebugBounds, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getPrefHeight, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getSkin, getTableDebug, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, topchildrenChanged, getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validateact, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, clear, clearChildren, computeTransform, drawChildren, drawDebugChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setTransform, swapActor, swapActor, toStringaddAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFrontprotected com.badlogic.gdx.scenes.scene2d.InputListener ignoreTouchDown
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin)
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
java.lang.String windowStyleName)
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle windowStyle)
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
Font replacementFont)
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Skin skin,
java.lang.String windowStyleName,
Font replacementFont)
public TextraDialog(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle windowStyle,
Font replacementFont)
protected TextraLabel newLabel(java.lang.String text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style)
newLabel in class TextraWindowprotected TextraLabel newLabel(java.lang.String text, Font font, com.badlogic.gdx.graphics.Color color)
newLabel in class TextraWindowprotected TypingLabel newTypingLabel(java.lang.String text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style)
protected TypingLabel newTypingLabel(java.lang.String text, Font font, com.badlogic.gdx.graphics.Color color)
protected void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
setStage in class com.badlogic.gdx.scenes.scene2d.Grouppublic com.badlogic.gdx.scenes.scene2d.ui.Table getContentTable()
public com.badlogic.gdx.scenes.scene2d.ui.Table getButtonTable()
public TextraDialog text(@Null java.lang.String text)
public TextraDialog text(@Null java.lang.String text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle)
public TextraDialog text(@Null java.lang.String text, Font font)
public TextraDialog text(@Null java.lang.String text, Font font, com.badlogic.gdx.graphics.Color color)
public TextraDialog text(TextraLabel label)
label - a non-null TextraLabelpublic TextraDialog typing(@Null java.lang.String text)
public TextraDialog typing(@Null java.lang.String text, com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle labelStyle)
public TextraDialog typing(@Null java.lang.String text, Font font)
public TextraDialog typing(@Null java.lang.String text, Font font, com.badlogic.gdx.graphics.Color color)
public TextraDialog typing(TypingLabel label)
label - a non-null TypingLabelpublic TextraDialog button(@Null java.lang.String text)
result(Object) if this button is clicked. The
dialog must have been constructed with a skin to use this method.public TextraDialog button(@Null java.lang.String text, @Null java.lang.Object object)
object - The object that will be passed to result(Object) if this button is clicked. May be null.public TextraDialog button(@Null java.lang.String text, @Null java.lang.Object object, com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle buttonStyle)
object - The object that will be passed to result(Object) if this button is clicked. May be null.public TextraDialog button(com.badlogic.gdx.scenes.scene2d.ui.Button button)
public TextraDialog button(com.badlogic.gdx.scenes.scene2d.ui.Button button, @Null java.lang.Object object)
object - The object that will be passed to result(Object) if this button is clicked. May be null.public TextraDialog show(com.badlogic.gdx.scenes.scene2d.Stage stage, @Null com.badlogic.gdx.scenes.scene2d.Action action)
Packs the dialog (but doesn't set the position), adds it to the stage, sets it as the keyboard and scroll
focus, clears any actions on the dialog, and adds the specified action to it. The previous keyboard and scroll focus are
remembered so they can be restored when the dialog is hidden.action - May be null.public TextraDialog show(com.badlogic.gdx.scenes.scene2d.Stage stage)
show(Stage, Action) with a Actions.fadeIn(float, Interpolation)
action.public void hide(@Null
com.badlogic.gdx.scenes.scene2d.Action action)
action - If null, the dialog is removed immediately. Otherwise, the dialog is removed when the action completes. The
dialog will not respond to touch down events during the action.public void hide()
public void setObject(com.badlogic.gdx.scenes.scene2d.Actor actor,
@Null
java.lang.Object object)
public TextraDialog key(int keycode, @Null java.lang.Object object)
result(Object) is called with the specified object.Input.Keysprotected void result(@Null
java.lang.Object object)
cancel() is called.object - The object specified when the button was added.public void cancel()