Skip to content

Commit b268d51

Browse files
Berserker66FlySniper
authored andcommitted
Utils: support messagebox on windows without dependencies (ArchipelagoMW#2224)
1 parent 781da35 commit b268d51

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Utils.py

+5
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,11 @@ def is_kivy_running():
680680
if zenity:
681681
return run(zenity, f"--title={title}", f"--text={text}", "--error" if error else "--info")
682682

683+
elif is_windows:
684+
import ctypes
685+
style = 0x10 if error else 0x0
686+
return ctypes.windll.user32.MessageBoxW(0, text, title, style)
687+
683688
# fall back to tk
684689
try:
685690
import tkinter

0 commit comments

Comments
 (0)