Esempio n. 1
0
    def setup(self):
        # creates buttons in main menu
        self.button_list = []

        easy_button = TextButton.EasyTextButton(250, 300, self.set_easy_diff)
        self.button_list.append(easy_button)

        medium_button = TextButton.MedTextButton(400, 300, self.set_med_diff)
        self.button_list.append(medium_button)

        hard_button = TextButton.HardTextButton(550, 300, self.set_hard_diff)
        self.button_list.append(hard_button)

        start_button = TextButton.StartButton(400, 200, self.start_game)
        self.button_list.append(start_button)

        help_button = TextButton.CreateButton(400, 100, self.help, 100, 40,
                                              "How To Play")
        self.button_list.append(help_button)
Esempio n. 2
0
 def on_mouse_release(self, x, y, button, key_modifiers):
     TextButton.check_mouse_release_for_buttons(x, y, self.button_list)
Esempio n. 3
0
 def on_mouse_press(self, x, y, button, key_modifiers):
     TextButton.check_mouse_press_for_buttons(x, y, self.button_list)
Esempio n. 4
0
 def on_mouse_press(self, x, y, button, key_modifiers):
     # checks if mouse press is on a button
     TextButton.check_mouse_press_for_buttons(x, y, self.button_list)
     Orb.check_mouse_press_for_orbs(x, y, self.orb_list)
     Orb.check_mouse_press_for_slots(x, y, self.slot_list)
     print(self.current_room)
Esempio n. 5
0
 def createup(self):
     up_button = TextButton.CreateButton(400, 550, var.game_window.move_up, 70, 30, "Up")
     self.button_list.append(up_button)
     self.rectangle_list.append(self.downrect)
     self.up = True
     self.created = True
Esempio n. 6
0
 def createdown(self):
     down_button = TextButton.CreateButton(400, 50, var.game_window.move_down, 70, 30, "Down")
     self.button_list.append(down_button)
     self.rectangle_list.append(self.uprect)
     self.down = True
     self.created = True
Esempio n. 7
0
 def createright(self):
     right_button = TextButton.CreateButton(700, 300, var.game_window.move_right, 70, 30, "Right")
     self.button_list.append(right_button)
     self.rectangle_list.append(self.rightrect)
     self.right = True
     self.created = True
Esempio n. 8
0
 def createleft(self):
     left_button = TextButton.CreateButton(100, 300, var.game_window.move_left, 70, 30, "Left")
     self.button_list.append(left_button)
     self.rectangle_list.append(self.leftrect)
     self.left = True
     self.created = True