This commit is contained in:
alstergym
2026-09-30 11:02:12 +02:00
parent c0a55bf74c
commit 0843a184e0
17 changed files with 31 additions and 2 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+30 -1
View File
@@ -2,7 +2,7 @@ import copy
import pygame
class MeinSpiel:
bilder = ["Bilder/Schach.jpg","Bilder/stern.jpg","Bilder/motiv1.jpg","Bilder/motiv2.jpg","Bilder/motiv3.jpg","Bilder/motiv4.jpg","Bilder/motiv5.jpg","Bilder/motiv6.jpg","Bilder/motiv7.jpg","Bilder/motiv8.jpg"]
bilder = ["Bilder/Schach.jpg","Bilder/stern.jpg","Bilder/motiv1.png","Bilder/motiv2.png","Bilder/motiv3.png","Bilder/motiv4.png","Bilder/motiv5.png","Bilder/motiv6.png","Bilder/motiv7.png","Bilder/motiv8.png"]
spielfeld = []
def __init__(self, felderX, felderY):
@@ -29,3 +29,32 @@ class MeinSpiel:
print(i)
from pynput import mouse
# Callback-Funktion bei Mausklick
def on_click(x, y, button, pressed):
if pressed:
print(f"Mausklick gedrückt bei Position ({x}, {y}) mit Taste {button}")
else:
print(f"Mausklick losgelassen bei Position ({x}, {y}) mit Taste {button}")
# Callback-Funktion bei Mausbewegung
def on_move(x, y):
print(f"Maus bewegt zu Position ({x}, {y})")
# Callback-Funktion beim Mausrad-Scrollen
def on_scroll(x, y, dx, dy):
print(f"Mausrad bewegt bei Position ({x}, {y}) – Delta: ({dx}, {dy})")
# Listener starten
with mouse.Listener(
on_click=on_click,
on_move=on_move,
on_scroll=on_scroll
) as listener:
print("Maus-Event-Listener gestartet. Beenden mit STRG+C.")
listener.join()