Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Python_超人
宇宙模拟器
提交
af6c0d96
宇宙模拟器
项目概览
Python_超人
/
宇宙模拟器
通知
19
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
宇宙模拟器
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
af6c0d96
编写于
7月 26, 2023
作者:
三月三net
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Python超人-宇宙模拟器
上级
d3a4ce5a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
9 deletion
+14
-9
tools/video_cap_main.py
tools/video_cap_main.py
+14
-9
未找到文件。
tools/video_cap_main.py
浏览文件 @
af6c0d96
...
@@ -86,7 +86,9 @@ def start():
...
@@ -86,7 +86,9 @@ def start():
messagebox
.
showwarning
(
"消息"
,
err_msg
)
messagebox
.
showwarning
(
"消息"
,
err_msg
)
return
return
if
messagebox
.
askyesno
(
"确认"
,
"是否开始生成视频?"
):
msg_info
=
"是否开始生成视频?
\n
"
msg_info
+=
"**注意**:如果要停止录屏,则关闭“宇宙模拟器”的窗口即可。"
if
messagebox
.
askyesno
(
"确认"
,
msg_info
):
generate
()
generate
()
...
@@ -105,26 +107,29 @@ def check3d():
...
@@ -105,26 +107,29 @@ def check3d():
root
=
tk
.
Tk
()
root
=
tk
.
Tk
()
root
.
title
(
"模拟器视频生成工具"
)
root
.
title
(
"模拟器视频生成工具"
)
input_entry
=
tk
.
Entry
(
root
,
width
=
80
)
frame
=
tk
.
Frame
(
root
,
borderwidth
=
0
,
relief
=
"groove"
)
frame
.
pack
(
padx
=
3
,
pady
=
5
)
# 设置窗口的边距为10像素
input_entry
=
tk
.
Entry
(
frame
,
width
=
75
)
input_entry
.
grid
(
row
=
0
,
column
=
2
)
input_entry
.
grid
(
row
=
0
,
column
=
2
)
browse_button
=
tk
.
Button
(
root
,
text
=
"模拟代码文件
"
,
command
=
browse_file
)
browse_button
=
tk
.
Button
(
frame
,
text
=
"模拟代码文件路径
"
,
command
=
browse_file
)
browse_button
.
grid
(
row
=
0
,
column
=
1
)
browse_button
.
grid
(
row
=
0
,
column
=
1
)
output_entry
=
tk
.
Entry
(
root
,
width
=
80
)
output_entry
=
tk
.
Entry
(
frame
,
width
=
75
)
output_entry
.
grid
(
row
=
1
,
column
=
2
)
output_entry
.
grid
(
row
=
1
,
column
=
2
)
browse_save_button
=
tk
.
Button
(
root
,
text
=
"视频保存文件
"
,
command
=
browse_save
)
browse_save_button
=
tk
.
Button
(
frame
,
text
=
"视频保存文件路径
"
,
command
=
browse_save
)
browse_save_button
.
grid
(
row
=
1
,
column
=
1
)
browse_save_button
.
grid
(
row
=
1
,
column
=
1
)
open_output_dir_button
=
tk
.
Button
(
root
,
text
=
"...
"
,
command
=
open_output_dir
)
open_output_dir_button
=
tk
.
Button
(
frame
,
text
=
"打开目录
"
,
command
=
open_output_dir
)
open_output_dir_button
.
grid
(
row
=
1
,
column
=
3
)
open_output_dir_button
.
grid
(
row
=
1
,
column
=
3
)
checkbox3d_var
=
tk
.
IntVar
()
checkbox3d_var
=
tk
.
IntVar
()
checkbox3d
=
tk
.
Checkbutton
(
root
,
text
=
"生成3D视频"
,
command
=
check3d
,
variable
=
checkbox3d_var
)
checkbox3d
=
tk
.
Checkbutton
(
frame
,
text
=
"生成3D视频"
,
command
=
check3d
,
variable
=
checkbox3d_var
)
checkbox3d
.
grid
(
row
=
2
,
column
=
1
)
checkbox3d
.
grid
(
row
=
2
,
column
=
1
)
generate_button
=
tk
.
Button
(
root
,
text
=
"点击开始"
,
width
=
20
,
command
=
start
)
generate_button
=
tk
.
Button
(
frame
,
text
=
"点击开始"
,
width
=
20
,
command
=
start
)
generate_button
.
grid
(
row
=
2
,
column
=
2
)
generate_button
.
grid
(
row
=
2
,
column
=
2
)
# root.withdraw() # 隐藏主窗口
# root.withdraw() # 隐藏主窗口
screen_width
=
68
0
screen_width
=
70
0
screen_height
=
200
screen_height
=
200
x
=
(
screen_width
/
2
)
-
(
root
.
winfo_width
()
/
2
)
x
=
(
screen_width
/
2
)
-
(
root
.
winfo_width
()
/
2
)
y
=
(
screen_height
/
2
)
-
(
root
.
winfo_height
()
/
2
)
y
=
(
screen_height
/
2
)
-
(
root
.
winfo_height
()
/
2
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录