def __init__(self, screen) -> None: self.config = Settings() self.screen = screen self.resources_images = Path.images() + "starter" + sep self.bg_classic = pg.image.load( f"{self.resources_images}classic{sep}starter_screen{Path.IMAGE_SUFFIX}" ) self.bg_halloween = pg.image.load( f"{self.resources_images}halloween{sep}starter_screen{Path.IMAGE_SUFFIX}" ) self.bg_vaporwave = pg.image.load( f"{self.resources_images}vaporwave{sep}starter_screen{Path.IMAGE_SUFFIX}" ) self.bg_christmas = pg.image.load( f"{self.resources_images}christmas{sep}starter_screen{Path.IMAGE_SUFFIX}" ) self.bg_old_west = pg.image.load( f"{self.resources_images}old_west{sep}starter_screen{Path.IMAGE_SUFFIX}" ) self.size = self.config.size if self.size == (1280, 720): self.bg_classic = pg.transform.scale(self.bg_classic, (1280, 720)) self.bg_halloween = pg.transform.scale(self.bg_halloween, (1280, 720)) self.bg_vaporwave = pg.transform.scale(self.bg_vaporwave, (1280, 720)) self.bg_christmas = pg.transform.scale(self.bg_christmas, (1280, 720)) self.bg_old_west = pg.transform.scale(self.bg_old_west, (1280, 720))
def __init__(self, sb, screen, size, lb_res): self.screen = screen self.res = size self.style = f"{Path.style()}winner_menu{Path.DATA_SUFFIX}" self.soundtrack = Path.soundtracks() self.image = Path.images() self.lb_back, self.lb_player, self.lb_score, self.lb_mult = lb_res self.object_id = "#Text" if size[0] == 1920 else "#Text2" self.sb = sb self.scores = self._get_scores() self._show_lb()
def __init__(self, screen: Any, data: dict, **kwargs): self.screen = screen self.data = data self.score_1, self.score_2 = data.values() self.name_1, self.name_2 = data.keys() self.st = Settings() self.size = self.st.size self.width = self.st.width self.resources = Path.resources() self.styles = Path.styles() self.sounds = Path.sounds() self.soundtrack = Path.soundtracks() self.font = Path.fonts() self.image = Path.images() self._createUI(kwargs) self.sb = ScoreboardData(data) self.sb.updateTable() self.sb.winnerUpdate()