FUILabel
extends FUIView
in package
How is a label different from a FUIText?
A label is supposed to be used to label form inputs in a uniform matter. Thats why a label has a fixed style according to the FlyUI theme.
Table of Contents
Properties
- $children : array<string|int, FUIView>
- An array of child views
- $padding : Vec4
- Padding is represented as a Vec4 x = left padding y = right padding z = top padding w = bottom padding
- $text : string
Methods
- __construct() : mixed
- Constructs a new view
- getEstimatedSize() : Vec2
- Returns the height of the current view and its children
- getLabelHeight() : float
- Return the label height (seperate method because its static)
- padding() : self
- Sets the views padding Padding is the space inside the view to its content
- paddingAll() : self
- Sets all padding values to the same value Padding is the space inside the view to its content
- paddingBottom() : self
- Sets the views bottom padding Padding is the space inside the view to its content
- paddingFull() : self
- Sets the views padding with individual values Padding is the space inside the view to its content
- paddingLeft() : self
- Sets the views left padding Padding is the space inside the view to its content
- paddingRight() : self
- Sets the views right padding Padding is the space inside the view to its content
- paddingTop() : self
- Sets the views top padding Padding is the space inside the view to its content
- paddingX() : self
- Sets the views horizontal padding (left and right) Padding is the space inside the view to its content
- paddingY() : self
- Sets the views vertical padding (top and bottom) Padding is the space inside the view to its content
- render() : void
- Renders the current view using the provided context
Properties
$children
An array of child views
public
array<string|int, FUIView>
$children
= []
$padding
Padding is represented as a Vec4 x = left padding y = right padding z = top padding w = bottom padding
public
Vec4
$padding
$text
public
string
$text
Methods
__construct()
Constructs a new view
public
__construct(string $text) : mixed
Parameters
- $text : string
getEstimatedSize()
Returns the height of the current view and its children
public
getEstimatedSize(FUIRenderContext $ctx) : Vec2
Note: This is used for layouting in some sizing modes
Parameters
- $ctx : FUIRenderContext
Return values
Vec2getLabelHeight()
Return the label height (seperate method because its static)
public
static getLabelHeight() : float
Return values
floatpadding()
Sets the views padding Padding is the space inside the view to its content
public
padding(float $horizontal, float $vertical) : self
Parameters
- $horizontal : float
- $vertical : float
Return values
selfpaddingAll()
Sets all padding values to the same value Padding is the space inside the view to its content
public
paddingAll(float $padding) : self
Parameters
- $padding : float
Return values
selfpaddingBottom()
Sets the views bottom padding Padding is the space inside the view to its content
public
paddingBottom(float $paddingBottom) : self
Parameters
- $paddingBottom : float
Return values
selfpaddingFull()
Sets the views padding with individual values Padding is the space inside the view to its content
public
paddingFull(float $left, float $right, float $top, float $bottom) : self
Parameters
- $left : float
- $right : float
- $top : float
- $bottom : float
Return values
selfpaddingLeft()
Sets the views left padding Padding is the space inside the view to its content
public
paddingLeft(float $paddingLeft) : self
Parameters
- $paddingLeft : float
Return values
selfpaddingRight()
Sets the views right padding Padding is the space inside the view to its content
public
paddingRight(float $paddingRight) : self
Parameters
- $paddingRight : float
Return values
selfpaddingTop()
Sets the views top padding Padding is the space inside the view to its content
public
paddingTop(float $paddingTop) : self
Parameters
- $paddingTop : float
Return values
selfpaddingX()
Sets the views horizontal padding (left and right) Padding is the space inside the view to its content
public
paddingX(float $paddingX) : self
Parameters
- $paddingX : float
Return values
selfpaddingY()
Sets the views vertical padding (top and bottom) Padding is the space inside the view to its content
public
paddingY(float $paddingY) : self
Parameters
- $paddingY : float
Return values
selfrender()
Renders the current view using the provided context
public
render(FUIRenderContext $ctx) : void
Parameters
- $ctx : FUIRenderContext