Skip to content

Commit

Permalink
Add some sign api constants
Browse files Browse the repository at this point in the history
  • Loading branch information
LBPHacker committed Jan 27, 2024
1 parent 09ae62a commit ae07c55
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/lua/LuaSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,14 @@ void LuaSimulation::Open(lua_State *L)
lua_setfield(L, -2, "new");
lua_pushcfunction(L, Sign_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_pushvalue(L, -1);
Expand Down
9 changes: 5 additions & 4 deletions src/simulation/Sign.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ struct sign
{
enum Justification
{
Left = 0,
Middle = 1,
Right = 2,
None = 3
Left,
Middle,
Right,
None,
Max,
};

enum Type
Expand Down

0 comments on commit ae07c55

Please sign in to comment.