瀏覽代碼

Added explanations on the properties part of the backgrounds
Any --set-property will now output something when a value is being applied to ease debugging

Signed-off-by: Alexis Maiquez <almamu@almamu.com>

Alexis Maiquez 3 年之前
父節點
當前提交
cec1baef30
共有 2 個文件被更改,包括 68 次插入 和 0 次删除
  1. 64 0
      README.md
  2. 4 0
      main.cpp

+ 64 - 0
README.md

@@ -156,6 +156,70 @@ It is possible to take a screenshot of the screen's content at the moment a back
 
 PNG, BMP and JPEG are supported.
 
+## 5.8. Properties
+Some backgrounds have a list of properties that the user can customize. These properties modify how parts of the background behave or look like. Support for these is present.
+First, list all the available properties in a background, you can do that with the --list-properties switch:
+```
+./linux-wallpaperengine --list-properties 2370927443
+```
+
+The output includes all the relevant information for each of the different properties:
+```
+barcount - slider
+	Description: Bar Count
+	Value: 64
+	Minimum value: 16
+	Maximum value: 64
+	Step: 1
+
+bloom - boolean
+	Description: Bloom
+	Value: 0
+frequency - combolist
+	Description: Frequency
+	Value: 2
+		Posible values:
+		16 -> 1
+		32 -> 2
+		64 -> 3
+
+owl - boolean
+	Description: Owl
+	Value: 0
+rain - boolean
+	Description: Rain
+	Value: 1
+schemecolor - color
+	Description: ui_browse_properties_scheme_color
+	R: 0.14902 G: 0.23137 B: 0.4 A: 1
+visualizer - boolean
+	Description: <hr>Add Visualizer<hr>
+	Value: 1
+visualizercolor - color
+	Description: Bar Color
+	R: 0.12549 G: 0.215686 B: 0.352941 A: 1
+visualizeropacity - slider
+	Description: Bar Opacity
+	Value: 1
+	Minimum value: 0
+	Maximum value: 1
+	Step: 0.1
+
+visualizerwidth - slider
+	Description: Bar Spacing
+	Value: 0.25
+	Minimum value: 0
+	Maximum value: 0.5
+	Step: 0.01
+```
+
+Any of these values can be modified with the --set-property switch. Say you want to enable the bloom in this background, you would do so like this:
+```
+./linux-wallpaperengine --set-property bloom=1 2370927443
+```
+
+If you keep --list-properties in the commandline you can see how the values change to confirm that it applied properly.
+
 ## 6. Example background
 This was the first background to even be compatible with the software. And it's not 100% compatible yet. Both textures and shaders are properly loaded, but there are still particles missing.
 

+ 4 - 0
main.cpp

@@ -547,7 +547,11 @@ int main (int argc, char* argv[])
         auto override = propertyOverrides.find (cur->getName ());
 
         if (override != propertyOverrides.end ())
+        {
+            std::cout << "Applying override value for " << cur->getName () << std::endl;
+
             cur->update (override->second);
+        }
 
         if (shouldListPropertiesAndStop)
             std::cout << cur->dump () << std::endl;