public class VisWindow
extends com.badlogic.gdx.scenes.scene2d.ui.Window
Window
.Window
Modifier and Type | Field and Description |
---|---|
static float |
FADE_TIME |
Constructor and Description |
---|
VisWindow(java.lang.String title) |
VisWindow(java.lang.String title,
boolean showWindowBorder) |
VisWindow(java.lang.String title,
java.lang.String styleName) |
VisWindow(java.lang.String title,
com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle style) |
Modifier and Type | Method and Description |
---|---|
void |
addCloseButton()
Adds close button to window, next to window title.
|
boolean |
centerWindow()
Centers this window, if it has parent it will be done instantly, if it does not have parent it will be centered when it will
be added to stage
|
protected void |
close()
Called by window when close button was pressed (added using
addCloseButton() )
or escape key was pressed (for close on escape closeOnEscape() have to be called). |
void |
closeOnEscape()
Will make this window close when escape key or back key was pressed.
|
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch,
float parentAlpha) |
VisWindow |
fadeIn() |
VisWindow |
fadeIn(float time) |
void |
fadeOut()
Fade outs this window, when fade out animation is completed, window is removed from Stage
|
void |
fadeOut(float time)
Fade outs this window, when fade out animation is completed, window is removed from Stage.
|
boolean |
isKeepWithinParent() |
void |
setCenterOnAdd(boolean centerOnAdd) |
void |
setKeepWithinParent(boolean keepWithinParent) |
void |
setPosition(float x,
float y) |
protected void |
setStage(com.badlogic.gdx.scenes.scene2d.Stage stage) |
drawBackground, drawStageBackground, getPrefWidth, getStyle, getTitleLabel, getTitleTable, hit, isDragging, isModal, isMovable, isResizable, 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, drawDebugBounds, getAlign, getBackground, getCell, getCells, getClip, getColumns, getColumnWidth, getMinHeight, getMinWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getPrefHeight, getRow, getRowHeight, 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
childrenChanged, getMaxHeight, getMaxWidth, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, applyTransform, clear, computeTransform, drawChildren, drawDebugChildren, findActor, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, resetTransform, resetTransform, setCullingArea, setDebug, setTransform, swapActor, swapActor, toString
addAction, addCaptureListener, addListener, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, fire, 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, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setUserObject, setVisible, setWidth, setX, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
public VisWindow(java.lang.String title)
public VisWindow(java.lang.String title, boolean showWindowBorder)
public VisWindow(java.lang.String title, java.lang.String styleName)
public VisWindow(java.lang.String title, com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle style)
public void setPosition(float x, float y)
setPosition
in class com.badlogic.gdx.scenes.scene2d.Actor
public boolean centerWindow()
public void setCenterOnAdd(boolean centerOnAdd)
centerOnAdd
- if true window position will be centered on screen after adding to stagecenterWindow()
protected void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
setStage
in class com.badlogic.gdx.scenes.scene2d.Group
public void fadeOut(float time)
public VisWindow fadeIn(float time)
public void fadeOut()
public VisWindow fadeIn()
protected void close()
addCloseButton()
)
or escape key was pressed (for close on escape closeOnEscape()
have to be called).
Default close behaviour is to fade out window, this can be changed by overriding this function.public void addCloseButton()
close()
is called. If nothing
else was added to title table, and current title alignment is center then the title will be automatically centered.public void closeOnEscape()
close()
is called.
Back key is Android and iOS onlypublic boolean isKeepWithinParent()
public void setKeepWithinParent(boolean keepWithinParent)
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
draw
in class com.badlogic.gdx.scenes.scene2d.ui.Window