Esempio n. 1
0
 def __init__(self, mdt):
     Gui.__init__(self, mdt)
     menu_args = Utils().menu_args
     menu_args.background = ''
     menu_args.btn_size = (-8.6, 8.6, -.42, .98)
     self.menu = Menu(menu_args)
     self.menu.push_page(InGamePage(self.menu))
Esempio n. 2
0
 def __init__(self, rprops, sprops, ranking, players):
     self.__rprops = rprops
     self.__sprops = sprops
     self.__ranking = ranking
     self.__players = players
     menu_props = sprops.gameprops.menu_props
     Menu.__init__(self, menu_props)
Esempio n. 3
0
class ExitMenuGui(Gui):
    def __init__(self, mdt, menu_args):
        Gui.__init__(self, mdt)
        self.menu = Menu(menu_args)
        self.menu.push_page(ExitPage(menu_args, self.menu))

    def destroy(self):
        self.menu = self.menu.destroy()
        Gui.destroy(self)
Esempio n. 4
0
class ExitMenuGui(GuiColleague):
    def __init__(self, mediator, menu_args):
        GuiColleague.__init__(self, mediator)
        self.menu = Menu(menu_args)
        self.menu.push_page(ExitPage(menu_args))

    def destroy(self):
        self.menu = self.menu.destroy()
        GuiColleague.destroy(self)
Esempio n. 5
0
 def __init__(self, mediator, menu_args, keys):
     GuiColleague.__init__(self, mediator)
     menu_args_c = deepcopy(menu_args)
     menu_args_c.background_img = ''
     menu_args_c.btn_size = (-8.6, 8.6, -.42, .98)
     self.menu = Menu(menu_args_c)
     page = InGamePage.init_cls()(menu_args_c, keys)
     page.gui.attach(self.on_ingame_back)
     page.gui.attach(self.on_ingame_exit)
     self.menu.push_page(page)
Esempio n. 6
0
File: menu.py Progetto: cflavio/yorg
class ExitMenuGui(GuiColleague):

    def __init__(self, mediator, menu_props):
        GuiColleague.__init__(self, mediator)
        self.menu = Menu(menu_props)
        self.menu.push_page(ExitPage(menu_props))

    def destroy(self):
        self.menu = self.menu.destroy()
        GuiColleague.destroy(self)
Esempio n. 7
0
class InGameMenuGui(Gui):
    def __init__(self, mdt):
        Gui.__init__(self, mdt)
        menu_args = Utils().menu_args
        menu_args.background = ''
        menu_args.btn_size = (-8.6, 8.6, -.42, .98)
        self.menu = Menu(menu_args)
        self.menu.push_page(InGamePage(self.menu))

    def destroy(self):
        self.menu = self.menu.destroy()
        Gui.destroy(self)
Esempio n. 8
0
 def __init__(self, mdt, loadinggui_props):
     Gui.__init__(self, mdt)
     l_p = loadinggui_props
     self.menu = Menu(l_p.menu_args)
     self.menu.loading = l_p.loading
     loadingpage_props = LoadingPageProps(self.menu, l_p.track_path,
                                          l_p.car_path, l_p.drivers,
                                          l_p.tracks, l_p.track_name_transl,
                                          l_p.single_race, l_p.grid,
                                          l_p.cars_path, l_p.drivers_path,
                                          l_p.joystick, l_p.keys)
     self.menu.push_page(LoadingPage(loadingpage_props))
Esempio n. 9
0
 def __init__(self, mediator, rprops, loading, track_name_transl, ranking,
              players):
     GuiColleague.__init__(self, mediator)
     pbackground = 'assets/tracks/%s/images/loading%s.txo'
     pbackground = pbackground % (rprops.track_name, randint(1, 4))
     menu_props = deepcopy(rprops.season_props.gameprops.menu_props)
     menu_props.background_img_path = pbackground
     self.menu = Menu(menu_props)
     self.menu.loading = loading
     self.menu.push_page(
         LoadingPage(rprops, self.menu, track_name_transl, ranking,
                     players))
Esempio n. 10
0
File: menu.py Progetto: rdb/yorg
 def __init__(self, mdt, menu_props):
     # every page should not manage following pages by forwarding params:
     # each page should callback the menu and it should spawn the next one
     Gui.__init__(self, mdt)
     m_p = menu_props
     self.menu = Menu(m_p.menu_args)
     mainpage_props = MainPageProps(
         m_p.opt_file, m_p.cars, m_p.car_path, m_p.phys_path, m_p.tracks,
         m_p.tracks_tr, m_p.track_img, m_p.player_name, m_p.drivers_img,
         m_p.cars_img, m_p.multiplayer, m_p.title_img, m_p.feed_url,
         m_p.site_url, m_p.has_save, m_p.season, m_p.season_tracks,
         m_p.support_url, m_p.drivers)
     self.menu.logic.push_page(YorgMainPage(self.menu, mainpage_props))
Esempio n. 11
0
File: menu.py Progetto: cflavio/yorg
 def __init__(self, mediator, menu_props, keys):
     GuiColleague.__init__(self, mediator)
     menu_props_c = deepcopy(menu_props)
     menu_props_c.background_img_path = ''
     menu_props_c.btn_size = (-8.6, 8.6, -.42, .98)
     self.menu = Menu(menu_props_c)
     page = InGamePage.init_cls()(menu_props_c, keys)
     page.gui.attach(self.on_ingame_back)
     page.gui.attach(self.on_ingame_exit)
     self.menu.push_page(page)
Esempio n. 12
0
class InGameMenuGui(GuiColleague):
    def __init__(self, mediator, menu_args, keys):
        GuiColleague.__init__(self, mediator)
        menu_args_c = deepcopy(menu_args)
        menu_args_c.background_img = ''
        menu_args_c.btn_size = (-8.6, 8.6, -.42, .98)
        self.menu = Menu(menu_args_c)
        page = InGamePage.init_cls()(menu_args_c, keys)
        page.gui.attach(self.on_ingame_back)
        page.gui.attach(self.on_ingame_exit)
        self.menu.push_page(page)

    def on_ingame_back(self):
        self.notify('on_ingame_back')

    def on_ingame_exit(self):
        self.notify('on_ingame_exit')

    def destroy(self):
        self.menu = self.menu.destroy()
        GuiColleague.destroy(self)
Esempio n. 13
0
File: menu.py Progetto: cflavio/yorg
class InGameMenuGui(GuiColleague):

    def __init__(self, mediator, menu_props, keys):
        GuiColleague.__init__(self, mediator)
        menu_props_c = deepcopy(menu_props)
        menu_props_c.background_img_path = ''
        menu_props_c.btn_size = (-8.6, 8.6, -.42, .98)
        self.menu = Menu(menu_props_c)
        page = InGamePage.init_cls()(menu_props_c, keys)
        page.gui.attach(self.on_ingame_back)
        page.gui.attach(self.on_ingame_exit)
        self.menu.push_page(page)

    def on_ingame_back(self):
        self.notify('on_ingame_back')

    def on_ingame_exit(self):
        self.notify('on_ingame_exit')

    def destroy(self):
        self.menu = self.menu.destroy()
        GuiColleague.destroy(self)
Esempio n. 14
0
 def __init__(self, mdt, menu_args):
     Gui.__init__(self, mdt)
     self.menu = Menu(menu_args)
     self.menu.push_page(ExitPage(menu_args, self.menu))
Esempio n. 15
0
 def __init__(self, mediator, menu_args):
     GuiColleague.__init__(self, mediator)
     self.menu = Menu(menu_args)
     self.menu.push_page(ExitPage(menu_args))
Esempio n. 16
0
File: menu.py Progetto: cflavio/yorg
 def __init__(self, mediator, menu_props):
     GuiColleague.__init__(self, mediator)
     self.menu = Menu(menu_props)
     self.menu.push_page(ExitPage(menu_props))