def get_selection_frame(self, button): """ Create the selection frame used in Page mode :param button: button for which the selection frame should be created :return: selection frame component """ x = button.components[0].content.x y = button.components[0].content.y w = button.components[0].content.w h = button.components[0].content.h i = self.image_util.scale_image(self.selection[1], (w, h)) c = Component(self.util, i) c.content_x = x c.content_y = y c.name = "station_menu.selection" c.image_filename = self.selection[0] c.visible = False c.selection_index = button.state.index_in_page return c
def get_selection_frame(self, button): """ Create the selection frame used in Page mode :param button: button for which the selection frame should be created :return: selection frame component """ x = button.components[0].content.x y = button.components[0].content.y w = button.components[0].content.w h = button.components[0].content.h i = self.util.scale_image(self.selection[1], (w, h)) c = Component(self.util, i) c.content_x = x c.content_y = y c.name = "station_menu.selection" c.image_filename = self.selection[0] c.visible = False c.selection_index = button.state.index_in_page return c