New QoL Features + Controller Compatibility

I am slowly working down my list of tools to add back in updates that didn't make it into the initial release! The Color Picker has some goodies in store. But, first things first:
Do I have to update?
No. This release has no bug fixes, only feature updates. The original colour picker is also compatible with v8.4 of Ren'Py.
What's included?
To start, I've confirmed that the colour picker works well on Ren'Py 8.4.1, and tidied up the comments overall to be a bit more in line with how I organize my more recent tools. Otherwise, a few changes were made:
- ColorPicker now has a swatch method, which returns a DynamicDisplayable created via the usual picker_color function. The picker_color function has been updated so it can specify a ColorPicker key and a refresh rate.
- Functionally: this just means instead of declaring a DynamicDisplayable you can display the swatch that updates in real-time via add picker.swatch()
- ColorPicker now has a hexcode method, which is the same as above but it returns an automatically created DynamicDisplayable for the colour's hexcode. The DynamicDisplayable function, picker_hexcode, also takes a style parameter to make it easier to adjust the styling of the text.
- This means you can write add picker.hexcode(style="mystyle") to add hexcode text tied to the ColorPicker that updates in real-time
- Added a SwapToSavedColor method to ColorPicker, which is used in the examples that switch between two different swatches. It saves the current colour to the active key and switches to a new key. It is a screen action e.g. action picker.SwapToSavedColor(2)
- Added a SetColor method to ColorPicker, which is used in a new example that has pre-selected colour samples alongside the regular colour picker. It's a screen action you can use to set the colour picker to the provided colour e.g. action picker.SetColor("#FFF") will set the picker's colour to "#FFF"
- On that note, added a new example screen which includes the ability to set 2 different colour swatches, and has a column of pre-set colour options you may choose from.
- The above QoL features also allowed me to clean up much of the code from the earlier examples to be a bit simpler
- Added a new file, color_picker_controller.rpy which has some additional backend code + an example screen and label of a colour picker which is compatible with controllers. It requires my Controller Support Expansion to run.
- It includes a PickerHueValue subclass of BarValue, to be used with the bar which adjusts the hue of the colour picker. You can choose whether it listens to movement on the x or y axis, and which stick (left or right) controls it.
- There is also a PickerStickEvent subclass of StickEvent, which controls the movement of the picker indicator inside the colour square. This too can be assigned to either stick.
- An example screen is included in the style of the original examples
I hope you enjoy the new features! If you haven't heard of it yet, I'd also love for you to check out my Controller Support Expansion - I put a ton of work into adding features that will make it easy to include controller and keyboard support in your Ren'Py games. Happy coding!
Files
Get Color Picker for Ren'Py
Color Picker for Ren'Py
Easily select colors in Ren'Py
Status | Released |
Category | Tool |
Author | Feniks |
Genre | Visual Novel |
Tags | Graphical User Interface (GUI), Kinetic Novel, Modular, Ren'Py |
More posts
- 8.2 Update + Small FixFeb 05, 2024
- Color Picker Feature + FixNov 13, 2023
- Saved colours updateOct 31, 2023
Leave a comment
Log in with itch.io to leave a comment.