Skip to content

Commit 07bccf9

Browse files
committed
Add load() function to ProjectPlayer
1 parent 7692c15 commit 07bccf9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ProjectPlayer.qml

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ScratchCPP.Render
88
import "internal"
99

1010
ProjectScene {
11-
property string fileName
11+
readonly property string fileName: loader.fileName
1212
property int stageWidth: 480
1313
property int stageHeight: 360
1414
property alias fps: loader.fps
@@ -28,6 +28,10 @@ ProjectScene {
2828
stageScale: (stageWidth == 0 || stageHeight == 0) ? 1 : Math.min(width / stageWidth, height / stageHeight)
2929
onFileNameChanged: priv.loading = true;
3030

31+
function load(fileName) {
32+
loader.fileName = fileName;
33+
}
34+
3135
QtObject {
3236
id: priv
3337
property bool loading: false

0 commit comments

Comments
 (0)