Class SizeFitter
Simple script for resizing UI elements based on the childrens' sizes. Used for resizing the elements in the log (e.g. when there is a text block).
Inheritance
object
SizeFitter
Namespace: AS2.UI
Assembly: .dll
Syntax
public class SizeFitter : MonoBehaviour
Fields
| Edit this page View SourceresizeCentralizedInFrameAmount
Declaration
private int resizeCentralizedInFrameAmount
Field Value
Type | Description |
---|---|
int |
resizeInFrameAmount
Declaration
private int resizeInFrameAmount
Field Value
Type | Description |
---|---|
int |
updateHeight
Declaration
public bool updateHeight
Field Value
Type | Description |
---|---|
bool |
updateWidth
Declaration
public bool updateWidth
Field Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceResize()
Internal normal resizing.
Declaration
private void Resize()
ResizeCentralized()
Internal centralized resizing.
Declaration
private void ResizeCentralized()
ResizeCentralizedInFrameAmount(int)
Centralized resizing assumes all children for a horizontal line (please disable updateWidth) or vertical line (please disable updateHeight) and are automatically oriented towards the center.
Declaration
public void ResizeCentralizedInFrameAmount(int frameAmount)
Parameters
Type | Name | Description |
---|---|---|
int | frameAmount |
ResizeInFrameAmount(int)
Normal resizing (probably) assumes all coordinates are set in world space and true coordinates are set. Not 100% sure though, got most of this from Stackoverflow.
Declaration
public void ResizeInFrameAmount(int frameAmount)
Parameters
Type | Name | Description |
---|---|---|
int | frameAmount |
SetUpdatedValues(bool, bool)
Declaration
public void SetUpdatedValues(bool updateWidth, bool updateHeight)
Parameters
Type | Name | Description |
---|---|---|
bool | updateWidth | |
bool | updateHeight |
Update()
Declaration
public void Update()