private void AssignButtons() { root.Q <Button>("PreviousButton").clicked += () => { favoritesCoffeesController.SwitchToPreviousFavoriteCoffee(); RefreshView(); }; root.Q <Button>("NextButton").clicked += () => { favoritesCoffeesController.SwitchToNextFavoriteCoffee(); RefreshView(); }; addCoffeeButton = root.Q <Button>("AddFavCoffee"); addCoffeeButton.clicked += () => { favoritesCoffeesController.AddFavoriteCoffee(nameField.value, waterField.value, coffeeField.value); RefreshView(); }; removeCoffeeButton = root.Q <Button>("RemoveFavCoffee"); removeCoffeeButton.clicked += () => { favoritesCoffeesController.RemoveCurrentCoffee(); RefreshView(); }; }
public void OnPreviousFavoriteCoffeePressed() { favoritesCoffeesController.SwitchToPreviousFavoriteCoffee(); RefreshView(); }