File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/Extensions/LegacyColorPicker Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,18 @@ var tools_autoload: Node
55@onready var right_color_picker_button : ColorPickerButton = % RightColorPickerButton
66@onready var average_color : ColorRect = % AverageColor
77
8+
89func _ready () -> void :
910 ## NOTE: use get_node_or_null("/root/ExtensionsApi") to access api.
1011 tools_autoload = get_node_or_null ("/root/Tools" )
1112 tools_autoload .color_changed .connect (update_ui )
1213
14+ var left_slot = tools_autoload ._slots .get (MOUSE_BUTTON_LEFT , null )
15+ var right_slot = tools_autoload ._slots .get (MOUSE_BUTTON_RIGHT , null )
16+ if left_slot and right_slot :
17+ left_color_picker_button .color = left_slot .color
18+ right_color_picker_button .color = right_slot .color
19+
1320
1421func update_ui (color_info , button : int ):
1522 var tool_color : Dictionary
Original file line number Diff line number Diff line change 66"name" : " LegacyColorPicker" ,
77"nodes" : [" Main.tscn" ],
88"supported_api_versions" : [5 ],
9- "version" : " 0.1 "
9+ "version" : " 0.2 "
1010}
You can’t perform that action at this time.
0 commit comments