from gamedata.objects.button import Button class Rescale(Button): def __init__(self,x,y,game,w,h): super().__init__(x,y,game,w,h) self.text = "Reset window scale" def reset(self,game): game.screen = game.pygame.display.set_mode((game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT),game.pygame.RESIZABLE) game.screenw,game.screenh = game.DISPLAY_WIDTH,game.DISPLAY_HEIGHT game.screenoffx,game.screenoffy = 0,0 self.click = reset