public class LayoutState
extends java.lang.Object
Constructor and Description |
---|
LayoutState(UiContainerRenderTree uiContainerRenderTree,
com.badlogic.gdx.assets.AssetManager assetManager,
UiTheme theme,
ScreenSize screenSize,
int totalColumns,
float parentWidth,
boolean screenSizeChanged) |
Modifier and Type | Method and Description |
---|---|
com.badlogic.gdx.assets.AssetManager |
getAssetManager()
Returns the
AssetManager belonging to the UiContainer |
float |
getColumnWidth(int columns)
Returns the pixel width for a given column amount
|
ControllerType |
getLastControllerType() |
InputSource |
getLastInputSource() |
float |
getParentWidth()
Returns the width of the parent
UiElement |
ScreenSize |
getScreenSize()
Returns the current
ScreenSize |
float |
getScreenSizeScale()
Returns the scale to apply to
ScreenSize |
UiTheme |
getTheme()
Returns the current
UiTheme |
int |
getTotalColumns()
Returns the total columns the UI is split into
|
UiContainerRenderTree |
getUiContainerRenderTree()
Returns the
UiContainerRenderTree |
boolean |
isScreenSizeChanged()
Returns if the layout was triggered by a
ScreenSize change |
void |
setParentWidth(float parentWidth)
Sets the width of the parent
UiElement |
java.lang.String |
toString() |
public LayoutState(UiContainerRenderTree uiContainerRenderTree, com.badlogic.gdx.assets.AssetManager assetManager, UiTheme theme, ScreenSize screenSize, int totalColumns, float parentWidth, boolean screenSizeChanged)
public float getParentWidth()
UiElement
public void setParentWidth(float parentWidth)
UiElement
parentWidth
- public com.badlogic.gdx.assets.AssetManager getAssetManager()
AssetManager
belonging to the UiContainer
public ScreenSize getScreenSize()
ScreenSize
public float getScreenSizeScale()
ScreenSize
public int getTotalColumns()
public float getColumnWidth(int columns)
columns
- The amount of columnspublic UiContainerRenderTree getUiContainerRenderTree()
UiContainerRenderTree
public InputSource getLastInputSource()
public ControllerType getLastControllerType()
public boolean isScreenSizeChanged()
ScreenSize
changeScreenSize
changepublic java.lang.String toString()
toString
in class java.lang.Object