def createModeController(self): """ Creates and configures widget for booth mode controller. """ photo = Image('resources/icons/photo.png') video = Image('resources/icons/video.png') self.mode.add(photo) self.mode.add(self.modeLabel) self.mode.add(video) photo.onClick = lambda: self.setMode(PHOTO_MODE) video.onClick = lambda: self.setMode(VIDEO_MODE)
def createRecordButton(self): """ """ # TODO : Use centered button. container = Panel(orientation='horizontal', padding=30) button = Image('resources/icons/record.png') button.onClick = lambda: self.capture() container.add(button) self.sidebar.add(container)