mounts: show when selectedFood by green-circle highlighting pets

This commit is contained in:
Tyler Renelle
2013-11-10 22:53:20 -08:00
parent e990850b01
commit bfbc907fa1
3 changed files with 6 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User', 'API_URL',
}
$scope.chooseFood = function(food){
if ($scope.selectedFood && $scope.selectedFood.name == food) return $scope.selectedFood = null;
$scope.selectedFood = $scope.Items.food[food];
}