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).
Namespace: AS2.UI
Assembly: .dll
Syntax
public class SizeFitter : MonoBehaviour
Fields
resizeCentralizedInFrameAmount
Declaration
private int resizeCentralizedInFrameAmount
Field Value
resizeInFrameAmount
Declaration
private int resizeInFrameAmount
Field Value
updateHeight
Declaration
Field Value
updateWidth
Declaration
Field Value
Methods
Resize()
Internal normal resizing.
Declaration
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