Skip to content

Commit

Permalink
specify oddness with bitmaptexts
Browse files Browse the repository at this point in the history
  • Loading branch information
oatmealine committed Sep 25, 2022
1 parent afb8d6d commit c358789
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template
Submodule template updated from 92aa7f to 399d63

0 comments on commit c358789

Please sign in to comment.