Constructor
new TextArea()
Creates the area with default values.
By default, it's sized and positioned to be attached to the camera, is nicely transparent, font size 16 on 512x512 texture,
and includes manipulation handles
- Source:
Classes
Methods
attachToCamera(camera)
Attach it to the camera. It does not resize automatically, just sets the parent.
It does not automatically switch to another camera if active camera changes.
Parameters:
Name | Type | Description |
---|---|---|
camera |
currently active camera |
- Source:
attachToHud()
Attach it to the hud. It does not resize automatically, just sets the parent.
- Source:
checkCapacity()
Check if current text length exceeds the capacity and truncate as required.
- Source:
clear()
Remove the text
- Source:
createHandles()
Creates manipulation handles. Left and right handle resize, and top and bottom move it.
- Source:
detach()
Detach from whatever attached to, i.e. drop it where you stand.
- Source:
dispose()
Clean up.
- Source:
getMaxCols()
Calculates and returns maximum number text columns available
- Source:
getMaxRows()
Calculates and returns maximum text rows available
- Source:
hide(flag)
Hide/show (requires manipulation handles)
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean, hide/show |
- Source:
isSelectableMesh()
XR pointer support
- Source:
onClick(callback)
Set click event handler here
Parameters:
Name | Type | Description |
---|---|---|
callback |
executed on pointer click, passed Control argument |
- Source:
print()
Same as write
- Source:
println()
Same as writeln
- Source:
removeHandles()
Removes manipulation handles.
- Source:
show()
As the name says. Optionally also creates manipulation handles.
- Source:
write()
Write a string
- Source:
writeln()
Print a string into a new line
- Source: