def __init__(self): self.background = graphics.ghostify(vista._screen.convert_alpha()) self.cloudticker = 0 self.active = True text = "Press y to delete your saved game and start over, or any other key to return to the game" self.textimg = font.blocktext(text, size = settings.layout.tipsize) self.torestart = False
def think(dt): global surf, rect import vista if not settings.showtips: return if not currenttip: surf = None else: surf = font.blocktext(currenttip)
def __init__(self): self.background = graphics.ghostify(vista._screen.convert_alpha()) self.cloudticker = 0 self.active = True text = _("Saving map to %s....") % settings.mapfile self.textimg = font.blocktext(text, size = settings.layout.tipsize) self.drawn = False self.savestate()
def think(dt): global surf, rect, ticker, bheight import vista if not settings.showtips: return if not currenttip: surf = None ticker = max(ticker - dt, 0) else: surf = font.blocktext(currenttip, size = settings.layout.tipsize) bheight = surf.get_height() ticker = min(ticker + dt, 0.25)
def __init__(self, text, buttonset, onselect = None, onconfirm = None): self.text = text self.buttonset = buttonset img0 = font.blocktext(text, size = settings.layout.tipsize) w0, h0 = img0.get_size() m = settings.layout.menubuttonmargin self.img = vista.Surface(w0 + 2*m, h0 + 2*m) self.img.blit(img0, (m, m)) self.onselect = onselect self.onconfirm = onconfirm self.rect = self.img.get_rect() self.selected = False