diff --git a/addons/resources_speadsheet_view/text_editing_utils.gd b/addons/resources_speadsheet_view/text_editing_utils.gd index 390add7..d083d0b 100644 --- a/addons/resources_speadsheet_view/text_editing_utils.gd +++ b/addons/resources_speadsheet_view/text_editing_utils.gd @@ -143,6 +143,8 @@ static func _step_cursor(text : String, start : int, step : int = 1, ctrl_presse static func string_snake_to_naming_case(string : String, add_spaces : bool = true) -> String: + if string == "": return "" + var split = string.split("_") for i in split.size(): split[i] = split[i][0].to_upper() + split[i].substr(1).to_lower() diff --git a/addons/resources_speadsheet_view/typed_cells/array.tscn b/addons/resources_speadsheet_view/typed_cells/array.tscn index 14840d0..f7c822d 100644 --- a/addons/resources_speadsheet_view/typed_cells/array.tscn +++ b/addons/resources_speadsheet_view/typed_cells/array.tscn @@ -1,7 +1,4 @@ -[gd_scene load_steps=2 format=2] - -[sub_resource type="DynamicFont" id=1] -size = 8 +[gd_scene format=2] [node name="Label" type="MarginContainer"] margin_right = 58.0 @@ -19,23 +16,25 @@ mouse_filter = 2 custom_constants/vseparation = 0 custom_constants/hseparation = 0 -[node name="Back" type="LineEdit" parent="."] +[node name="Back" type="Control" parent="."] show_behind_parent = true margin_right = 128.0 margin_bottom = 14.0 -focus_mode = 0 mouse_filter = 2 -custom_fonts/font = SubResource( 1 ) -editable = false -expand_to_text_length = true -context_menu_enabled = false -virtual_keyboard_enabled = false -caret_blink = true -caret_blink_speed = 0.5 __meta__ = { "_edit_lock_": true } +[node name="ColorRect" type="ColorRect" parent="Back"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 1.0 +margin_top = 1.0 +margin_right = -1.0 +margin_bottom = -1.0 +mouse_filter = 2 +color = Color( 0.247059, 0.247059, 0.247059, 0.498039 ) + [node name="Selected" type="ColorRect" parent="."] visible = false margin_right = 128.0 diff --git a/addons/resources_speadsheet_view/typed_cells/basic.tscn b/addons/resources_speadsheet_view/typed_cells/basic.tscn index e04dba9..4cee21f 100644 --- a/addons/resources_speadsheet_view/typed_cells/basic.tscn +++ b/addons/resources_speadsheet_view/typed_cells/basic.tscn @@ -1,7 +1,4 @@ -[gd_scene load_steps=2 format=2] - -[sub_resource type="DynamicFont" id=1] -size = 8 +[gd_scene format=2] [node name="Label" type="Label"] margin_right = 58.0 @@ -13,19 +10,16 @@ __meta__ = { "_edit_lock_": true } -[node name="Back" type="LineEdit" parent="."] +[node name="Back" type="ColorRect" parent="."] show_behind_parent = true anchor_right = 1.0 anchor_bottom = 1.0 -focus_mode = 0 +margin_left = 1.0 +margin_top = 1.0 +margin_right = -1.0 +margin_bottom = -1.0 mouse_filter = 2 -custom_fonts/font = SubResource( 1 ) -editable = false -expand_to_text_length = true -context_menu_enabled = false -virtual_keyboard_enabled = false -caret_blink = true -caret_blink_speed = 0.5 +color = Color( 0.247059, 0.247059, 0.247059, 0.498039 ) __meta__ = { "_edit_lock_": true } diff --git a/addons/resources_speadsheet_view/typed_cells/resource.tscn b/addons/resources_speadsheet_view/typed_cells/resource.tscn index 38f0a4c..b9d1b95 100644 --- a/addons/resources_speadsheet_view/typed_cells/resource.tscn +++ b/addons/resources_speadsheet_view/typed_cells/resource.tscn @@ -1,10 +1,7 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=2 format=2] [ext_resource path="res://icon.png" type="Texture" id=1] -[sub_resource type="DynamicFont" id=1] -size = 8 - [node name="Label" type="MarginContainer"] margin_right = 58.0 margin_bottom = 14.0 @@ -13,23 +10,25 @@ __meta__ = { "_edit_lock_": true } -[node name="Back" type="LineEdit" parent="."] +[node name="Back" type="Control" parent="."] show_behind_parent = true margin_right = 85.0 margin_bottom = 32.0 -focus_mode = 0 mouse_filter = 2 -custom_fonts/font = SubResource( 1 ) -editable = false -expand_to_text_length = true -context_menu_enabled = false -virtual_keyboard_enabled = false -caret_blink = true -caret_blink_speed = 0.5 __meta__ = { "_edit_lock_": true } +[node name="ColorRect" type="ColorRect" parent="Back"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 1.0 +margin_top = 1.0 +margin_right = -1.0 +margin_bottom = -1.0 +mouse_filter = 2 +color = Color( 0.247059, 0.247059, 0.247059, 0.498039 ) + [node name="Selected" type="ColorRect" parent="."] visible = false margin_right = 85.0