File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 3
3
import QtQuick
4
4
import QtQuick.Controls
5
5
import QtQuick.Layouts
6
+ import ScratchCPP
6
7
import ScratchCPP.UiComponents
7
8
import ScratchCPP.Render
8
9
@@ -12,6 +13,32 @@ CustomDialog {
12
13
standardButtons: Dialog .Close
13
14
14
15
contentItem: ColumnLayout {
16
+ // General
17
+ Label {
18
+ text: qsTr (" General" )
19
+ font .pointSize : 14
20
+ font .bold : true
21
+ }
22
+
23
+ RowLayout {
24
+ Label {
25
+ text: qsTr (" FPS (frames per second)" )
26
+ }
27
+
28
+ SpinBox {
29
+ editable: true
30
+ from: 1
31
+ to: 250
32
+ stepSize: 10
33
+ value: projectPlayer .fps
34
+ onValueChanged: {
35
+ projectPlayer .fps = value;
36
+ AppMenuBar .fps60Mode = (value === 60 );
37
+ }
38
+ }
39
+ }
40
+
41
+ // Remove limits
15
42
Label {
16
43
text: qsTr (" Remove limits" )
17
44
font .pointSize : 14
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ ApplicationWindow {
14
14
id: root
15
15
minimumWidth: layout .implicitWidth + layout .anchors .margins * 2
16
16
minimumHeight: menuBar .height + layout .implicitHeight + layout .anchors .margins * 2
17
- visible: true
17
+ visible: true
18
18
title: Qt .application .displayName
19
19
color: Material .background
20
20
Material .accent : " orange"
@@ -33,6 +33,13 @@ ApplicationWindow {
33
33
player .fileName = fileName;
34
34
}
35
35
36
+ function onFps60ModeChanged () {
37
+ if (AppMenuBar .fps60Mode )
38
+ player .fps = 60 ;
39
+ else if (player .fps === 60 )
40
+ player .fps = 30 ;
41
+ }
42
+
36
43
function onProjectSettingsTriggered () {
37
44
projectSettingsDialog .open ();
38
45
}
@@ -134,7 +141,6 @@ ApplicationWindow {
134
141
activeFocusOnTab: true
135
142
focus: true
136
143
turboMode: AppMenuBar .turboMode
137
- fps: AppMenuBar .fps60Mode ? 60 : 30
138
144
}
139
145
}
140
146
}
You can’t perform that action at this time.
0 commit comments