mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-10 18:34:21 +02:00
Add some sign api constants
This commit is contained in:
@@ -2083,6 +2083,14 @@ void LuaSimulation::Open(lua_State *L)
|
|||||||
lua_setfield(L, -2, "new");
|
lua_setfield(L, -2, "new");
|
||||||
lua_pushcfunction(L, Sign_delete);
|
lua_pushcfunction(L, Sign_delete);
|
||||||
lua_setfield(L, -2, "delete");
|
lua_setfield(L, -2, "delete");
|
||||||
|
#define LCONSTAS(k, v) lua_pushinteger(L, int(v)); lua_setfield(L, -2, k)
|
||||||
|
LCONSTAS("JUSTMODE_LEFT" , sign::Left),
|
||||||
|
LCONSTAS("JUSTMODE_MIDDLE", sign::Middle),
|
||||||
|
LCONSTAS("JUSTMODE_RIGHT" , sign::Right),
|
||||||
|
LCONSTAS("JUSTMODE_NONE" , sign::None),
|
||||||
|
LCONSTAS("NUM_JUSTMODES" , sign::Max),
|
||||||
|
LCONSTAS("MAX_SIGNS" , MAXSIGNS),
|
||||||
|
#undef LCONSTAS
|
||||||
lua_setfield(L, -2, "signs");
|
lua_setfield(L, -2, "signs");
|
||||||
}
|
}
|
||||||
lua_pushvalue(L, -1);
|
lua_pushvalue(L, -1);
|
||||||
|
@@ -8,10 +8,11 @@ struct sign
|
|||||||
{
|
{
|
||||||
enum Justification
|
enum Justification
|
||||||
{
|
{
|
||||||
Left = 0,
|
Left,
|
||||||
Middle = 1,
|
Middle,
|
||||||
Right = 2,
|
Right,
|
||||||
None = 3
|
None,
|
||||||
|
Max,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Type
|
enum Type
|
||||||
|
Reference in New Issue
Block a user