| 16705 | } |
| 16706 | |
| 16707 | bool GenericGUIMenu::TinkerGUI_t::warpMouseToSelectedTinkerItem(Item* snapToItem, Uint32 flags) |
| 16708 | { |
| 16709 | if ( tinkerGUIHasBeenCreated() ) |
| 16710 | { |
| 16711 | int x = getSelectedTinkerSlotX(); |
| 16712 | int y = getSelectedTinkerSlotY(); |
| 16713 | if ( snapToItem ) |
| 16714 | { |
| 16715 | x = snapToItem->x; |
| 16716 | y = snapToItem->y; |
| 16717 | } |
| 16718 | |
| 16719 | if ( auto slot = getTinkerSlotFrame(x, y) ) |
| 16720 | { |
| 16721 | int playernum = parentGUI.getPlayer(); |
| 16722 | auto player = players[playernum]; |
| 16723 | if ( !isInteractable ) |
| 16724 | { |
| 16725 | //messagePlayer(0, "[Debug]: select item queued"); |
| 16726 | player->inventoryUI.cursor.queuedModule = Player::GUI_t::MODULE_TINKERING; |
| 16727 | player->inventoryUI.cursor.queuedFrameToWarpTo = slot; |
| 16728 | return false; |
| 16729 | } |
| 16730 | else |
| 16731 | { |
| 16732 | //messagePlayer(0, "[Debug]: select item warped"); |
| 16733 | player->inventoryUI.cursor.queuedModule = Player::GUI_t::MODULE_NONE; |
| 16734 | player->inventoryUI.cursor.queuedFrameToWarpTo = nullptr; |
| 16735 | slot->warpMouseToFrame(playernum, flags); |
| 16736 | } |
| 16737 | return true; |
| 16738 | } |
| 16739 | } |
| 16740 | return false; |
| 16741 | } |
| 16742 | |
| 16743 | void GenericGUIMenu::TinkerGUI_t::clearItemDisplayed() |
| 16744 | { |
no test coverage detected