예제 #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()
예제 #2
0
    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)
예제 #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)
예제 #4
0
    def __init__(self):
        Tk.__init__(self)
        self.wm_title("Punisher Bot")
        self.geometry(str(720) + 'x' + str(720))

        Style().theme_use('alt')

        self.launcher = TekkenBotLauncher(BotPunisher, False)
예제 #5
0
    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')
예제 #6
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()
예제 #7
0
 def switchToPractice(self):
     print("Switching to Practice")
     self.launcher = TekkenBotLauncher(BotPunishPractice, False)
     self.overlay = GUI_TestOverlay(self, self.launcher, (1000, 35),
                                    (450, 170))
     self.launcher.botBrain.overlay = self.overlay
     self.overlay.WriteToOverlay("Switching to Practice")
예제 #8
0
 def switchToBDCBot(self):
     print("Switching to BDC Practice Bot")
     self.launcher = TekkenBotLauncher(BotBackDashCancelPractice, True)
     self.overlay = GUI_TestOverlay(self, self.launcher, (1000, 35),
                                    (450, 170))
     self.launcher.botBrain.overlay = self.overlay
     self.overlay.WriteToOverlay(
         "Switching to Back Dash Cancelling Practice")
예제 #9
0
    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')
예제 #10
0
 def test_command(self):
     print("Switching to Test Command")
     if self.launcher == None:
         self.launcher = TekkenBotLauncher(BotTestCommand, False)
     self.launcher.botBrain.overlay = self.overlay
     self.launcher.botBrain.Command = self.CommandBox.get("1.0", 'end-1c')
     self.launcher.botBrain.Delay = int(self.DelayBox.get("1.0", 'end-1c'))
     if self.CommandBox.edit_modified():
         print("Modified")
         self.movelist.updateMoveCommand(
             self.EditMove, self.CommandBox.get("1.0", 'end-1c'))
         self.CommandBox.edit_modified(False)
예제 #11
0
class GUI_PunisherBot(Tk):
    def __init__(self):
        Tk.__init__(self)
        self.wm_title("Punisher Bot")
        self.geometry(str(720) + 'x' + str(720))

        Style().theme_use('alt')

        self.launcher = TekkenBotLauncher(BotPunisher, False)

    def update_launcher(self):
        self.update()
        self.after(5, self.update_launcher)

    def update(self):
        self.launcher.Update()
예제 #12
0
    def testMoveList(self):
        print("Switching to Test Movelist")
        self.launcher = TekkenBotLauncher(BotTestCommand, False)
        self.overlay = GUI_TestOverlay(self, self.launcher, (1000, 35),
                                       (450, 170))
        self.launcher.botBrain.overlay = self.overlay

        #        character=self.launcher.gameState.stateLog[-1].bot.character_name
        character = "Akuma"
        charId = self.GetCharacterId(character)
        movelist = MoveList(charId)
        moves = movelist.GetAllMoveIds()
        moveCommands = []
        for id in moves:
            print(id)
            move = movelist.getMoveById(id)
            moveCommands.append(movelist.getMoveCommand(move))

        self.launcher.botBrain.Command = moveCommands
        self.launcher.botBrain.Delay = 60
예제 #13
0
    def editMovelists(self):
        self.launcher = TekkenBotLauncher(BotTestCommand, False)
        self.overlay = GUI_TestOverlay(self, self.launcher, (1000, 35),
                                       (450, 170))
        self.launcher.botBrain.overlay = self.overlay

        win = Toplevel()
        #        canvas = Canvas(win, bd=0, width=720, height=720)
        #        canvas.grid(row=0, column=0, sticky=N+S+E+W)

        #        frame = Frame(canvas, relief=SUNKEN, width=720, height=720)
        #        frame.grid_rowconfigure(0, weight=1)
        #        frame.grid_columnconfigure(0, weight=1)
        #        frame.grid_propagate(0)

        #frame.pack()
        #        frame.grid(row=0, column=1, sticky=N+W)

        i = 0
        self.CharIDLabel = Label(win, text="Character ID")
        self.CharIDLabel.grid(row=i, column=0)
        self.CharChoice = StringVar(win)
        self.chars = self.GetCharacterNamesWithIds()
        self.CharChoice.set('Alisa')
        self.CharID = OptionMenu(win, self.CharChoice, *self.chars)
        self.CharID.grid(row=i, column=1, sticky=W)
        #        self.CharIDBox = Text(win, height=1, width=10)
        #        self.CharIDBox.grid(row=i, column=1, sticky=W)
        self.CharNameBox = Text(win, height=1, width=30)
        self.CharNameBox.grid(row=i, column=2, sticky=W)
        self.CharNameBox.configure(state="disabled")
        self.LoadMovelistBtn = Button(win,
                                      text="Load Movelist",
                                      command=self.load_movelist)
        self.LoadMovelistBtn.grid(row=i, column=3)
        i = i + 1

        self.MoveIDLabel = Label(win, text="Move")
        self.MoveIDLabel.grid(row=i, column=0)

        #        self.MoveIdVar = StringVar(win)
        #        self.MoveId = OptionMenu(win, self.MoveIdVar, ['Please select character'])
        #        self.MoveId.grid(row=i, column=1, sticky=W)
        self.MoveIDBox = Text(win, height=1, width=10)
        self.MoveIDBox.grid(row=i, column=1, sticky=W)
        self.MoveNameBox = Text(win, height=1, width=30)
        self.MoveNameBox.grid(row=i, column=2, sticky=W)
        self.MoveNameBox.configure(state="disabled")
        self.LoadMoveBtn = Button(win,
                                  text="Load Move",
                                  command=self.load_move)
        self.LoadMoveBtn.grid(row=i, column=3)
        i = i + 1

        self.CommandLabel = Label(win, text="Command")
        self.CommandLabel.grid(row=i, column=0)
        self.CommandBox = Text(win, height=1, width=50)
        self.CommandBox.grid(row=i, column=1, columnspan=2, sticky=W)
        self.CommandBox.insert(END, '+1')
        i = i + 1

        self.DelayLabel = Label(win, text="Delay")
        self.DelayLabel.grid(row=i, column=0)
        self.DelayBox = Text(win, height=1, width=50)
        self.DelayBox.grid(row=i, column=1, columnspan=2, sticky=W)
        self.DelayBox.insert(END, '60')
        i = i + 1

        self.TestButton = Button(win, text="Test", command=self.test_command)
        self.TestButton.grid(row=i, column=0)
        self.StopButton = Button(win, text="Stop", command=self.stopBot)
        self.StopButton.grid(row=i, column=1)
        self.ShortcutsButton = Button(win,
                                      text="Command Shortcuts",
                                      command=self.show_shortcuts)
        self.ShortcutsButton.grid(row=i, column=2)
        self.SaveButton = Button(win,
                                 text="Save MoveList",
                                 command=self.save_move)
        self.SaveButton.grid(row=i, column=3)
        i = i + 1
예제 #14
0
 def switchToTest(self):
     print("Switching to Test Bot")
     self.launcher = TekkenBotLauncher(BotTest, False)
     self.overlay = GUI_TestOverlay(self, self.launcher, (1000, 35),
                                    (450, 170))
     self.launcher.botBrain.overlay = self.overlay
예제 #15
0
 def gui_record(self):
     self.launcher = TekkenBotLauncher(GUI_CommandRecorder, True)
     self.launcher.botBrain.gameState = self.launcher.gameState
예제 #16
0
 def record(self):
     self.launcher = TekkenBotLauncher(BotTest, True)
     self.recorder = CommandRecorder(self.launcher)