| 23951 | } |
| 23952 | |
| 23953 | bool GenericGUIMenu::FeatherGUI_t::warpMouseToSelectedFeatherItem(Item* snapToItem, Uint32 flags) |
| 23954 | { |
| 23955 | if ( featherGUIHasBeenCreated() ) |
| 23956 | { |
| 23957 | int x = getSelectedFeatherSlotX(); |
| 23958 | int y = getSelectedFeatherSlotY(); |
| 23959 | if ( snapToItem ) |
| 23960 | { |
| 23961 | x = snapToItem->x; |
| 23962 | y = snapToItem->y; |
| 23963 | } |
| 23964 | |
| 23965 | if ( isInteractable ) |
| 23966 | { |
| 23967 | if ( abs(scrollAnimateX - scrollSetpoint) > 0.00001 ) |
| 23968 | { |
| 23969 | int diff = (scrollAnimateX - scrollSetpoint) / inscriptionSlotHeight; |
| 23970 | y += diff; // if we have a scroll in the works, then manipulate y to pretend where we'd be ahead of time. |
| 23971 | } |
| 23972 | } |
| 23973 | |
| 23974 | if ( auto slot = getFeatherSlotFrame(x, y) ) |
| 23975 | { |
| 23976 | int playernum = parentGUI.getPlayer(); |
| 23977 | auto player = players[playernum]; |
| 23978 | if ( !isInteractable ) |
| 23979 | { |
| 23980 | //messagePlayer(0, "[Debug]: select item queued"); |
| 23981 | player->inventoryUI.cursor.queuedModule = Player::GUI_t::MODULE_FEATHER; |
| 23982 | player->inventoryUI.cursor.queuedFrameToWarpTo = slot; |
| 23983 | return false; |
| 23984 | } |
| 23985 | else |
| 23986 | { |
| 23987 | //messagePlayer(0, "[Debug]: select item warped"); |
| 23988 | player->inventoryUI.cursor.queuedModule = Player::GUI_t::MODULE_NONE; |
| 23989 | player->inventoryUI.cursor.queuedFrameToWarpTo = nullptr; |
| 23990 | slot->warpMouseToFrame(playernum, flags); |
| 23991 | } |
| 23992 | return true; |
| 23993 | } |
| 23994 | } |
| 23995 | return false; |
| 23996 | } |
| 23997 | |
| 23998 | void GenericGUIMenu::FeatherGUI_t::clearItemDisplayed() |
| 23999 | { |
no test coverage detected