From be59ac06cbcd60895e25f2e7d76846ee3e6a0d92 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 16 Oct 2018 13:43:57 +0800 Subject: =?UTF-8?q?+=E5=A2=9E=E5=8A=A0=3D=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/main.lua | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'bin/main.lua') diff --git a/bin/main.lua b/bin/main.lua index 3655cf5..590debe 100644 --- a/bin/main.lua +++ b/bin/main.lua @@ -10,6 +10,7 @@ function jin.core.onLoad() -- local tfdata = jin.graphics.newTTFData("font.ttf") -- tf = tfdata:newTTF(13) -- page = tf:typeset("this is a test") + jin.graphics.setClearColor(100, 100, 100, 255) end function jin.core.onEvent(e) @@ -38,5 +39,35 @@ function run() end function jin.core.onDraw() - jin.graphics.print(string.format("FPS: %d\nok this is another test", fps), 0, 0) + jin.graphics.print([[ + ;:-_/|\!'"+=*()[]{}&% +function jin.core.onLoad() + shader = jin.graphics.newShaderf("font.shader") + -- local bitmap = jin.graphics.newBitmap("defaultfont.png") + -- local tfdata = jin.graphics.newTTFData("font.ttf") + -- tf = tfdata:newTTF(13) + -- page = tf:typeset("this is a test") +end +function jin.core.onLoad() + shader = jin.graphics.newShaderf("font.shader") + -- local bitmap = jin.graphics.newBitmap("defaultfont.png") + -- local tfdata = jin.graphics.newTTFData("font.ttf") + -- tf = tfdata:newTTF(13) + -- page = tf:typeset("this is a test") +end +function jin.core.onLoad() + shader = jin.graphics.newShaderf("font.shader") + -- local bitmap = jin.graphics.newBitmap("defaultfont.png") + -- local tfdata = jin.graphics.newTTFData("font.ttf") + -- tf = tfdata:newTTF(13) + -- page = tf:typeset("this is a test") +end +function jin.core.onLoad() + shader = jin.graphics.newShaderf("font.shader") + -- local bitmap = jin.graphics.newBitmap("defaultfont.png") + -- local tfdata = jin.graphics.newTTFData("font.ttf") + -- tf = tfdata:newTTF(13) + -- page = tf:typeset("this is a test") +end +]], 10,10) end \ No newline at end of file -- cgit v1.1-26-g67d0