mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	small optimization: brightness timer is managed with loader
This commit is contained in:
		| @@ -99,17 +99,21 @@ ApplicationWindow{ | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             Timer{ |             Loader{ | ||||||
|  |                 active: shadersettings.brightness_flickering != 0 | ||||||
|  |                 sourceComponent: Timer{ | ||||||
|                     property real randval |                     property real randval | ||||||
|                     id: flickertimer |                     id: flickertimer | ||||||
|                     interval: 500 |                     interval: 500 | ||||||
|                     onTriggered: { |                     onTriggered: { | ||||||
|  |                         console.log("Timer triggered") | ||||||
|                         randval = Math.random(); |                         randval = Math.random(); | ||||||
|                         if(randval < shadersettings.brightness_flickering) |                         if(randval < shadersettings.brightness_flickering) | ||||||
|                             shadercontainer.brightness = Math.random() * 0.5 + 0.5; |                             shadercontainer.brightness = Math.random() * 0.5 + 0.5; | ||||||
|                     } |                     } | ||||||
|                 running: true |  | ||||||
|                     repeat: true |                     repeat: true | ||||||
|  |                     running: true | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             property real deltay: 3 / terminal.height |             property real deltay: 3 / terminal.height | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user