@@ -6,6 +6,7 @@ signal drag_started(offset: Vector2)
66const  Constants  =  preload ("res://addons/block_code/ui/constants.gd" )
77const  OptionData  =  preload ("res://addons/block_code/code_generation/option_data.gd" )
88const  Types  =  preload ("res://addons/block_code/types/types.gd" )
9+ const  Option_Theme  =  preload ("res://addons/block_code/ui/blocks/utilities/parameter_input/parameter_input.tscn::StyleBoxFlat_7m75r" )
910
1011signal  modified 
1112
@@ -286,6 +287,24 @@ func _switch_input(node: Node):
286287		c .visible  =  c  ==  node 
287288	_background .visible  =  node  not  in  [_option_input , null ]
288289	_background .is_pointy_value  =  node  ==  _bool_input 
290+ 	if  option_data :
291+ 		_option_input .add_theme_stylebox_override ("focus" , Option_Theme )
292+ 		_option_input .add_theme_stylebox_override ("hover" , Option_Theme )
293+ 		_option_input .add_theme_stylebox_override ("pressed" , Option_Theme )
294+ 		_option_input .add_theme_stylebox_override ("normal" , Option_Theme )
295+ 		var  raw_input  =  get_raw_input ()
296+ 		var  data  =  str_to_var (""  if  raw_input  ==  null  or  raw_input  is  Block  else  raw_input )
297+ 		if  typeof (data ):
298+ 			var  empty_theme  =  StyleBoxEmpty .new ()
299+ 			_option_input .add_theme_stylebox_override ("focus" , empty_theme )
300+ 			_option_input .add_theme_stylebox_override ("hover" , empty_theme )
301+ 			_option_input .add_theme_stylebox_override ("pressed" , empty_theme )
302+ 			_option_input .add_theme_stylebox_override ("normal" , empty_theme )
303+ 			variant_type  =  typeof (data )
304+ 			_background .visible  =  true 
305+ 			_background .is_pointy_value  =  variant_type  ==  TYPE_BOOL 
306+ 			snap_point .visible  =  true 
307+ 			snap_point .variant_type  =  variant_type 
289308
290309
291310func  _update_option_input (current_value : Variant  =  null ):
@@ -350,6 +369,7 @@ func _update_background_color(new_color):
350369func  _on_option_input_item_selected (index ):
351370	if  not  editable :
352371		return 
372+ 	_update_visible_input ()
353373	modified .emit ()
354374
355375
0 commit comments