summaryrefslogtreecommitdiff
path: root/Lua API.html
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-05-19 19:50:36 +0400
committerAlexander Gavrilov2012-05-19 19:50:36 +0400
commit7774f5f2c1b1e16b9bd3eefe0fd8b4287d03fef7 (patch)
tree26456ee2d47d78dde660842a4f317804a790b925 /Lua API.html
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 'Lua API.html')
-rw-r--r--Lua API.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lua API.html b/Lua API.html
index 7ce777c4..e2d4ec23 100644
--- a/Lua API.html
+++ b/Lua API.html
@@ -868,6 +868,13 @@ can be omitted.</p>
<div class="section" id="gui-module">
<h3><a class="toc-backref" href="#id14">Gui module</a></h3>
<ul>
+<li><p class="first"><tt class="docutils literal">dfhack.gui.getCurViewscreen()</tt></p>
+<p>Returns the viewscreen that is current in the core.</p>
+</li>
+<li><p class="first"><tt class="docutils literal">dfhack.gui.getFocusString(viewscreen)</tt></p>
+<p>Returns a string representation of the current focus position
+in the ui. The string has a &quot;screen/foo/bar/baz...&quot; format.</p>
+</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">dfhack.gui.getSelectedWorkshopJob([silent])</span></tt></p>
<p>When a job is selected in <em>'q'</em> mode, returns the job, else
prints error unless silent and returns <em>nil</em>.</p>