TextArea
Applies to: properties (string)
Namespace:
namespace Lenga\Engine\Attributes;
Renders a multi-line text area in the Inspector for a serialized string property. Useful for longer text values such as dialogue lines, descriptions, or configuration blobs.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
$minLines |
int |
3 |
Minimum number of visible lines in the editor. |
$maxLines |
int |
10 |
Maximum number of visible lines before scrolling. |
Example
use Lenga\Engine\Attributes\TextArea;
use Lenga\Engine\Core\Behaviour;
class DialogueTrigger extends Behaviour
{
#[TextArea(minLines: 3, maxLines: 8)]
public string $dialogueText = 'Enter dialogue here...';
public function onTriggerEnter(): void
{
// display $this->dialogueText in the UI...
}
}