Esempio n. 1
0
    def press_song(self, button):  # when you press the song button
        buttonText = button.text  # Determine the text on the buttons
        selectedSong = Song()
        for song in self.song_list.list_songs:
            songDisplayText = self.button_Text(song.title, song.artist, song.year, song.is_required)
            # show text in Button
            if buttonText == songDisplayText:
                selectedSong = song
                break

        selectedSong.add_learned()
        self.root.ids.entriesBox.clear_widgets()  # Apply to Kivy
        self.create_buttons()

        self.status_text2 = "You have learned {}".format(selectedSong.title)  # Display the status text 2