
Publisher
echopraxium
Pigmint Controls 2D
A Godot plugin which provides custom controls for 2D painting / drawing applications. This plugin currently provides 2 custom "ColorSelect" controls meant to let the user select Foreground/Background colors
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
Pigmint Controls
A Godot plugin which provides custom controls for 2D painting / drawing applications. This plugin currently provides 2 custom "ColorSelect" controls meant to let the user select Foreground/Background colors
- PigletColorSelect: this one has a 24x24 pixels icon

- PigColorSelect: this one has a 32x32 pixels icon


How to install the Plugin ?
- In Godot, Use the AssetLib link (in the top center of Godot's main window)
- In the
Searchfield, typePigto find more quickly thePigmint Controlsplugin - Use
[Download]then[Install] - You should now have the following:
my_godot_project/addons/pigmint_controls. - Check that the plugin well installed: use the AssetLib button then
[Plugins]and activate it (with the Combo button inStatuscolumn).
How to use a PigColorSelect or PigletColorSelect
- Create a 2D scene in your Godot project.
- Create a container (e.g. a
HBoxContainerorVBoxContainer) as a child of the 2D scene. - Select this container then use the right mouse button and select
+ Add Child Node - In the
Searchfield, typePigto find more quickly thePigletColorSelectorPigColorSelectcontrols.- PigletColorSelect:

- PigColorSelect:

- PigletColorSelect:
- Select one of these
ColorSelectcontrol and then[Create]
Interactions
Once you have a PigletColorSelect or PigColorSelect in your scene you will see a button with a custom icon. This button has in fact 4 selectable parts each one for a specific interaction:
- Select Foreground color: a left mouse button click in the small square of the top left part. This will popup a
ColorPickerwhich allows the user to select a color. - Select Background color: a click in the small square of the bottom right part. This will also popup a
ColorPicker. - Switch Foreground/Background colors: a click on the double arrow in the top right part.
- Reset Foreground/Background colors: a click on the bottom left part (a tiny white square under a tiny black square, these are the
Reset colors).
Signals
There are 4 custom signals which can be connected to handle each of the 4 possible interactions
foreground_color_changed(fg_color): the connected function will receive the Foreground color when it has been changed by the user.background_color_changed(bg_color): the connected function will receive the Background color when it has been changed by the user.colors_switch(color_select_control): the connected function will receive thecolor_selectcontrol when the user Switches colors.colors_reset(color_select_control): the connected function will receive thecolor_selectcontrol when the user Resets colors.
Properties
There are 2 properties on PigletColorSelect and PigColorSelect. They can be accessed with setters and getters:
- ForegroundColor
set_foreground_color(color)
get_foreground_color()
- BackgroundColor
set_background_color(color)
get_background_color()