Skip to content

Commit

Permalink
Fix #423 - Prevent Color pickers hiding on mouse out, pick color from…
Browse files Browse the repository at this point in the history
… screen button now works
  • Loading branch information
TokisanGames committed Aug 14, 2024
1 parent bf1e2ea commit d86ddd4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions project/addons/terrain_3d/src/tool_settings.gd
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,12 @@ func add_setting(p_args: Dictionary) -> void:
picker.set_custom_minimum_size(Vector2(100, 25))
picker.edit_alpha = false
picker.get_picker().set_color_mode(ColorPicker.MODE_HSV)

picker.set_pick_color(plugin.get_setting(ES_TOOL_SETTINGS + p_name, p_default))
picker.color_changed.connect( (
func(value, path):
plugin.set_setting(path, value)
).bind(ES_TOOL_SETTINGS + p_name) )
picker.color_changed.connect(_on_setting_changed)

var popup: PopupPanel = picker.get_popup()
popup.mouse_exited.connect(Callable(func(p): p.hide()).bind(popup))
pending_children.push_back(picker)
control = picker

Expand Down

0 comments on commit d86ddd4

Please sign in to comment.