Skip to content

Commit 3095ded

Browse files
author
arch
committed
add ctypes
1 parent db77093 commit 3095ded

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

contrib/Installer/mtfg-ofs-extension-installer.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,32 @@
99
import traceback
1010
import shutil
1111
import subprocess
12+
import ctypes
1213

1314
from packaging import version
1415
from bs4 import BeautifulSoup # beautifulsoup4
1516
from tqdm import tqdm
1617

17-
VERSION = "v0.0.2"
18+
VERSION = "v0.0.3"
1819
LUA_EXTENSION_URL = "https://raw.githubusercontent.com/michael-mueller-git/Python-Funscript-Editor/main/contrib/Installer/assets/main.lua"
1920
FUNSCRIPT_GENERATOR_RELEASE_URL = "https://github.com/michael-mueller-git/Python-Funscript-Editor/releases"
2021
OFS_EXTENSION_DIR = os.path.expandvars(r'%APPDATA%\OFS\OFS_data\extensions')
2122
LATEST_RELEASE_API_URL = 'https://api.github.com/repos/michael-mueller-git/Python-Funscript-Editor/releases/latest'
2223

2324

25+
def Mbox(title, text, style):
26+
"""
27+
## Styles:
28+
## 0 : OK
29+
## 1 : OK | Cancel
30+
## 2 : Abort | Retry | Ignore
31+
## 3 : Yes | No | Cancel
32+
## 4 : Yes | No
33+
## 5 : Retry | Cancel
34+
## 6 : Cancel | Try Again | Continue
35+
"""
36+
return ctypes.windll.user32.MessageBoxW(0, text, title, style)
37+
2438
class DownloadProgressBar(tqdm):
2539
def update_to(self, b=1, bsize=1, tsize=None):
2640
if tsize is not None:

0 commit comments

Comments
 (0)