Skip to content

Commit

Permalink
this should work the gamepad
Browse files Browse the repository at this point in the history
this should allow for the seperate window as well as the visualization of the inputs
  • Loading branch information
DarkCloud-the committed Aug 19, 2024
1 parent f057040 commit 58502c7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Empty file added UI/Assets/gamepad_input.py
Empty file.
25 changes: 25 additions & 0 deletions UI/Assets/visualizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import tkinter as tk
from gamepad_input import GamepadInput

class GamepadVisualizer:
def __init__(self, master):
self.master = master
master.title("Xbox Gamepad Visualizer")

self.gamepad_input = GamepadInput()

# Create visual elements for buttons, triggers, etc. (You'll need to design this part)
# ...

self.update_gamepad_display()

def update_gamepad_display(self):
events = self.gamepad_input.get_gamepad_events()
# Update visual elements based on button states
# ...

self.master.after(10, self.update_gamepad_display) # Update every 10 milliseconds

root = tk.Tk()
visualizer = GamepadVisualizer(root)
root.mainloop()

0 comments on commit 58502c7

Please sign in to comment.