def draw_combo(self, combo, background, index, combotype): if combotype == self.NORMAL: x = 13 * self.settings.scale frames = self.score_frames[int(index)] else: x = 17 * self.settings.scale frames = self.score_fadeout[int(index)] # for digit in str(combo): # digit = int(digit) # img = frames[digit][int(index)] # y = self.height - img.size[1] # x, x_offset, y_offset = self.next_pos(x, y, img) # imageproc.add(img, background, x_offset - self.h, y_offset, alpha=self.alpha) # # img = frames[10][int(index)] # y = self.height - img.size[1] # x, x_offset, y_offset = self.next_pos(x, y, img) # imageproc.add(img, background, x_offset - self.h, y_offset, alpha=self.alpha) imageproc.draw_number(background, str(combo) + "x", frames, x, self.height - frames[0].size[1] / 2, alpha=self.alpha, origin="left", gap=self.gap)
def draw_score(self, score_string, background, x, y, alpha, gap=None): frames = self.numberframes[0] if gap is None: gap = self.gap frames = self.numberframes[1] score_string += "x" imageproc.draw_number(background, score_string, frames, x, y, alpha, origin="left", gap=gap)
def draw_score(self, score_string, background, x, y, alpha): imageproc.draw_number(background, score_string + "%", self.numberframes, x, y, alpha, origin="left", gap=self.gap)
def drawnumber(self, background, x_offset, y_offset, number, frames, alpha): if number == "0": return number = number imageproc.draw_number(background, number, frames, x_offset, y_offset + self.height * 0.8, alpha, "left", gap=1.15 * self.settings.scale)
def draw_number(self, background): x = self.countersettings[ self.prefix + "x"] * self.settings.scale - self.frames[0].size[0] / 2 y = self.countersettings[ self.prefix + "y"] * self.settings.scale + self.frames[0].size[1] / 2 origin = 'center' if self.countersettings["Center Text"] else 'right' imageproc.draw_number(background, self.score, self.frames, x, y, self.countersettings[self.prefix + "Alpha"], origin=origin, gap=0)
def draw_acc(self, acc, background, x): """ :param acc: string :param background: PIL.Image :param x: int :param y: int :return: """ y = self.y + self.h() / 2 imageproc.add(self.frames["%"], background, x, y) x = x + self.gap - self.frames["%"].size[0] imageproc.draw_number(background, acc, self.frames, x, y, alpha=1, origin="right", gap=self.gap, constantgap=False)
def draw_number(self, background): counter = 0 gap = self.countersettings["Hitresult Gap"] * self.countersettings[ "Hitresult Size"] origin = 'center' if self.countersettings["Center Text"] else 'right' for n in self.score: if n == 300: continue x = (self.countersettings[self.prefix + "x"] + gap * counter) * self.settings.scale - self.frames[0].size[0] / 2 y = self.countersettings[ self.prefix + "y"] * self.settings.scale + self.frames[0].size[1] / 2 imageproc.draw_number(background, self.score[n], self.frames, x, y, self.countersettings["Hitresult Alpha"], origin=origin, gap=0) counter += 1