mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-21 20:39:00 +00:00
Frames cap is now optional.
This commit is contained in:
parent
d6b644cd7d
commit
6d9c50f474
@ -81,15 +81,20 @@ Tab{
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
rows: 2
|
rows: 2
|
||||||
columns: 3
|
columns: 3
|
||||||
Text{text: qsTr("Animation FPS")}
|
CheckBox{
|
||||||
|
property int fps: checked ? slider.value : 0
|
||||||
|
onFpsChanged: shadersettings.fps = fps
|
||||||
|
checked: shadersettings.fps !== 0
|
||||||
|
text: qsTr("Limit FPS")
|
||||||
|
}
|
||||||
Slider{
|
Slider{
|
||||||
Layout.fillWidth: true
|
|
||||||
id: slider
|
id: slider
|
||||||
|
Layout.fillWidth: true
|
||||||
stepSize: 1
|
stepSize: 1
|
||||||
maximumValue: 60
|
maximumValue: 60
|
||||||
minimumValue: 0
|
minimumValue: 1
|
||||||
onValueChanged: shadersettings.fps = value;
|
enabled: shadersettings.fps !== 0
|
||||||
value: shadersettings.fps
|
value: shadersettings.fps !== 0 ? shadersettings.fps : 60
|
||||||
}
|
}
|
||||||
Text{text: slider.value}
|
Text{text: slider.value}
|
||||||
Text{text: qsTr("Texture quality")}
|
Text{text: qsTr("Texture quality")}
|
||||||
|
@ -51,7 +51,7 @@ ShaderEffect {
|
|||||||
|
|
||||||
property real brightness: shadersettings.brightness * 1.5 + 0.5
|
property real brightness: shadersettings.brightness * 1.5 + 0.5
|
||||||
|
|
||||||
property real time: timetimer.time
|
property real time: timeManager.time !== 0 ? timeManager.time : 1
|
||||||
property variant randomFunctionSource: randfuncsource
|
property variant randomFunctionSource: randfuncsource
|
||||||
|
|
||||||
blending: false
|
blending: false
|
||||||
|
@ -33,7 +33,7 @@ Item{
|
|||||||
property real window_scaling: 1.0
|
property real window_scaling: 1.0
|
||||||
onWindow_scalingChanged: handleFontChanged();
|
onWindow_scalingChanged: handleFontChanged();
|
||||||
|
|
||||||
property real fps: 60
|
property real fps: 0
|
||||||
|
|
||||||
function mix(c1, c2, alpha){
|
function mix(c1, c2, alpha){
|
||||||
return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),
|
return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),
|
||||||
|
@ -38,7 +38,8 @@ Item{
|
|||||||
onHeightChanged: sizeChanged()
|
onHeightChanged: sizeChanged()
|
||||||
|
|
||||||
//The blur effect has to take into account the framerate
|
//The blur effect has to take into account the framerate
|
||||||
property real fpsAttenuation: 60 / shadersettings.fps
|
property int fps: shadersettings.fps !== 0 ? shadersettings.fps : 60
|
||||||
|
property real fpsAttenuation: 60 / fps
|
||||||
property real mBlur: shadersettings.motion_blur
|
property real mBlur: shadersettings.motion_blur
|
||||||
property real motionBlurCoefficient: (_maxBlurCoefficient * mBlur + _minBlurCoefficient * (1 - mBlur))
|
property real motionBlurCoefficient: (_maxBlurCoefficient * mBlur + _minBlurCoefficient * (1 - mBlur))
|
||||||
property real _minBlurCoefficient: 0.75
|
property real _minBlurCoefficient: 0.75
|
||||||
|
@ -7,7 +7,7 @@ ShaderEffect{
|
|||||||
property real ambient_light: shadersettings.ambient_light
|
property real ambient_light: shadersettings.ambient_light
|
||||||
property color font_color: shadersettings.font_color
|
property color font_color: shadersettings.font_color
|
||||||
property color background_color: shadersettings.background_color
|
property color background_color: shadersettings.background_color
|
||||||
property real time: timetimer.time
|
property real time: timeManager.time
|
||||||
property variant randomFunctionSource: randfuncsource
|
property variant randomFunctionSource: randfuncsource
|
||||||
property real brightness_flickering: shadersettings.brightness_flickering
|
property real brightness_flickering: shadersettings.brightness_flickering
|
||||||
property real brightness: shadersettings.brightness * 1.5 + 0.5
|
property real brightness: shadersettings.brightness * 1.5 + 0.5
|
||||||
|
@ -127,13 +127,8 @@ ApplicationWindow{
|
|||||||
hideSource: true
|
hideSource: true
|
||||||
wrapMode: ShaderEffectSource.Repeat
|
wrapMode: ShaderEffectSource.Repeat
|
||||||
}
|
}
|
||||||
Timer{
|
TimeManager{
|
||||||
id: timetimer
|
id: timeManager
|
||||||
property real time: 0
|
|
||||||
onTriggered: time += interval
|
|
||||||
interval: Math.round(1000 / shadersettings.fps)
|
|
||||||
running: true
|
|
||||||
repeat: true
|
|
||||||
}
|
}
|
||||||
Terminal{
|
Terminal{
|
||||||
id: terminal
|
id: terminal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user