mirror of
https://github.com/HChaZZY/Random-Picker.git
synced 2025-12-06 10:33:50 +08:00
添加「危」选中音效,异步执行
This commit is contained in:
3
点名器.pyw
3
点名器.pyw
@@ -4,6 +4,7 @@ import tkinter.messagebox as msgbox
|
|||||||
import random
|
import random
|
||||||
import sys
|
import sys
|
||||||
import win32con, win32api
|
import win32con, win32api
|
||||||
|
import winsound
|
||||||
|
|
||||||
gui_size = "620x200"
|
gui_size = "620x200"
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ up_percent = 30
|
|||||||
down_persent = 40
|
down_persent = 40
|
||||||
filename = "names.xls"
|
filename = "names.xls"
|
||||||
configname = "config.data"
|
configname = "config.data"
|
||||||
|
selname = "sel.wav"
|
||||||
elim_rows = 1
|
elim_rows = 1
|
||||||
percent_override = True
|
percent_override = True
|
||||||
|
|
||||||
@@ -173,6 +175,7 @@ def choose():
|
|||||||
class_label.config(text = choice.class_name)
|
class_label.config(text = choice.class_name)
|
||||||
subject_label.config(text = choice.subject)
|
subject_label.config(text = choice.subject)
|
||||||
last_choice = choice.name
|
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")
|
startrandom = Button(gui, text = "立刻摇人!", font = ("宋体", 17, "bold"), height = 2, fg = "red", command = choose, bg = "white")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user