|
|
@ -74,6 +74,7 @@ using namespace DFHack;
|
|
|
|
#include "df/ui_unit_view_mode.h"
|
|
|
|
#include "df/ui_unit_view_mode.h"
|
|
|
|
#include "df/unit.h"
|
|
|
|
#include "df/unit.h"
|
|
|
|
#include "df/unit_inventory_item.h"
|
|
|
|
#include "df/unit_inventory_item.h"
|
|
|
|
|
|
|
|
#include "df/viewscreen_assign_display_itemst.h"
|
|
|
|
#include "df/viewscreen_buildinglistst.h"
|
|
|
|
#include "df/viewscreen_buildinglistst.h"
|
|
|
|
#include "df/viewscreen_dungeon_monsterstatusst.h"
|
|
|
|
#include "df/viewscreen_dungeon_monsterstatusst.h"
|
|
|
|
#include "df/viewscreen_dungeonmodest.h"
|
|
|
|
#include "df/viewscreen_dungeonmodest.h"
|
|
|
@ -1042,6 +1043,15 @@ df::item *Gui::getAnyItem(df::viewscreen *top)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (VIRTUAL_CAST_VAR(screen, df::viewscreen_assign_display_itemst, top))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (screen->sel_column == df::viewscreen_assign_display_itemst::T_sel_column::Items)
|
|
|
|
|
|
|
|
return vector_get(screen->items[screen->item_type[screen->sel_type]],
|
|
|
|
|
|
|
|
screen->sel_item);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (auto dfscreen = dfhack_viewscreen::try_cast(top))
|
|
|
|
if (auto dfscreen = dfhack_viewscreen::try_cast(top))
|
|
|
|
return dfscreen->getSelectedItem();
|
|
|
|
return dfscreen->getSelectedItem();
|
|
|
|
|
|
|
|
|
|
|
|