Skip to content

Commit 2a96904

Browse files
committed
Add loaded and failedToLoad signals
1 parent b04af80 commit 2a96904

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ScratchCPPGui/ProjectPlayer.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ProjectScene {
99
property alias turboMode: loader.turboMode
1010
property alias cloneLimit: loader.cloneLimit
1111
property alias spriteFencing: loader.spriteFencing
12+
signal loaded()
13+
signal failedToLoad()
1214

1315
id: root
1416
clip: true
@@ -18,6 +20,12 @@ ProjectScene {
1820
fileName: root.fileName
1921
stageWidth: parent.width
2022
stageHeight: parent.height
23+
onLoadingFinished: {
24+
if(loadStatus)
25+
loaded();
26+
else
27+
failedToLoad();
28+
}
2129
}
2230

2331
RenderedTarget {

0 commit comments

Comments
 (0)