Beispiel #1
0
    def __init__(self, size, caption=None, win=None):
        Window.__init__(self, size, caption, win)
        self.background = GameData.image(GET_NAME_BGD_IMG)

        button_image = GameData.image(BUTTON_IMG)
        self.ok_button = Button(GN_OK_BTN_POS, button_image, self.buttons)

        self.return_data = "NO NAME"
Beispiel #2
0
    def __init__(self, size, caption=None):
        Window.__init__(self, size, 'OmniTank Menu')
        self.background = GameData.image(MAIN_BGD_IMG)

        button_image = GameData.image(BUTTON_IMG)
        self.start_button = Button(MM_START_BTN_POS, button_image, self.buttons)
        self.instructions_button = Button(MM_INSTUC_BTN_POS, button_image, self.buttons)
        self.highscores_button = Button(MM_SCORES_BTN_POS, button_image, self.buttons)
        self.quit_button = Button(MM_QUIT_BTN_POS, button_image, self.buttons)

        self.instructions_window = InstructionsWindow(size, 'OmniTank Instructions', self)
        self.high_scores_window = HighScoresWindow(size, 'OmniTank High Scores', self)
        #self.color_choice_window = ColorChoiceWindow(size, 'OmniTank Color Choice', self)

        GameData.setMusicVolume(MUSIC_VOLUME)
        GameData.startMusic(BGD_MUSIC)
Beispiel #3
0
    def __init__(self, size, caption, other_window=None):
        if other_window:
            self.screen = other_window.screen
            self.clock = other_window.clock
        else:
            self.screen = pygame.display.set_mode(size)
            self.clock = pygame.time.Clock()

        self.caption = caption
        pygame.display.set_icon(GameData.image(ICON_IMG))
        
        self.fps = FPS
        self.running = True
        self.buttons = pygame.sprite.LayeredDirty()

        # This is returned by the run method
        self.return_data = None
Beispiel #4
0
    def __init__(self, size, caption=None, win=None):
        Window.__init__(self, size, caption, win)
        self.background = GameData.image(INSTRUCTIONS_BGD_IMG)

        button_image = GameData.image(BUTTON_IMG)
        self.main_menu_button = Button(I_RETURN_BTN_POS, button_image, self.buttons)