FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
UnrealEnginePython/examples/slow_task.py at develop · 20tab/UnrealEnginePython · GitHub
20tab
UnrealEnginePython
Repository navigation
Code
Issues
338
(338)
Pull requests
32
(32)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
UnrealEnginePython
/
examples
/
slow_task.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (22 loc) · 763 Bytes
Breadcrumbs
UnrealEnginePython
/
examples
/
slow_task.py
Copy path
File metadata and controls
28 lines (22 loc) · 763 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from
unreal_engine
import
FSlowTask
import
time
# Create an FSlowTask object, defining the amount of work that
# will be done, and the initial message.
t
=
FSlowTask
(
10
,
"Doing Something"
)
t
.
initialize
()
# Make the dialog, and include a Cancel button (default is not to
# allow a cancel button).
t
.
make_dialog
(
True
)
time
.
sleep
(
1
)
for
i
in
range
(
10
) :
# Update the progress bar. Note that the first argument is the
# amount of work to be done this frame, not the overall work
# done so far.
t
.
enter_progress_frame
(
1
,
"Progress Position : {}"
.
format
(
i
))
time
.
sleep
(
0.2
)
# If there was a cancel button included, we can check if it was
# pressed.
if
t
.
received_user_cancel
():
print
(
"Cancelled"
)
break
t
.
destroy
()
Back
|
FazBrowse Home
|
New Git URL