def __init__(self, handle): activity.Activity.__init__(self, handle) self.init_vars() self.build_toolbar() self.actividad = conozco.Conozco(self) self.build_canvas() self.run_canvas() self.show_all()
def __init__(self, handle): activity.Activity.__init__(self, handle) self.max_participants = 1 self.actividad = conozco.Conozco() self._pygamecanvas = sugargame.canvas.PygameCanvas(self) self.set_canvas(self._pygamecanvas) self._pygamecanvas.grab_focus() self._pygamecanvas.run_pygame(self.actividad.principal)
def __init__(self, handle): activity.Activity.__init__(self, handle) self.max_participants = 1 self.game = conozco.Conozco(self) self.game.canvas = sugargame.canvas.PygameCanvas( self, main=self.game.principal, modules=[pygame.display, pygame.font]) self.set_canvas(self.game.canvas) self.game.canvas.grab_focus()
def __init__(self, handle): activity.Activity.__init__(self, handle) self.max_participants = 1 self.sound_enable = True toolbox = ToolbarBox() activity_button = ActivityToolbarButton(self) toolbox.toolbar.insert(activity_button, 0) activity_button.show() separator = Gtk.SeparatorToolItem() separator.props.draw = True toolbox.toolbar.insert(separator, -1) separator.show() sound_button = ToolButton('speaker-muted-100') sound_button.set_tooltip(_('Sound')) sound_button.connect('clicked', self.sound_control) toolbox.toolbar.insert(sound_button, -1) sound_button.show() separator2 = Gtk.SeparatorToolItem() separator2.props.draw = False separator2.set_expand(True) toolbox.toolbar.insert(separator2, -1) separator2.show() stop_button = StopButton(self) stop_button.props.accelerator = _('<Ctrl>Q') toolbox.toolbar.insert(stop_button, -1) stop_button.show() toolbox.show() self.set_toolbar_box(toolbox) self.show_all() self.game = conozco.Conozco(self) self.game.canvas = sugargame.canvas.PygameCanvas( self, main=self.game.run, modules=[ pygame.display, pygame.font, pygame.mixer]) self.set_canvas(self.game.canvas) self.game.canvas.grab_focus()