public class Dialog extends Window
result(Object)
is called and the dialog is removed from the stage.Window.WindowStyle
Table.Debug, Table.DebugRect
backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColor
Constructor and Description |
---|
Dialog(String title,
Skin skin) |
Dialog(String title,
Skin skin,
String windowStyleName) |
Dialog(String title,
Window.WindowStyle windowStyle) |
Modifier and Type | Method and Description |
---|---|
Dialog |
button(Button button)
Adds the given button to the button table.
|
Dialog |
button(Button button,
Object object)
Adds the given button to the button table.
|
Dialog |
button(String text)
Adds a text button to the button table.
|
Dialog |
button(String text,
Object object)
Adds a text button to the button table.
|
Dialog |
button(String text,
Object object,
TextButton.TextButtonStyle buttonStyle)
Adds a text button to the button table.
|
void |
cancel() |
Table |
getButtonTable() |
Table |
getContentTable() |
void |
hide()
Hides the dialog.
|
void |
hide(Action action)
Removes the dialog from the stage, restoring the previous keyboard and scroll focus, and adds the specified action to the
dialog.
|
Dialog |
key(int keycode,
Object object)
If this key is pressed,
result(Object) is called with the specified object. |
void |
setObject(Actor actor,
Object object) |
Dialog |
show(Stage stage)
Centers the dialog in the stage and calls
show(Stage, Action) with a Actions.fadeIn(float, Interpolation)
action. |
Dialog |
show(Stage stage,
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. |
Dialog |
text(Label label)
Adds the given Label to the content table
|
Dialog |
text(String text)
Adds a label to the content table.
|
Dialog |
text(String text,
Label.LabelStyle labelStyle)
Adds a label to the content table.
|
draw, getPrefWidth, getStyle, getTitleLabel, getTitleTable, hit, isDragging, isModal, isMovable, isResizable, keepWithinStage, setKeepWithinStage, setModal, setMovable, setResizable, setResizeBorder, setStyle
add, add, add, add, add, add, add, align, background, background, bottom, center, clearChildren, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, drawDebug, 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, reset, right, row, setBackground, setBackground, setClip, setDebug, setRound, setSkin, stack, top
getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, validate
act, addActor, addActorAfter, addActorAt, addActorBefore, clear, findActor, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString
addAction, addCaptureListener, addListener, ancestorsVisible, 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, hasParent, isAscendantOf, isDescendantOf, isTouchable, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
public Dialog(String title, Window.WindowStyle windowStyle)
public Table getContentTable()
public Table getButtonTable()
public Dialog text(String text)
public Dialog text(String text, Label.LabelStyle labelStyle)
public Dialog button(String text)
result(Object)
if this button is clicked. The
dialog must have been constructed with a skin to use this method.public Dialog button(String text, Object object)
object
- The object that will be passed to result(Object)
if this button is clicked. May be null.public Dialog button(String text, Object object, TextButton.TextButtonStyle buttonStyle)
object
- The object that will be passed to result(Object)
if this button is clicked. May be null.public Dialog button(Button button, Object object)
object
- The object that will be passed to result(Object)
if this button is clicked. May be null.public Dialog show(Stage stage, 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 Dialog show(Stage stage)
show(Stage, Action)
with a Actions.fadeIn(float, Interpolation)
action.public void hide(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 Dialog key(int keycode, Object object)
result(Object)
is called with the specified object.Input.Keys
public void cancel()
Copyright © 2018. All rights reserved.