1
0
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:
Filippo Scognamiglio 2014-06-27 23:16:49 +02:00
parent d6b644cd7d
commit 6d9c50f474
6 changed files with 17 additions and 16 deletions

View File

@ -81,15 +81,20 @@ Tab{
anchors.fill: parent
rows: 2
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{
Layout.fillWidth: true
id: slider
Layout.fillWidth: true
stepSize: 1
maximumValue: 60
minimumValue: 0
onValueChanged: shadersettings.fps = value;
value: shadersettings.fps
minimumValue: 1
enabled: shadersettings.fps !== 0
value: shadersettings.fps !== 0 ? shadersettings.fps : 60
}
Text{text: slider.value}
Text{text: qsTr("Texture quality")}

View File

@ -51,7 +51,7 @@ ShaderEffect {
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
blending: false

View File

@ -33,7 +33,7 @@ Item{
property real window_scaling: 1.0
onWindow_scalingChanged: handleFontChanged();
property real fps: 60
property real fps: 0
function mix(c1, c2, alpha){
return Qt.rgba(c1.r * alpha + c2.r * (1-alpha),

View File

@ -38,7 +38,8 @@ Item{
onHeightChanged: sizeChanged()
//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 motionBlurCoefficient: (_maxBlurCoefficient * mBlur + _minBlurCoefficient * (1 - mBlur))
property real _minBlurCoefficient: 0.75

View File

@ -7,7 +7,7 @@ ShaderEffect{
property real ambient_light: shadersettings.ambient_light
property color font_color: shadersettings.font_color
property color background_color: shadersettings.background_color
property real time: timetimer.time
property real time: timeManager.time
property variant randomFunctionSource: randfuncsource
property real brightness_flickering: shadersettings.brightness_flickering
property real brightness: shadersettings.brightness * 1.5 + 0.5

View File

@ -127,13 +127,8 @@ ApplicationWindow{
hideSource: true
wrapMode: ShaderEffectSource.Repeat
}
Timer{
id: timetimer
property real time: 0
onTriggered: time += interval
interval: Math.round(1000 / shadersettings.fps)
running: true
repeat: true
TimeManager{
id: timeManager
}
Terminal{
id: terminal