Work on documentation

This commit is contained in:
Otto 2024-10-09 14:14:59 +03:00
parent 49f5bd326f
commit a28be52f07
4 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# DynamicSubViewport
`inherits SubViewport`
### Usage
This class functions identically to the `SubViewport` class, except it scales automatically to the root viewport.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -0,0 +1,49 @@
# ScramblingText
`inherits Label`
### Usage
This class implements a 'glitch' effect for a label.
![showcase](scramblingtext.gif)
### Properties
| Type | Name | Default |
| ---- | ---- | ------- |
| `String` | chars | `ABCDEFGHIJKLMNOPQRSTUVWXYZ124567890` |
| `Bool` | scrambling | `False` |
| `Float` | speed | `15.0` |
| `Float` | duration | `1.0` |
| `Bool` | infinite | `False` (overridden by editor_hint) |
`chars`
Stores the character set used for the scramble effect.
`scrambling`
Whether or not the scrambling effect is active.
`speed`
How many times per second the text gets scrambled.
`duration`
How many times to scramble before revealing next character.
`infinite`
Whether or not the scrambling effect is infinite.
### Methods
| Returns | Name |
| ------- | ---- |
| `void` | `start()` |
| `void` | `set_text(text: String)` |
| `String` | `get_text()` |
#### start()
start the scrambling. This acts as a setter function for `scrambling`
#### set_text(text: String)
Setter for the `text` of the parent class `Label`
#### get_text() -> String
Getter for the `text` of the parent class `Label`