|
|
@ -109,7 +109,7 @@ protected: |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
inline MenuComponent*PickUpDraggableItem()override sealed{ |
|
|
|
inline MenuComponent*PickUpDraggableItem()override final{ |
|
|
|
if(valid){ |
|
|
|
if(valid){ |
|
|
|
MenuItemButton*pickUp=NEW MenuItemButton(parentMenu,rect,invRef,inventoryIndex,onClick); |
|
|
|
MenuItemButton*pickUp=NEW MenuItemButton(parentMenu,rect,invRef,inventoryIndex,onClick); |
|
|
|
valid=false; |
|
|
|
valid=false; |
|
|
@ -119,10 +119,10 @@ protected: |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline bool DropDraggableItem(MenuComponent*draggable)override sealed{ |
|
|
|
inline bool DropDraggableItem(MenuComponent*draggable)override final{ |
|
|
|
//HACK Warning! We're making a bold assumption that every component that is draggable is of the same type! This may change in the future....
|
|
|
|
//HACK Warning! We're making a bold assumption that every component that is draggable is of the same type! This may change in the future....
|
|
|
|
MenuItemButton*draggedItem=(MenuItemButton*)draggable; |
|
|
|
MenuItemButton*draggedItem=(MenuItemButton*)draggable; |
|
|
|
ITCategory cat=ITEM_DATA.at(draggedItem->invRef.at(draggedItem->inventoryIndex)).Category(); |
|
|
|
ITCategory cat=ITEM_DATA.at(draggedItem->invRef.at(draggedItem->inventoryIndex)).Category(); |
|
|
|
return Inventory::SwapItems(cat,draggedItem->inventoryIndex,inventoryIndex); |
|
|
|
return Inventory::SwapItems(cat,draggedItem->inventoryIndex,inventoryIndex); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|