From 57086ac56eb489abd0c7759aed084020edc71148 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 5 Sep 2012 19:45:45 +0400 Subject: [PATCH] Add stock MessageBox and InputBox dialog screens for lua scripts. --- LUA_API.rst | 8 ++ Lua API.html | 6 ++ library/LuaApi.cpp | 2 + library/LuaTools.cpp | 3 + library/Process-darwin.cpp | 8 ++ library/Process-linux.cpp | 8 ++ library/Process-windows.cpp | 5 ++ library/include/MemAccess.h | 3 + library/lua/gui.lua | 12 ++- library/lua/gui/dialogs.lua | 175 ++++++++++++++++++++++++++++++++++++ library/lua/utils.lua | 13 +++ 11 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 library/lua/gui/dialogs.lua diff --git a/LUA_API.rst b/LUA_API.rst index 22130efd6..799f623eb 100644 --- a/LUA_API.rst +++ b/LUA_API.rst @@ -553,6 +553,10 @@ Exception handling Miscellaneous ------------- +* ``dfhack.VERSION`` + + DFHack version string constant. + * ``dfhack.curry(func,args...)``, or ``curry(func,args...)`` Returns a closure that invokes the function with args combined @@ -719,6 +723,10 @@ can be omitted. Returns the dfhack directory path, i.e. ``".../df/hack/"``. +* ``dfhack.getTickCount()`` + + Returns the tick count in ms, exactly as DF ui uses. + * ``dfhack.isWorldLoaded()`` Checks if the world is loaded. diff --git a/Lua API.html b/Lua API.html index f6f2d42b3..f05ee5511 100644 --- a/Lua API.html +++ b/Lua API.html @@ -846,6 +846,9 @@ following properties:

Miscellaneous