添加「危」选中音效,异步执行

This commit is contained in:
13632530821
2022-11-19 18:11:52 +08:00
parent f13727c107
commit b0653d3fc2
2 changed files with 3 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import tkinter.messagebox as msgbox
import random
import sys
import win32con, win32api
import winsound
gui_size = "620x200"
@@ -31,6 +32,7 @@ up_percent = 30
down_persent = 40
filename = "names.xls"
configname = "config.data"
selname = "sel.wav"
elim_rows = 1
percent_override = True
@@ -173,6 +175,7 @@ def choose():
class_label.config(text = choice.class_name)
subject_label.config(text = choice.subject)
last_choice = choice.name
winsound.PlaySound(selname, winsound.SND_ASYNC | winsound.SND_FILENAME)
startrandom = Button(gui, text = "立刻摇人!", font = ("宋体", 17, "bold"), height = 2, fg = "red", command = choose, bg = "white")