specify oddness with bitmaptexts

This commit is contained in:
Jill 2022-09-25 15:44:16 +03:00
parent afb8d6d1e6
commit c358789363
2 changed files with 18 additions and 1 deletions

View File

@ -28,6 +28,7 @@ Uranium Template originally formed during the creation of a currently unreleased
- [`ActorFrameTexture`](#actorframetexture)
- [`ActorFrame`](#actorframe)
- [`ActorScroller`](#actorscroller)
- [`BitmapText`](#bitmaptext)
- [Shaders](#shaders)
- [Callback usage](#callback-usage)
- [Default callbacks](#default-callbacks)
@ -279,6 +280,22 @@ end
`ActorFrame` already has an extremely, _extremely_ complicated setup powering it in the back-end; and `ActorScroller` is way too niche for me to give it the same treatment. Sorry!
#### `BitmapText`
If you want to specify theme-provided fonts, that's easy enough:
```lua
local text1 = BitmapText(nil, 'test') -- defaults to 'common'
local text2 = BitmapText('_wendy white', 'test')
local text3 = BitmapText('_misobold white', 'test')
```
However, providing custom fonts is a bit tedious due to a [vanilla bug](https://discord.com/channels/227650173256466432/666629297544495124/1023573412028891177) that's annoying to work around. In order to specify a custom font, consider the _root path_ to be in `template/`. For example, if you want to load a font from your `src/` folder, you'd do:
```lua
local text = BitmapText('../src/_inter v 22px.ini', 'test')
```
### Shaders
Shaders cannot be manually defined on actors [due to a technical limitation](https://discord.com/channels/227650173256466432/666629297544495124/1022119161415077909); plus, it wouldn't make much sense to integrate them in the same way that NotITG integrates shaders with the current XML behavior. In order to give an actor a shader, you need to define them seperately:

@ -1 +1 @@
Subproject commit 92aa7f33b3875db4bf68ce46a9ff432e7a94fdd1
Subproject commit 399d6329a0d2783ec112119e0c2d721169dcc6e3