deploy: 5a1ec672a7
This commit is contained in:
@@ -3,6 +3,75 @@ _A specialized text element that renders characters in larger sizes using Wojbie
|
||||
|
||||
Extends: `VisualElement`
|
||||
|
||||
## Usage
|
||||
```lua run
|
||||
-- Create a large welcome message
|
||||
```
|
||||
|
||||
```lua run
|
||||
local main = basalt.getMainFrame()
|
||||
```
|
||||
|
||||
```lua run
|
||||
local title = main:addBigFont()
|
||||
```
|
||||
|
||||
```lua run
|
||||
:setPosition(3, 3)
|
||||
```
|
||||
|
||||
```lua run
|
||||
:setFontSize(2) -- Makes text twice as large
|
||||
```
|
||||
|
||||
```lua run
|
||||
:setText("Welcome!")
|
||||
```
|
||||
|
||||
```lua run
|
||||
:setForeground(colors.yellow) -- Make text yellow
|
||||
```
|
||||
|
||||
```lua run
|
||||
|
||||
```
|
||||
|
||||
```lua run
|
||||
-- For animated text
|
||||
```
|
||||
|
||||
```lua run
|
||||
basalt.schedule(function()
|
||||
```
|
||||
|
||||
```lua run
|
||||
while true do
|
||||
```
|
||||
|
||||
```lua run
|
||||
title:setForeground(colors.yellow)
|
||||
```
|
||||
|
||||
```lua run
|
||||
sleep(0.5)
|
||||
```
|
||||
|
||||
```lua run
|
||||
title:setForeground(colors.orange)
|
||||
```
|
||||
|
||||
```lua run
|
||||
sleep(0.5)
|
||||
```
|
||||
|
||||
```lua run
|
||||
end
|
||||
```
|
||||
|
||||
```lua run
|
||||
end)
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
|Property|Type|Default|Description|
|
||||
|
||||
Reference in New Issue
Block a user