|
|
|
@ -1525,8 +1525,12 @@ static int gui_getDwarfmodeViewDims(lua_State *state)
|
|
|
|
|
|
|
|
|
|
static int gui_getMousePos(lua_State *L)
|
|
|
|
|
{
|
|
|
|
|
Lua::PushPosXYZ(L, Gui::getMousePos());
|
|
|
|
|
return 3;
|
|
|
|
|
auto pos = Gui::getMousePos();
|
|
|
|
|
if (pos.isValid())
|
|
|
|
|
Lua::Push(L, pos);
|
|
|
|
|
else
|
|
|
|
|
lua_pushnil(L);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const LuaWrapper::FunctionReg dfhack_gui_module[] = {
|
|
|
|
@ -2289,16 +2293,12 @@ static const LuaWrapper::FunctionReg dfhack_screen_module[] = {
|
|
|
|
|
|
|
|
|
|
static int screen_getMousePos(lua_State *L)
|
|
|
|
|
{
|
|
|
|
|
Lua::PushPosXY(L, Screen::getMousePos());
|
|
|
|
|
return 2;
|
|
|
|
|
return Lua::PushPosXY(L, Screen::getMousePos());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int screen_getWindowSize(lua_State *L)
|
|
|
|
|
{
|
|
|
|
|
auto pos = Screen::getWindowSize();
|
|
|
|
|
lua_pushinteger(L, pos.x);
|
|
|
|
|
lua_pushinteger(L, pos.y);
|
|
|
|
|
return 2;
|
|
|
|
|
return Lua::PushPosXY(L, Screen::getWindowSize());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int screen_paintTile(lua_State *L)
|
|
|
|
|