예제 #1
0
 def bld_page(self):
     self.frm = DirectFrame(frameSize=(-1.5, 1.5, -.9, .9),
                            frameColor=(.95, .95, .7, .85))
     txt = _("What do you want to do?\n\nNB Use 'p' for pausing the game.")
     menu_args = self.mdt.menu.gui.menu_args
     self.txt = OnscreenText(text=txt,
                             pos=(0, .64),
                             scale=.08,
                             wordwrap=32,
                             fg=menu_args.text_fg,
                             font=menu_args.font)
     on_back = lambda: self.on_end(True)
     on_end = lambda: self.on_end(False)
     menu_data = [('back to the game', _('back to the game'), on_back),
                  ('back to the main menu', _('back to the main menu'),
                   on_end)]
     btn_args = menu_args.btn_args
     btn_visit = DirectButton(text=menu_data[0][1],
                              pos=(0, 1, 0),
                              command=menu_data[0][2],
                              text_scale=.8,
                              **btn_args)
     btn_dont_visit = DirectButton(text=menu_data[1][1],
                                   pos=(0, 1, -.5),
                                   command=menu_data[1][2],
                                   text_scale=.8,
                                   **btn_args)
     map(self.add_widget, [self.frm, self.txt, btn_visit, btn_dont_visit])
     PageGui.bld_page(self, False)
     eng.hide_cursor()
     eng.show_standard_cursor()
     eng.do_later(.01, eng.toggle_pause, [False])
예제 #2
0
파일: exitpage.py 프로젝트: rdb/yorg
 def bld_page(self):
     menu_args = self.mdt.menu.gui.menu_args
     self.frm = DirectFrame(frameSize=(-1.5, 1.5, -.9, .9),
                            frameColor=(.95, .95, .7, .85))
     txt = _(
         'Please, visit our site after exiting!\n\nIt helps us! Thank you!')
     self.txt = OnscreenText(text=txt,
                             pos=(0, .64),
                             scale=.08,
                             wordwrap=32,
                             fg=menu_args.text_fg,
                             font=menu_args.font)
     menu_data = [('visit our site after exiting',
                   _('visit our site after exiting'),
                   lambda: self.on_end(True)),
                  ("don't visit our site after exiting",
                   _("don't visit our site after exiting"),
                   lambda: self.on_end(False))]
     btn_args = self.mdt.menu.gui.menu_args.btn_args
     btn_args['frameSize'] = (-12, 12, -.8, 1.2)
     btn_visit = DirectButton(text=menu_data[0][1],
                              pos=(0, 1, 0),
                              command=menu_data[0][2],
                              text_scale=.9,
                              **btn_args)
     btn_dont_visit = DirectButton(text=menu_data[1][1],
                                   pos=(0, 1, -.5),
                                   command=menu_data[1][2],
                                   text_scale=.7,
                                   **btn_args)
     widgets = [self.frm, self.txt, btn_visit, btn_dont_visit]
     map(self.add_widget, widgets)
     PageGui.bld_page(self, False)
예제 #3
0
 def bld_page(self):
     menu_args = self.menu_args
     t_a = menu_args.text_args
     t_a['fg'] = menu_args.text_bg
     t_a['scale'] = .06
     self.add_widget(OnscreenText(
         text=_('Thanks to: ') + Utils().get_thanks(1)[0], pos=(.05, .05),
         align=TextNode.A_left, parent=base.a2dBottomLeft, **t_a))
     PageGui.bld_page(self)
예제 #4
0
 def bld_page(self):
     menu_args = self.menu_args
     text = ', '.join(Utils().get_all_thanks())
     txt = OnscreenText(text=text,
                        pos=(0, .6),
                        wordwrap=32,
                        **menu_args.text_args)
     self.add_widget(txt)
     PageGui.bld_page(self)