-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this should allow for the seperate window as well as the visualization of the inputs
- Loading branch information
1 parent
f057040
commit 58502c7
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |