Exemple #1
0
    def __init__(self, game):
        Menu.__init__(self, game)
        self.game = game
        self.state = PauzeMenu.STATE.START_NEW_GAME
        self.space_h = 40
        self.pauze_offset_x = 30
        self.pauze_offset_y = 30
        self.curr_offset_x = 100

        self.start_x, self.start_y = self.pauze_offset_x, self.pauze_offset_y
        self.save_x, self.save_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 1)
        self.load_x, self.load_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 2)
        self.options_x, self.options_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 3)
        self.credits_x, self.credits_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 4)
        self.exit_x, self.exit_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 5)

        self.cursor_rect_l.midtop = (self.start_x + self.offset_l +
                                     self.curr_offset_x,
                                     self.start_y + self.offset_h)
        self.cursor_rect_r.midtop = (self.start_x + self.offset_r +
                                     self.curr_offset_x,
                                     self.start_y + self.offset_h)
        self.mouse_is_over_menu = False
 def __init__(self, game):
     Menu.__init__(self, game)
     self.game = game
     self.xml = load_xml("inventory_menu.xml")
     self.option_index = 0
     self.main_off_menu = MainOrOffHandMenu(self.game)
     self.mouse_is_over_menu = False
    def __init__(self, game):
        Menu.__init__(self, game)
        self.game = game
        self.state = CreateCharacterMenu.STATE.SELECT_RACE

        self.selected_race = None
        self.selected_class = None

        self.loadet_race = None
        self.loadet_class = None

        self.select_panel_x = 0
        self.select_panel_y = 300
        self.offset_x = 30
        self.offset_y = 30

        self.option_index = 0
        self.loadet_index = -1

        self.race = [
            RACE.DRAGONBORN, RACE.DWARF, RACE.ELF, RACE.GNOME, RACE.HALF_ELF,
            RACE.HALFLING, RACE.HALF_ORC, RACE.HUMAN, RACE.TIEFLING
        ]

        self._class = [
            CLASS.BARBARIAN, CLASS.BARD, CLASS.CLERIC, CLASS.DRUID,
            CLASS.FIGHTER, CLASS.MONK, CLASS.PALADIN, CLASS.RANGER,
            CLASS.ROGUE, CLASS.SORCERER, CLASS.WARLOCK, CLASS.WIZARD
        ]

        self._set = ["First Set", "Secend Set"]

        self._stats = [
            "Strenght", "Dexterity", "Constitution", "Intelligence", "Wisdom",
            "Charisma"
        ]

        self.strenght = 0
        self.dexterity = 0
        self.constitution = 0
        self.intelligence = 0
        self.wisdom = 0
        self.charisma = 0

        self.t_strenght = 0
        self.t_dexterity = 0
        self.t_constitution = 0
        self.t_intelligence = 0
        self.t_wisdom = 0
        self.t_charisma = 0

        self.sel_weapon_index = -1
        self.sel_armor_index = -1
        self.sel_items_index = -1

        self.rolls = []

        self.player_name = None
Exemple #4
0
 def __init__(self, app_dir, main_menu, camera, theme_mgr, widget_properties, \
         config, player=None):
     Menu.__init__(self, widget_properties)
     self.main_menu = main_menu
     self.app_dir = app_dir
     self.camera = camera
     # self.theme_mgr = theme_mgr
     self.player = player
     # self.menu_list = {}
     # self.menu_list['singscreen'] = self
     self.config = config
Exemple #5
0
    def __init__(self, widget_props, song_data=None, \
            player=None, keyboard_event=None, song=None, \
            song_event=None):
        Menu.__init__(self, widget_props)
        l_continue = _(u'continue singing')
        l_quit = _(u'quit song')

        self.song_data = song_data
        self.song = song
        self.player = player
        self.keyboard_event = keyboard_event
        self.song_event = song_event
Exemple #6
0
    def __init__(self, widget_properties):
        Menu.__init__(self, widget_properties)
        l_next = _(u'next >>')
        l_prev = _(u'<< previous')

        self.prev_button = MenuButton(label=l_prev, \
            widget_properties=self.widget_properties)
        self.next_button = MenuButton(l_next, \
            widget_properties=self.widget_properties)
        self.add(self.prev_button, 'center')
        self.add(self.next_button, 'center')

        # self.bc_top = self.nc_top + 10 + self.nc_height
        # self.bc_left = 20
        # self.bc_width = self.screen_res_x - 40
        # self.bc_height = self.screen_res_y - self.bc_top - 25
        # self.bc_right = 20
        # self.bc_bottom = 30
        # self.box_cont = pudding.container.Container( \
        #         self, left=self.bc_left, top=self.bc_top, \
        #         width=self.bc_width, height=self.bc_height, \
        #         right=self.bc_right)

        # self.bg_box = pudding.control.Box(self.box_cont, \
        #         width=self.bc_width, \
        #         height=self.bc_height, \
        #         background_color=self.box_bg_color, \
        #         border_color=self.box_border_color, \
        #         z_index=-3)
        # self.bg_box.anchors = pudding.ANCHOR_ALL

        # self.directory_cont = pudding.container.HorizontalContainer( \
        #     self.box_cont, top=self.height * 0.02, \
        #     right=self.right, width=self.width, \
        #     height=self.height, left=0)

        pos_size = {}
        pos_size['top'] = 0
        pos_size['left'] = 0
#        pos_size['height'] = self.height * 0.05
#        pos_size['width'] = self.width * 0.3

        # self.directory_cont.anchors = pudding.ANCHOR_ALL
        # self.directory_cont.padding = 10

        # self.directory_up_button = MenuButton("<<", \
        #     widget_properties = self.widget_properties, pos_size=pos_size)
        # self.directory_cont.add_child(self.directory_up_button, \
        #         pudding.ALIGN_LEFT)

        pos_size = {}
        pos_size['top'] = 0
Exemple #7
0
    def __init__(self, game):
        Menu.__init__(self, game)
        self.game = game
        self.pauze_offset_x = 30
        self.pauze_offset_y = 30
        self.curr_offset_x = 100

        self.strenght_x, self.strenght_y = self.pauze_offset_x, self.pauze_offset_y
        self.dexterity_x, self.dexterity_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 1)
        self.constitution_x, self.constitution_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 2)
        self.intelligence_x, self.intelligence_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 3)
        self.wisdom_x, self.wisdom_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 4)
        self.charisma_x, self.charisma_y = self.pauze_offset_x, self.pauze_offset_y + (
            self.space_h * 5)
Exemple #8
0
    def __init__(self, app_dir, widget_properties, theme_mgr, main_menu, player):

        Menu.__init__(self, widget_properties)
        self.l_help_hint_0 = _(u'Press [h] for help...')
        self.l_help_hint_1 = _(u'Press [ESC] to go back...')
        self.l_help_hint = self.l_help_hint_0
        self.l_bpm = _(u'BPM: ')
        self.l_line_no = _(u'Line: ')
        self.separator = u' - '
        self.h_help = _(u'Help')
        self.help_file_path = os.path.join(app_dir, 'misc', 'HELP.txt')
        self.widget_properties = widget_properties
        self.app_dir = app_dir
        #self.parent_widget = widget_properties['root_widget']
        self.theme_mgr = theme_mgr

        self.screen_res_x = int(widget_properties['config']['screen']['resolution'].split('x')[0])
        self.screen_res_y = int(widget_properties['config']['screen']['resolution'].split('x')[1])

        # self.font_p = widget_properties['font']['p']['obj']
        # self.color_p = widget_properties['font']['p']['color']

        # self.font_h = widget_properties['font']['h1']['obj']
        # self.color_h = widget_properties['font']['h1']['color']

        self.main_menu = main_menu
        # self.help_hint_cont = pudding.container.VerticalContainer( \
        #         self, left=self.screen_res_x / 2.5, top=5)
        # self.help_hint_cont.right = 10
        # self.help_hint_cont.anchors = pudding.ANCHOR_ALL
        # self.keyboard_event = KeyboardEvent(self.widget_properties, theme_mgr)

        self.txt_input = InputField(self.widget_properties, '')
#        self.txt_input.label.visible = 0

        self.player = player
        self.__connect_keys__()
        self.msg = dict()
Exemple #9
0
 def __init__(self,game):
     Menu.__init__(self, game)
     self.xml = load_xml("main_menu.xml")  
     self.state = MainMenu.STATE.START.value 
     self.mouse_is_over_menu = False
Exemple #10
0
 def __init__(self, game):
     Menu.__init__(self, game)
     self.xml = load_xml("option_menu.xml")
     self.state = OptionsMenu.STATE.VOLUME.value
     self.mouse_is_over_menu = False
Exemple #11
0
 def __init__(self, game):
     Menu.__init__(self, game)
     self.game = game
Exemple #12
0
 def __init__(self, game):
     Menu.__init__(self, game)