README - Orangebananaspy/libobsutilities GitHub Wiki
This library contains the basic utilities needed to build many tweaks. Such as:
- Light weight color picker
- Basic color manipulation tools (Hex conversions, check if color is bright)
- Hex conversions
- If color is bright
- Basic image tools
- Average color of image
- Creating image from color
- Change scale of an image
- Change color of entire image
- Useful Preference Loader Cells
- PSColorCell
- PSCustomSwitchCell
- Install libobsutilities from Cydia.
- Find /usr/lib/libOBSUtilities.dylib from the iOS device or install it from this repo.
- Copy the dylib into your $THEOS/lib folder.
- Add
XXX_LIBRARIES = OBSUtilities
to your Tweaks Makefile. - Add
XXXPREFS_LIBRARIES = OBSUtilities
to your Prefs Makefile.
- Basically add it as a library where ever you plan to use this library.
- Download OBSUtilites folder from this repo and place it in $THEOS/include folder
<dict>
<key>cellClass</key>
<string>PSCustomSwitchCell</string>
<key>key</key>
<string>KEY_FOR_CELL</string>
<key>keyLabel</key>
<string>CELL_TITLE</string>
<key>description</key> <!-- Optional -->
<string>CELL_DESCRIPTION</string>
<key>default</key>
<true/> <!-- Default value of the switch cell -->
<key>PostNotification</key> <!-- Optional -->
<string>POSTNOTIFICATION_NAME</string>
<key>preferenceName</key> <!-- Name of the preference list to save the setting -->
<string>com.orangebananaspy.example.plist</string>
</dict>
<dict>
<key>cellClass</key>
<string>PSCustomSwitchCell</string>
<key>key</key>
<string>KEY_FOR_CELL_2</string>
<key>keyLabel</key>
<string>CELL_TITLE_2</string>
<key>default</key>
<false/>
<key>connections</key> <!-- Turns off connecting switchs if they are on -->
<array>
<string>KEY_FOR_CELL</string> <!-- Key for the connecting switch -->
</array>
<key>PostNotification</key>
<array> <!-- Can also send multiple notifications -->
<string>Notify1</string>
<string>Notify2</string>
</array>
<key>preferenceName</key>
<string>com.orangebananaspy.example.plist</string>
</dict>
<dict>
<key>cellClass</key>
<string>PSColorCell</string>
<key>key</key>
<string>KEY_FOR_CELL</string>
<key>keyLabel</key>
<string>CELL_TITLE</string>
<key>default</key> <!-- Default color of cell -->
<string>#000000</string>
<key>PostNotification</key> <!-- Same as PSCustomSwitchCell(can also be an array) -->
<string>Notify1</string>
<key>preferenceName</key>
<string>com.orangebananaspy.example.plist</string>
<key>isLighUI</key> <!-- Optional (if not specified it will be light) -->
<true/>
</dict>
The UI color of the picker is out of developers hands if Eclipse is installed and enabled for Preferences.