LuaBox
Loading...
Searching...
No Matches
DisplayPrint.h
Go to the documentation of this file.
1#pragma once
2
3#include "lua_include.h"
4#include "global.h"
5
23
24int DisplayPrint(lua_State* L_)
25{
26 const char* t = luaL_checkstring(L_, 1);
27 int x = luaL_checkinteger(L_, 2);
28 int y = luaL_checkinteger(L_, 3);
29 int c = luaL_checkinteger(L_, 4);
30 int size = 1;
31
32 if (lua_gettop(L_) >= 5)
33 size = luaL_checkinteger(L_, 5);
34
35 sprite.setTextColor(c);
36 sprite.setTextSize(size);
37 sprite.setCursor(x, y);
38 sprite.print(t);
39
40 return 0;
41}
int DisplayPrint(lua_State *L_)
Print a text string on the sprite buffer with optional scaling.
Definition DisplayPrint.h:24