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