add texture func

This commit is contained in:
Jill 2022-10-29 15:02:45 +03:00
parent e860423821
commit 5e3713d14b
2 changed files with 13 additions and 1 deletions

View File

@ -30,6 +30,7 @@ Uranium Template originally formed during the creation of a currently unreleased
- [`ActorFrame`](#actorframe)
- [`ActorScroller`](#actorscroller)
- [`BitmapText`](#bitmaptext)
- [Textures](#textures)
- [Shaders](#shaders)
- [Callback usage](#callback-usage)
- [Default callbacks](#default-callbacks)
@ -340,6 +341,17 @@ However, providing custom fonts is a bit tedious due to a [vanilla bug](https://
local text = BitmapText('../src/_inter v 22px.ini', 'test')
```
#### Textures
For convinience, `Texture` is a function that will give you a `RageTexture` from a filename without the actor. Equivalent to:
```lua
local sprite = Sprite('filename.png')
sprite:hidden(1)
local texture = sprite:GetTexture()
return texture
```
### 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 44bf4528df950d6cb93e361e7426b7e0d7548c84
Subproject commit f4e8c1df7ca44eff65662d636fcb1ddb74254121