コード例 #1
0
ファイル: market.py プロジェクト: michareichmann/Travian
 def __init__(self, mark_root, mark_travian):
     Gui.__init__(self)
     # tk
     self.root = mark_root
     # frame
     self.frame = Frame(self.root, bd=5, relief=GROOVE)
     # subframes
     self.send = Send(mark_root, mark_travian)
     self.offer = Offer(mark_root, mark_travian)
     # widgets
     self.label = Label(self.frame, text='Marketplace', font='font/Font 16 bold')
     self.margin = self.create_margin(self.frame)
コード例 #2
0
ファイル: raid_frame.py プロジェクト: michareichmann/Travian
 def __init__(self, gui, app):
     Gui.__init__(self)
     # tk
     self.root = gui
     self.travian = app
     # items
     self.news = None
     # frame
     self.frame = Frame(self.root, bd=5, relief=GROOVE)
     # widgets
     self.labels = self.create_labels()
     self.buttons = self.create_buttons()
コード例 #3
0
ファイル: info_frame.py プロジェクト: michareichmann/Travian
 def __init__(self, gui, app):
     Gui.__init__(self)
     # tk
     self.root = gui
     self.travian = app
     # frame
     self.frame = Frame(self.root, bd=5, relief=GROOVE)
     # items
     self.news = None
     self.stringvars = self.create_stringvars()
     # widgets
     self.labels = self.create_labels()
     self.buttons = self.create_buttons()
     self.spinboxes = self.create_spinboxes()
     # bools
     self.gather_attack_info = False
     self.flash_bg = False
コード例 #4
0
ファイル: send_frame.py プロジェクト: michareichmann/Travian
 def __init__(self, gui, app):
     Gui.__init__(self)
     # tk
     self.root = gui
     self.travian = app
     # frames
     self.frame = Frame(self.root)
     # items
     self.news = None
     self.images = self.create_images()
     self.stringvars = self.create_stringvars()
     self.intvars = self.create_intvars()
     # widgets
     self.buttons = self.create_buttons()
     self.labels = self.create_labels()
     self.opt_menus = self.create_opt_menus()
     self.spin_boxes = self.create_spin_boxes()
     self.check_buttons = self.create_check_buttons()
コード例 #5
0
    def __init__(self, game, bounds):
        Gui.__init__(self, game, bounds)
        self.game = game

        self.l = Label(Rectangle((25, 25, 100, 25)), 'Your Color:')
        self.addComponent(self.l)

        self.stone = Stone(None, 25, None)
        self.stone.getPos = lambda: self.getPos() + Vec(165, 35)

        self.applyB = Button(Rectangle((25, 75, 150, 50)), 'Apply Move')
        self.applyB.action = lambda x: game.applyMove()
        self.applyB.visible = False

        self.colorBs = []
        for color in range(1, 7):
            self.colorBs.append(Stone(color, 25, self))

        self.startB = None
コード例 #6
0
ファイル: main.py プロジェクト: pradishb/evolution_simulator
    def __init__(self, master):
        Gui.__init__(self, master, 'Evolution Simulator')
        self.builder.get_object('train')['state'] = 'disabled'
        self.builder.get_object('find_fitness')['state'] = 'disabled'
        self.builder.get_object('find_fitness_no_gui')['state'] = 'disabled'
        self.builder.get_object('sort')['state'] = 'disabled'
        self.builder.get_object('do_selection')['state'] = 'disabled'
        self.builder.get_object('reproduce')['state'] = 'disabled'
        set_entry(self.builder, 'save_as', get_default_name())

        self.scroll_frame = ScrollFrame(
            self.builder.get_object('creatures_frame'))
        self.scroll_frame.grid(sticky='nsew')
        for col in range(COL_COUNT):
            self.scroll_frame.view_port.columnconfigure(col, minsize=66)
        for row in range(POPULATION_SIZE // COL_COUNT + 1):
            self.scroll_frame.view_port.rowconfigure(row, minsize=106)

        self.simulation = Simulation()
        self.creatures = []
        self.serializable_creatures = {}
        self.generations = []
コード例 #7
0
ファイル: main.py プロジェクト: pradishb/vmware-manager
 def __init__(self, root):
     Gui.__init__(self, root)
     self.start_vms_on_start_up()
     self.start_vms_periodically()
     start_update_task(self.logger, 60 * 60)  # 1 hour