class ZoneMenuScreen(PygameScreen): """ Represents the screen for the Zone Menu """ def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.menuView = MenuWithBackgroundWidget(menu, self.width*.4, self.height) self.lastScreen = lastScreen def drawSurface(self): """ Draws the screen """ screenSurface = self.lastScreen.draw() self.drawOnSurface(screenSurface, left=0, top=0) menuSurface = self.menuView.draw() self.drawOnSurface(menuSurface, right=1, top=0)
class ZoneMenuScreen(PygameScreen): """ Represents the screen for the Zone Menu """ def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.menuView = MenuWithBackgroundWidget(menu, self.width * .4, self.height) self.lastScreen = lastScreen def drawSurface(self): """ Draws the screen """ screenSurface = self.lastScreen.draw() self.drawOnSurface(screenSurface, left=0, top=0) menuSurface = self.menuView.draw() self.drawOnSurface(menuSurface, right=1, top=0)
class YesNoScreen(PygameScreen): """ Represents the screen for Picking Yes/No """ def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.lastScreen = lastScreen self.messageBox = None self.menuView = MenuWithBackgroundWidget(menu, .15 * self.width, .2 * self.height) def drawSurface(self): """ Draws the screen """ previousScreenSurface = self.lastScreen.draw() self.drawOnSurface(previousScreenSurface, left=0, top=0) if self.messageBox is not None: messageBoxSurface = self.messageBox.draw() self.drawOnSurface(messageBoxSurface, left=.05, top=.7) menuSurface = self.menuView.draw() self.drawOnSurface(menuSurface, right=.95, centery=.6)
class YesNoScreen(PygameScreen): """ Represents the screen for Picking Yes/No """ def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.lastScreen = lastScreen self.messageBox = None self.menuView = MenuWithBackgroundWidget(menu, .15*self.width, .2*self.height) def drawSurface(self): """ Draws the screen """ previousScreenSurface = self.lastScreen.draw() self.drawOnSurface(previousScreenSurface, left=0, top=0) if self.messageBox is not None: messageBoxSurface = self.messageBox.draw() self.drawOnSurface(messageBoxSurface, left=.05, top=.7) menuSurface = self.menuView.draw() self.drawOnSurface(menuSurface, right=.95, centery=.6)