summaryrefslogtreecommitdiff
path: root/library/LuaApi.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-19 19:50:36 +0400
committerAlexander Gavrilov2012-05-19 19:50:36 +0400
commit7774f5f2c1b1e16b9bd3eefe0fd8b4287d03fef7 (patch)
tree26456ee2d47d78dde660842a4f317804a790b925 /library/LuaApi.cpp
parent4aa6dbdd005c8930f2ae972e780caa3fde97f854 (diff)
downloaddfhack-7774f5f2c1b1e16b9bd3eefe0fd8b4287d03fef7.tar.gz
dfhack-7774f5f2c1b1e16b9bd3eefe0fd8b4287d03fef7.tar.bz2
dfhack-7774f5f2c1b1e16b9bd3eefe0fd8b4287d03fef7.tar.xz
Add a mechanism converting ui focus to a string representation.
The idea is to make ui handling more modular, dispensing with huge functions that switch or if/else on lots of variables. For now, used to split up functions in the sort plugin.
Diffstat (limited to 'library/LuaApi.cpp')
-rw-r--r--library/LuaApi.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp
index d4c3b157..9dfb3975 100644
--- a/library/LuaApi.cpp
+++ b/library/LuaApi.cpp
@@ -61,6 +61,7 @@ distribution.
#include "df/unit.h"
#include "df/item.h"
#include "df/material.h"
+#include "df/viewscreen.h"
#include "df/assumed_identity.h"
#include "df/nemesis_record.h"
#include "df/historical_figure.h"
@@ -652,6 +653,8 @@ static const LuaWrapper::FunctionReg dfhack_module[] = {
/***** Gui module *****/
static const LuaWrapper::FunctionReg dfhack_gui_module[] = {
+ WRAPM(Gui, getCurViewscreen),
+ WRAPM(Gui, getFocusString),
WRAPM(Gui, getSelectedWorkshopJob),
WRAPM(Gui, getSelectedJob),
WRAPM(Gui, getSelectedUnit),