summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-09-20 11:55:53 +0400
committerAlexander Gavrilov2012-09-20 11:55:53 +0400
commit82dc1445cf86160cd3e7d33718b7229c1f591fc6 (patch)
tree4f9c52f25c2f858ba7ecef4d349dc95bd48912d8
parent1f7c10252e79415bf56c461cd2eb19a5018433fb (diff)
downloaddfhack-82dc1445cf86160cd3e7d33718b7229c1f591fc6.tar.gz
dfhack-82dc1445cf86160cd3e7d33718b7229c1f591fc6.tar.bz2
dfhack-82dc1445cf86160cd3e7d33718b7229c1f591fc6.tar.xz
Support the Room list in getSelectedBuilding.
-rw-r--r--library/modules/Gui.cpp4
m---------library/xml0
2 files changed, 4 insertions, 0 deletions
diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp
index bc7deedc..eaeef9bf 100644
--- a/library/modules/Gui.cpp
+++ b/library/modules/Gui.cpp
@@ -53,6 +53,7 @@ using namespace DFHack;
#include "df/viewscreen_dungeon_monsterstatusst.h"
#include "df/viewscreen_joblistst.h"
#include "df/viewscreen_unitlistst.h"
+#include "df/viewscreen_buildinglistst.h"
#include "df/viewscreen_itemst.h"
#include "df/viewscreen_layer.h"
#include "df/viewscreen_layer_workshop_profilest.h"
@@ -950,6 +951,9 @@ static df::building *getAnyBuilding(df::viewscreen *top)
using df::global::world;
using df::global::ui_sidebar_menus;
+ if (auto screen = strict_virtual_cast<df::viewscreen_buildinglistst>(top))
+ return vector_get(screen->buildings, screen->cursor);
+
if (auto dfscreen = dfhack_viewscreen::try_cast(top))
return dfscreen->getSelectedBuilding();
diff --git a/library/xml b/library/xml
-Subproject eb4af94c7e737d99c194381749ac6743e146913
+Subproject d52c7181fb439a5fead143188d17d659d82e7f8