🎉 Add movment speed option
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ class Extension {
|
|||||||
const float BURN_RANGE = 0.1;
|
const float BURN_RANGE = 0.1;
|
||||||
const float BURN_TIME = 0.2;
|
const float BURN_TIME = 0.2;
|
||||||
const vec2 FIRE_SCALE = vec2(400, 600);
|
const vec2 FIRE_SCALE = vec2(400, 600);
|
||||||
const float FIRE_SPEED = 0.5;
|
const float FIRE_SPEED = ${this._settings.get_double('flame-movement-speed')};
|
||||||
|
|
||||||
float rand(vec2 co) {
|
float rand(vec2 co) {
|
||||||
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
|
|
||||||
// Bind all properties.
|
// Bind all properties.
|
||||||
this._bindAdjustment('destroy-animation-time');
|
this._bindAdjustment('destroy-animation-time');
|
||||||
|
this._bindAdjustment('flame-movement-speed');
|
||||||
this._bindColorButton('fire-color-1');
|
this._bindColorButton('fire-color-1');
|
||||||
this._bindColorButton('fire-color-2');
|
this._bindColorButton('fire-color-2');
|
||||||
this._bindColorButton('fire-color-3');
|
this._bindColorButton('fire-color-3');
|
||||||
|
|||||||
@@ -86,6 +86,52 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow">
|
||||||
|
<property name="activatable">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Flame Movement Speed</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="halign">start</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScale">
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="draw-value">1</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
<property name="value-pos">left</property>
|
||||||
|
<property name="width-request">300</property>
|
||||||
|
<property name="adjustment">
|
||||||
|
<object class="GtkAdjustment" id="flame-movement-speed">
|
||||||
|
<property name="upper">2.0</property>
|
||||||
|
<property name="lower">-2.0</property>
|
||||||
|
<property name="step-increment">0.01</property>
|
||||||
|
<property name="page-increment">0.1</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="reset-flame-movement-speed">
|
||||||
|
<property name="icon-name">edit-clear-symbolic</property>
|
||||||
|
<property name="tooltip-text">Reset to Default Value</property>
|
||||||
|
<style>
|
||||||
|
<class name="flat" />
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow">
|
<object class="GtkListBoxRow">
|
||||||
<property name="activatable">0</property>
|
<property name="activatable">0</property>
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
<description>The time it takes to burn the windows.</description>
|
<description>The time it takes to burn the windows.</description>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
<key name="flame-movement-speed" type="d">
|
||||||
|
<default>0.5</default>
|
||||||
|
<summary>Flame Movement Speed</summary>
|
||||||
|
<description>The speed at which the flames move.</description>
|
||||||
|
</key>
|
||||||
|
|
||||||
<key name="fire-color-1" type="s">
|
<key name="fire-color-1" type="s">
|
||||||
<default>"rgba(76, 51, 25, 0.0)"</default>
|
<default>"rgba(76, 51, 25, 0.0)"</default>
|
||||||
<summary>Fire Color 1</summary>
|
<summary>Fire Color 1</summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user