Skip to content

Commit

Permalink
add texture func
Browse files Browse the repository at this point in the history
  • Loading branch information
oatmealine committed Oct 29, 2022
1 parent e860423 commit 5e3713d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template
Submodule template updated from 44bf45 to f4e8c1

0 comments on commit 5e3713d

Please sign in to comment.