MCPcopy Create free account
hub / github.com/TurningWheel/Barony / isInscriptionDrawerItemSelected

Method isInscriptionDrawerItemSelected

src/interface/interface.cpp:24077–24107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24075}
24076
24077bool GenericGUIMenu::FeatherGUI_t::isInscriptionDrawerItemSelected(Item* item)
24078{
24079 if ( !item || itemCategory(item) == SPELL_CAT )
24080 {
24081 return false;
24082 }
24083
24084 if ( !isInscriptionDrawerOpen() || !parentGUI.isNodeScribingCraftableItem(item->node) || !isItemVisible(item) )
24085 {
24086 return false;
24087 }
24088
24089 if ( players[parentGUI.getPlayer()]->GUI.activeModule == Player::GUI_t::MODULE_FEATHER )
24090 {
24091 if ( selectedFeatherSlotX >= 0 && selectedFeatherSlotX < MAX_FEATHER_X
24092 && selectedFeatherSlotY >= 0 && selectedFeatherSlotY < MAX_FEATHER_Y
24093 && item->x == selectedFeatherSlotX && item->y == selectedFeatherSlotY )
24094 {
24095 if ( auto slotFrame = getFeatherSlotFrame(item->x, item->y) )
24096 {
24097 return slotFrame->capturesMouse();
24098 }
24099 else
24100 {
24101 return false;
24102 }
24103 }
24104 }
24105
24106 return false;
24107}
24108
24109bool GenericGUIMenu::FeatherGUI_t::isItemSelectedToRepairOrInscribe(Item* item)
24110{

Callers

nothing calls this directly

Calls 4

capturesMouseMethod · 0.80
itemCategoryFunction · 0.50
getPlayerMethod · 0.45

Tested by

no test coverage detected