Esempio n. 1
0
class FrameTrapBotTab():
    def __init__(self, notebook):
        self.frame = Frame(notebook)
        self.launcher = TekkenBotLauncher(BotFrameTrap, False)
        self.entry_var = StringVar()
        self.entry_var.set("+4")
        self.entry = Entry(self.frame,
                           textvariable=self.entry_var,
                           font=("Consolas", 44))
        self.entry.configure(state="normal")

        self.recording = False
        self.button_record = Button(self.frame, text="Record")
        self.button_record.bind("<Button-1>", self.record_button)

        self.button_record.grid(row=1, column=0, sticky=W)
        self.entry.grid(row=0, column=0, sticky=N + S + E + W)
        Style().configure('TFrame', background='black')

    def record_button(self, event):
        if not self.recording:
            self.launcher.GetBot().Record()
            print('pressed record')
        else:
            notation = self.launcher.GetBot().Stop()
            self.entry_var.set(notation)
            print('stopped record')

        self.recording = not self.recording

    def update(self):
        self.launcher.GetBot().SetFrameTrapCommandFromNotationString(
            self.entry_var.get())
        self.launcher.Update()
Esempio n. 2
0
class FrameTrapBotTab():
    def __init__(self, notebook):
        self.frame = Frame(notebook)
        self.launcher = TekkenBotLauncher(BotFrameTrap, False)

        self.notation_display = NotationDisplayEntry(self.frame, self.launcher.GetBot())
        self.notation_display.frame.grid(row=0, column=0, sticky=N + S + E + W)

        Style().configure('TFrame', background='black')



    def update(self):
        self.launcher.GetBot().SetFrameTrapCommandFromNotationString(self.notation_display.entry_var.get())
        self.launcher.Update()
Esempio n. 3
0
class GUI_FrameTrapBot(Tk):
    def __init__(self):
        Tk.__init__(self)
        self.wm_title("Tekken Bot: Frame Trap Bot")
        #self.attributes("-topmost", True)
        #self.attributes("-alpha", "0.75")

        self.fa_p2_var = StringVar()
        self.fa_p2_var.set('??')
        self.frame_advantage_p2 = Label(self,
                                        textvariable=self.fa_p2_var,
                                        font=("Verdana", 44))
        self.frame_advantage_p2.pack(side="right", fill="both", expand=False)

        self.fa_p1_var = StringVar()
        self.fa_p1_var.set('??')
        self.frame_advantage_p1 = Label(self,
                                        textvariable=self.fa_p1_var,
                                        font=("Verdana", 44))
        self.frame_advantage_p1.pack(side="left", fill="both", expand=False)

        self.entry_var = StringVar()
        self.entry_var.set("+4")
        self.entry = Entry(self, textvariable=self.entry_var)
        self.entry.pack(side="top", fill="both", expand=True)
        self.entry.configure(state="normal")

        self.launcher = TekkenBotLauncher(BotFrameTrap)

    def update_launcher(self):
        self.launcher.GetBot().SetFrameTrapCommandFromNotationString(
            self.entry_var.get())
        self.launcher.Update()
        self.after(7, self.update_launcher)