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 __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))
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))
def __init__(self, mdt, racegui_props): Gui.__init__(self, mdt) r_p = self.props = racegui_props result_props = ResultProps(r_p.menu_args, r_p.drivers_img, r_p.cars_imgs, r_p.share_urls, r_p.share_imgs, r_p.track_name) self.results = Results(result_props) self.loading = Loading(mdt) self.debug_txt = OnscreenText('', pos=(-.1, .1), scale=.05, fg=(1, 1, 1, 1), parent=eng.base.a2dBottomRight, align=TextNode.ARight) self.way_txt = OnscreenText('', pos=(.1, .1), scale=.1, fg=r_p.menu_args.text_err, parent=eng.base.a2dBottomLeft, align=TextNode.ALeft, font=FontMgr().load_font(r_p.font))
def destroy(self): self.results.destroy() self.loading.destroy() self.way_txt.destroy() self.minimap.destroy() Gui.destroy(self)
def destroy(self): self.menu = self.menu.destroy() Gui.destroy(self)
def __init__(self, mdt, tuninggui_props): Gui.__init__(self, mdt) self.props = tuninggui_props
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 __init__(self, mdt, background, font, fg_col): Gui.__init__(self, mdt) self.ranking_texts = [] self.background_path = background self.font = font self.fg_col = fg_col
def destroy(self): self.ranking_texts = None Gui.destroy(self)