Package com.prineside.tdi2.ui.actors
Class Window
java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.Group
com.prineside.tdi2.scene2d.ui.WidgetGroup
com.prineside.tdi2.scene2d.ui.Table
com.prineside.tdi2.ui.actors.Window
- Direct Known Subclasses:
EnemyViewer
,ListClassUsagesWindow
,ListenerGroupViewer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static class
Nested classes/interfaces inherited from class com.prineside.tdi2.scene2d.ui.Table
Table.Debug, Table.DebugRect
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
float
float
float
Fields inherited from class com.prineside.tdi2.scene2d.ui.Table
backgroundBottom, backgroundLeft, backgroundRight, backgroundTop, debugActorColor, debugCellColor, debugTableColor
-
Constructor Summary
ConstructorsConstructorDescriptionWindow()
Window
(Window.WindowStyle style) Will be automatically brought to front when shown. -
Method Summary
Modifier and TypeMethodDescriptionvoid
act
(float delta) Updates the actor based on time.void
addListener
(Window.WindowListener listener) void
alignToPoint
(float x, float y, int align) void
boolean
void
close()
Close the window.void
fitToContent
(int cornerPivot, boolean horizontally, boolean vertically, boolean currentSizeIsMin) void
Same as fitToContent using current window align, both vertically and horizontally.void
flash()
static Rectangle
getContentBox
(Rectangle out) int
int
float
Zero indicates no max height.float
Zero indicates no max width.float
float
getStyle()
getTitle()
int
boolean
boolean
static Rectangle
moveIntoViewport
(Rectangle rect, Vector2 viewportSize) void
void
removeListener
(Window.WindowListener listener) void
setAnimated
(boolean animated) void
setAppearAlign
(int align) void
setContents
(Actor v) void
setDraggable
(boolean enabled) void
setPosition
(float x, float y) Sets the position of the actor's bottom left corner.void
setPosition
(float x, float y, int pivot) Sets the position using the specifiedalignment
.void
setPositionByCorner
(int corner, float x, float y) void
setResizeable
(boolean enabled) void
setSize
(float width, float height) Sets the width and height.void
setTitle
(CharSequence str) Also updates names of the main inner actorsvoid
show()
void
void
showAtPoint
(float x, float y) void
showAtPointAligned
(float x, float y, int align) toString()
Returns a description of the actor hierarchy, recursively.Methods inherited from class com.prineside.tdi2.scene2d.ui.Table
add, add, add, align, background, bottom, center, clearChildren, clip, clip, columnDefaults, debug, debug, debugActor, debugAll, debugCell, debugTable, defaults, draw, drawDebug, getAlign, getBackground, getCell, getCells, getClip, getColumnMinWidth, getColumnPrefWidth, getColumns, getColumnWidth, getPadBottom, getPadBottomValue, getPadLeft, getPadLeftValue, getPadRight, getPadRightValue, getPadTop, getPadTopValue, getPadX, getPadY, getPrefHeight, getPrefWidth, getRow, getRowHeight, getRowMinHeight, getRowPrefHeight, getRows, getTableDebug, hit, invalidate, layout, left, pad, pad, pad, pad, padBottom, padBottom, padLeft, padLeft, padRight, padRight, padTop, padTop, removeActor, removeActor, removeActorAt, reset, right, row, setBackground, setClip, setDebug, setRound, stack, top
Methods inherited from class com.prineside.tdi2.scene2d.ui.WidgetGroup
getMaxHeightValue, getMaxWidthValue, getMinHeightValue, getMinWidthValue, getPrefHeightValue, getPrefWidthValue, invalidateHierarchy, needsLayout, pack, setFillParent, setLayoutEnabled, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setPrefHeight, setPrefHeight, setPrefWidth, setPrefWidth, setWidth, validate
Methods inherited from class com.prineside.tdi2.scene2d.Group
addActor, addActorAfter, addActorAt, addActorBefore, clear, clear, clearChildren, findActor, getChild, getChildren, getCullingArea, hasChildren, isTransform, localToDescendantCoordinates, setCullingArea, setDebug, setTransform, swapActor, swapActor
Methods inherited from class com.prineside.tdi2.scene2d.Actor
addAction, 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, remove, removeAction, removeCaptureListener, removeListener, rotateBy, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setRotation, setScale, setScale, setScaleX, setScaleY, setTouchable, setUserObject, setVisible, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, toBack, toFront
-
Field Details
-
headerLayout
-
title
-
main
-
minWidth
public float minWidth -
minHeight
public float minHeight -
maxWidth
public float maxWidth -
maxHeight
public float maxHeight
-
-
Constructor Details
-
Window
public Window() -
Window
Will be automatically brought to front when shown. UiLayer will be removed when this window is disposed - create new layer for every new window
-
-
Method Details
-
getScrollPane
-
setCloseHandler
-
getStyle
-
getHeaderHeight
public int getHeaderHeight() -
getContentHeight
public int getContentHeight() -
setContents
-
getContents
-
positionChanged
public void positionChanged() -
setResizeable
public void setResizeable(boolean enabled) -
setDraggable
public void setDraggable(boolean enabled) -
flash
public void flash() -
bringToFront
public void bringToFront() -
getBox
-
getBox
-
getContentBox
-
addListener
-
removeListener
-
getWindowListeners
-
setTitle
Also updates names of the main inner actors -
getTitle
-
setAnimated
public void setAnimated(boolean animated) -
isAnimated
public boolean isAnimated() -
isResizeable
public boolean isResizeable() -
setAppearAlign
public void setAppearAlign(int align) -
alignToPoint
public void alignToPoint(float x, float y, int align) -
showAtCursor
public void showAtCursor() -
show
public void show() -
showAtPoint
public void showAtPoint(float x, float y) -
showAtPointAligned
public void showAtPointAligned(float x, float y, int align) -
getWindowAlign
public int getWindowAlign() -
close
public void close()Close the window. The window will be hidden and won't be removed from the scene. If you want it to be removed, add a WindowListener (closed) and call window.remove() there. If closeHandler is set, it will be called first and may cancel the effect of close() -
fitToContentSimple
public void fitToContentSimple()Same as fitToContent using current window align, both vertically and horizontally. Current size is not treated as a min size. -
fitToContent
public void fitToContent(int cornerPivot, boolean horizontally, boolean vertically, boolean currentSizeIsMin) -
setPositionByCorner
public void setPositionByCorner(int corner, float x, float y) -
setPosition
public void setPosition(float x, float y, int pivot) Description copied from class:Actor
Sets the position using the specifiedalignment
. Note this may set the position to non-integer coordinates.- Overrides:
setPosition
in classActor
-
clampWindowPosition
public boolean clampWindowPosition() -
act
public void act(float delta) Description copied from class:Actor
Updates the actor based on time. Typically this is called each frame byStage.act(float)
.The default implementation calls
Action.act(float)
on each action and removes actions that are complete. -
setPosition
public void setPosition(float x, float y) Description copied from class:Actor
Sets the position of the actor's bottom left corner.- Overrides:
setPosition
in classActor
-
setSize
public void setSize(float width, float height) Description copied from class:Actor
Sets the width and height. -
getMinWidth
public float getMinWidth()- Specified by:
getMinWidth
in interfaceLayout
- Overrides:
getMinWidth
in classTable
-
getMinHeight
public float getMinHeight()- Specified by:
getMinHeight
in interfaceLayout
- Overrides:
getMinHeight
in classTable
-
getMaxWidth
public float getMaxWidth()Description copied from interface:Layout
Zero indicates no max width.- Specified by:
getMaxWidth
in interfaceLayout
- Overrides:
getMaxWidth
in classWidgetGroup
-
getMaxHeight
public float getMaxHeight()Description copied from interface:Layout
Zero indicates no max height.- Specified by:
getMaxHeight
in interfaceLayout
- Overrides:
getMaxHeight
in classWidgetGroup
-
toString
Description copied from class:Group
Returns a description of the actor hierarchy, recursively. -
moveIntoViewport
-