def generate_restart_button(self, *args): restart = Button(background_color=get_color_from_hex('EC9449')) restart.curve = 25 set_color(restart, get_color_from_hex('EC9449')) restart.image.source = 'assets/images/refresh.png' restart.bind(on_press=self.go) return restart
def generate_theme_button(self, *args): theme = Button(text_width=(self.width, None), halign='left') theme.curve = 25 image_source = 'assets/images/moon.png' if self.theme == "dark": image_source = 'assets/images/sun.png' theme.image.source = image_source return theme
def generate_sound_button(self, *args): sound = Button(background_color=get_color_from_hex('EC9449')) sound.curve = 25 set_color(sound, get_color_from_hex('EC9449')) sound.image.source = 'assets/images/sound_%s.png' % ( SOUND and 'on' or 'off' ) sound.bind(on_press=self.change_sound) return sound
def generate_play_button(self, *args): button = Button(background_color=get_color_from_hex('58CB85')) button.curve = 25 button.image.source = 'assets/images/play.png' set_color(button, get_color_from_hex('58CB85')) return button