diff options
| author | Alexander Gavrilov | 2012-09-20 11:11:20 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-20 11:11:20 +0400 |
| commit | c39a33722316ee91f7a42abcd76149788dd19196 (patch) | |
| tree | e057fabb61758db013f91f633ca5a97bbbd166a2 /plugins/manipulator.cpp | |
| parent | 7ce772ae0ea69ab26009a27d71bd681382ecfac7 (diff) | |
| download | dfhack-c39a33722316ee91f7a42abcd76149788dd19196.tar.gz dfhack-c39a33722316ee91f7a42abcd76149788dd19196.tar.bz2 dfhack-c39a33722316ee91f7a42abcd76149788dd19196.tar.xz | |
Add unit/item/job/building getter hook vmethods to dfhack_viewscreen.
Diffstat (limited to 'plugins/manipulator.cpp')
| -rw-r--r-- | plugins/manipulator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp index 2b3fc86f..033ad8b8 100644 --- a/plugins/manipulator.cpp +++ b/plugins/manipulator.cpp @@ -338,6 +338,8 @@ public: std::string getFocusString() { return "unitlabors"; } + df::unit *getSelectedUnit(); + viewscreen_unitlaborsst(vector<df::unit*> &src, int cursor_pos); ~viewscreen_unitlaborsst() { }; @@ -986,6 +988,11 @@ void viewscreen_unitlaborsst::render() } } +df::unit *viewscreen_unitlaborsst::getSelectedUnit() +{ + return units[sel_row]->unit; +} + struct unitlist_hook : df::viewscreen_unitlistst { typedef df::viewscreen_unitlistst interpose_base; |
