Ver código fonte

Add txt loader;

bjorn 10 anos atrás
pai
commit
9ff4a8ea06
2 arquivos alterados com 2 adições e 0 exclusões
  1. 1 0
      README.md
  2. 1 0
      cargo.lua

+ 1 - 0
README.md

@@ -81,6 +81,7 @@ Here is a list of default loaders used:
 | mp3       | `love.audio.newSource`    |
 | ogg       | `love.audio.newSource`    |
 | wav       | `love.audio.newSource`    |
+| txt       | `love.filesystem.read`    |
 
 The loader for `.ttf` files is special. Instead of directly returning an asset, this loader returns a function that accepts a size for the font and returns a new font with the specified size.
 

+ 1 - 0
cargo.lua

@@ -23,6 +23,7 @@ cargo.loaders = {
   mp3 = la and la.newSource,
   ogg = la and la.newSource,
   wav = la and la.newSource,
+  txt = lf and lf.read,
   ttf = lg and makeFont
 }