Various bug fixes.

Should fix #15, #14, #12, #13.
This commit is contained in:
don-tnowe 2022-12-31 02:00:47 +02:00
parent 6fffdf32b8
commit c56a638340
7 changed files with 56 additions and 282 deletions

View File

@ -5,7 +5,8 @@ extends Button
@export var icon_name := "Node" :
set(v):
icon_name = v
icon = get_theme_icon(v, "EditorIcons")
if has_theme_icon(v, "EditorIcons"):
icon = get_theme_icon(v, "EditorIcons")
func _ready():

View File

@ -52,6 +52,7 @@ func _ready():
editor_interface.get_resource_filesystem().filesystem_changed.connect(_on_filesystem_changed)
editor_interface.get_inspector().property_edited.connect(_on_inspector_property_edited)
node_hide_columns_button.get_popup().id_pressed.connect(_on_visible_cols_id_pressed)
node_table_root.get_node("../..").get_h_scroll_bar().value_changed.connect(func(x): node_columns.position.x = -x)
# Load saved recent paths
if FileAccess.file_exists(save_data_path):
@ -78,6 +79,9 @@ func _on_filesystem_changed():
else:
for k in remembered_paths:
if remembered_paths[k] == null:
continue
if remembered_paths[k].resource_path != k:
var res = remembered_paths[k]
remembered_paths.erase(k)
@ -134,6 +138,7 @@ func _load_resources_from_folder(folderpath : String, sort_by : String, sort_rev
var res : Resource
while filepath != "":
remembered_paths[folderpath + filepath] = null
if filepath.ends_with(".tres"):
filepath = folderpath + filepath
res = load(filepath)
@ -264,22 +269,29 @@ func _update_column_sizes():
node_columns.get_parent().custom_minimum_size.y = column_headers[0].size.y
for i in column_headers.size():
var header = column_headers[i]
cell = node_table_root.get_child(i)
column_headers[i].get_child(0).clip_text = clip_text
column_headers[i].custom_minimum_size.x = 0
header.get_child(0).clip_text = clip_text
header.custom_minimum_size.x = 0
cell.custom_minimum_size.x = 0
column_headers[i].size.x = 0
header.size.x = 0
node_columns.queue_sort()
min_width = max(column_headers[i].size.x, cell.size.x)
column_headers[i].custom_minimum_size.x = min_width
cell.custom_minimum_size.x = column_headers[i].get_minimum_size().x
column_headers[i].size.x = min_width
min_width = max(header.size.x, cell.size.x)
header.custom_minimum_size.x = min_width
cell.custom_minimum_size.x = header.get_minimum_size().x
header.size.x = min_width
node_table_root.hide()
node_columns.hide()
node_table_root.show()
node_columns.show()
await get_tree().process_frame
for i in column_headers.size():
column_headers[i].position.x = node_table_root.get_child(i).position.x
column_headers[i].size.x = node_table_root.get_child(i).size.x
func _update_row(row_index : int, color_rows : bool = true):
@ -563,14 +575,9 @@ func _get_cell_row(cell) -> int:
return cell.get_index() / columns.size() + first_row
func _update_scroll():
node_columns.position.x = -node_table_root.get_node("../..").scroll_horizontal
func _on_cell_gui_input(event : InputEvent, cell : Control):
if event is InputEventMouseButton:
grab_focus()
_update_scroll()
if event.button_index != MOUSE_BUTTON_LEFT:
return
@ -592,7 +599,6 @@ func _on_cell_gui_input(event : InputEvent, cell : Control):
func _gui_input(event : InputEvent):
if event is InputEventMouseButton:
_update_scroll()
if event.button_index != MOUSE_BUTTON_LEFT:
return
@ -823,8 +829,6 @@ func _on_inspector_property_edited(property : String):
index = _get_cell_row(previously_edited[i]) * columns.size() + new_column
_add_cell_to_selection(node_table_root.get_child(index - first_row))
await get_tree().process_frame
set_edited_cells_values(values)
_try_open_docks(edited_cells[0])

View File

@ -26,7 +26,7 @@ colors = PackedColorArray(1, 1, 1, 0.490196, 1, 1, 1, 0.0458716, 1, 1, 1, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_18il8"]
gradient = SubResource("Gradient_8kp6w")
[sub_resource type="Image" id="Image_1jisk"]
[sub_resource type="Image" id="Image_wmhif"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 131, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 128, 128, 4, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 93, 93, 55, 255, 97, 97, 58, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 98, 98, 47, 255, 97, 97, 42, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 94, 94, 46, 255, 93, 93, 236, 255, 93, 93, 233, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 93, 93, 252, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
@ -35,8 +35,8 @@ data = {
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_wgkau"]
image = SubResource("Image_1jisk")
[sub_resource type="ImageTexture" id="ImageTexture_we5a3"]
image = SubResource("Image_wmhif")
[node name="Control" type="MarginContainer" node_paths=PackedStringArray("node_folder_path", "node_recent_paths", "node_table_root", "node_property_editors", "node_columns", "node_hide_columns_button", "node_page_manager")]
anchors_preset = 15
@ -70,24 +70,15 @@ metadata/_edit_lock_ = true
[node name="HeaderContentSplit" type="VBoxContainer" parent="."]
layout_mode = 2
offset_left = 3.0
offset_right = 1149.0
offset_bottom = 643.0
[node name="VBoxContainer" type="VBoxContainer" parent="HeaderContentSplit"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 113.0
[node name="MenuStrip" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 31.0
[node name="File" type="Button" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_right = 35.0
offset_bottom = 31.0
tooltip_text = "Settings"
focus_mode = 0
toggle_mode = true
@ -97,9 +88,6 @@ flat = true
[node name="SearchProcess" type="Button" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_left = 39.0
offset_right = 153.0
offset_bottom = 31.0
tooltip_text = "Settings"
focus_mode = 0
toggle_mode = true
@ -108,24 +96,14 @@ flat = true
[node name="VisibleCols" type="MenuButton" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_left = 157.0
offset_right = 249.0
offset_bottom = 31.0
text = "Hide/Show"
[node name="VSeparator" type="Control" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
anchors_preset = 0
offset_left = 253.0
offset_right = 1005.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="Settings" type="Button" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_left = 1009.0
offset_right = 1079.0
offset_bottom = 31.0
tooltip_text = "Settings"
focus_mode = 0
text = "Settings"
@ -133,39 +111,26 @@ flat = true
[node name="VSeparator2" type="VSeparator" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_left = 1083.0
offset_right = 1087.0
offset_bottom = 31.0
[node name="Info" type="Button" parent="HeaderContentSplit/VBoxContainer/MenuStrip"]
layout_mode = 2
offset_left = 1091.0
offset_right = 1146.0
offset_bottom = 31.0
focus_mode = 0
text = "About"
flat = true
[node name="HBoxContainer" type="HSplitContainer" parent="HeaderContentSplit/VBoxContainer"]
layout_mode = 2
offset_top = 35.0
offset_right = 1146.0
offset_bottom = 66.0
split_offset = -249
[node name="HBoxContainer" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_right = 885.0
offset_bottom = 31.0
size_flags_horizontal = 3
theme_override_constants/separation = 0
[node name="ColorRect4" type="ColorRect" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
modulate = Color(0, 0, 0, 1)
custom_minimum_size = Vector2i(6, 18)
custom_minimum_size = Vector2(6, 18)
layout_mode = 2
offset_right = 6.0
offset_bottom = 31.0
script = ExtResource("10_b87c7")
[node name="TextureRect" type="TextureRect" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/ColorRect4"]
@ -181,69 +146,43 @@ texture = SubResource("GradientTexture2D_18il8")
ignore_texture_size = true
[node name="ColorRect3" type="Control" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2i(2, 0)
custom_minimum_size = Vector2(2, 0)
layout_mode = 2
anchors_preset = 0
offset_left = 6.0
offset_right = 8.0
offset_bottom = 31.0
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 8.0
offset_top = 2.0
offset_right = 137.0
offset_bottom = 28.0
text = "Resource Folder:"
[node name="Path" type="LineEdit" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
offset_left = 137.0
offset_right = 837.0
offset_bottom = 31.0
size_flags_horizontal = 3
caret_blink = true
[node name="SelectDir" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 837.0
offset_right = 861.0
offset_bottom = 31.0
tooltip_text = "Open Folder"
icon = SubResource("ImageTexture_wgkau")
icon = SubResource("ImageTexture_we5a3")
script = ExtResource("4")
icon_name = "Folder"
[node name="DeletePath" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 861.0
offset_right = 885.0
offset_bottom = 31.0
tooltip_text = "Remove Path from Recent"
icon = SubResource("ImageTexture_wgkau")
icon = SubResource("ImageTexture_we5a3")
script = ExtResource("4")
icon_name = "Remove"
[node name="HBoxContainer2" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 897.0
offset_right = 1146.0
offset_bottom = 31.0
[node name="Label2" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2"]
layout_mode = 2
offset_top = 2.0
offset_right = 104.0
offset_bottom = 28.0
text = "Open Recent:"
[node name="RecentPaths" type="OptionButton" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2
offset_left = 108.0
offset_right = 249.0
offset_bottom = 31.0
size_flags_horizontal = 3
clip_text = true
fit_to_longest_item = false
@ -251,22 +190,15 @@ fit_to_longest_item = false
[node name="Search" type="VBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
visible = false
layout_mode = 2
offset_top = 70.0
offset_right = 1146.0
offset_bottom = 127.0
theme_override_constants/separation = 0
[node name="HBoxContainer" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/Search"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 26.0
[node name="ColorRect4" type="ColorRect" parent="HeaderContentSplit/VBoxContainer/Search/HBoxContainer"]
modulate = Color(0, 0, 0, 1)
custom_minimum_size = Vector2i(6, 18)
custom_minimum_size = Vector2(6, 18)
layout_mode = 2
offset_right = 6.0
offset_bottom = 26.0
size_flags_vertical = 5
script = ExtResource("10_b87c7")
@ -284,30 +216,19 @@ ignore_texture_size = true
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/Search/HBoxContainer"]
layout_mode = 2
offset_left = 10.0
offset_right = 219.0
offset_bottom = 26.0
text = "GDScript Filter and Process"
[node name="HSeparator" type="HSeparator" parent="HeaderContentSplit/VBoxContainer/Search/HBoxContainer"]
layout_mode = 2
offset_left = 223.0
offset_right = 1146.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Search" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/Search"]
layout_mode = 2
offset_top = 26.0
offset_right = 1146.0
offset_bottom = 57.0
[node name="ColorRect2" type="ColorRect" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
modulate = Color(0, 0, 0, 1)
custom_minimum_size = Vector2i(6, 18)
custom_minimum_size = Vector2(6, 18)
layout_mode = 2
offset_right = 6.0
offset_bottom = 31.0
size_flags_vertical = 5
script = ExtResource("10_b87c7")
@ -325,18 +246,10 @@ ignore_texture_size = true
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 10.0
offset_top = 2.0
offset_right = 90.0
offset_bottom = 28.0
text = "Condition:"
[node name="Label2" type="Label" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 94.0
offset_top = 2.0
offset_right = 112.0
offset_bottom = 28.0
tooltip_text = "Enter an expression. The table only show rows where the expression returns `true`.
You can use `res.<property_name>` to get a property, and `index` to get row number. Hit ENTER to run the search.
@ -352,32 +265,18 @@ text = "(?)"
[node name="SearchCond" type="LineEdit" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 116.0
offset_right = 580.0
offset_bottom = 31.0
size_flags_horizontal = 3
text = "true"
[node name="VSeparator" type="VSeparator" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 584.0
offset_right = 588.0
offset_bottom = 31.0
[node name="Label3" type="Label" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 592.0
offset_top = 2.0
offset_right = 656.0
offset_bottom = 28.0
text = "Process:"
[node name="Label4" type="Label" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 660.0
offset_top = 2.0
offset_right = 678.0
offset_bottom = 28.0
tooltip_text = "Enter an expression. The values in selected cells will be replaced with calculated new values.
You can use `value` to get the cell's value, `res.<property_name>` to get a property, `row_index` to get row number
@ -395,93 +294,54 @@ text = "(?)"
[node name="ProcessExpr" type="LineEdit" parent="HeaderContentSplit/VBoxContainer/Search/Search"]
layout_mode = 2
offset_left = 682.0
offset_right = 1146.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="HBoxContainer3" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
layout_mode = 2
offset_top = 70.0
offset_right = 1146.0
offset_bottom = 101.0
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3"]
layout_mode = 2
offset_top = 2.0
offset_right = 33.0
offset_bottom = 28.0
text = "Grid"
[node name="Refresh" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3"]
layout_mode = 2
offset_left = 37.0
offset_right = 61.0
offset_bottom = 31.0
tooltip_text = "Refresh"
icon = SubResource("ImageTexture_wgkau")
icon = SubResource("ImageTexture_we5a3")
script = ExtResource("4")
icon_name = "Loop"
[node name="Pages" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3" node_paths=PackedStringArray("node_editor_view_root")]
layout_mode = 2
offset_left = 65.0
offset_right = 320.0
offset_bottom = 31.0
script = ExtResource("11_5gh4r")
node_editor_view_root = NodePath("../../../..")
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"]
layout_mode = 2
offset_top = 2.0
offset_right = 42.0
offset_bottom = 28.0
text = "Page:"
[node name="Pagelist" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"]
layout_mode = 2
offset_left = 46.0
offset_right = 46.0
offset_bottom = 31.0
[node name="Label2" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"]
layout_mode = 2
offset_left = 50.0
offset_top = 2.0
offset_right = 168.0
offset_bottom = 28.0
text = "Rows per page:"
[node name="LineEdit" type="SpinBox" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"]
layout_mode = 2
offset_left = 172.0
offset_right = 255.0
offset_bottom = 31.0
min_value = 2.0
max_value = 300.0
value = 50.0
[node name="HSeparator" type="HSeparator" parent="HeaderContentSplit/VBoxContainer/HBoxContainer3"]
layout_mode = 2
offset_left = 324.0
offset_right = 1146.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="Sep" type="Control" parent="HeaderContentSplit/VBoxContainer"]
layout_mode = 2
anchors_preset = 0
offset_top = 105.0
offset_right = 1146.0
offset_bottom = 105.0
[node name="Columns" type="Control" parent="HeaderContentSplit/VBoxContainer"]
clip_contents = true
layout_mode = 2
anchors_preset = 0
offset_top = 109.0
offset_right = 1146.0
offset_bottom = 109.0
[node name="Columns" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/Columns"]
layout_mode = 0
@ -489,43 +349,28 @@ theme_override_constants/separation = 0
[node name="Sep2" type="Control" parent="HeaderContentSplit/VBoxContainer"]
layout_mode = 2
anchors_preset = 0
offset_top = 113.0
offset_right = 1146.0
offset_bottom = 113.0
[node name="MarginContainer" type="MarginContainer" parent="HeaderContentSplit"]
layout_mode = 2
offset_top = 117.0
offset_right = 1146.0
offset_bottom = 643.0
size_flags_horizontal = 3
size_flags_vertical = 3
mouse_filter = 2
[node name="FooterContentSplit" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 526.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Panel" type="MarginContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 522.0
size_flags_vertical = 3
mouse_filter = 2
[node name="Panel" type="Panel" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 522.0
[node name="Scroll" type="ScrollContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
layout_mode = 2
offset_right = 1146.0
offset_bottom = 522.0
size_flags_horizontal = 3
size_flags_vertical = 3
@ -540,8 +385,6 @@ theme_override_constants/v_separation = 0
[node name="Label" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
self_modulate = Color(1, 1, 1, 0.498039)
layout_mode = 2
offset_right = 1146.0
offset_bottom = 522.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "No folder selected!
@ -556,52 +399,33 @@ vertical_alignment = 1
[node name="Footer" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit"]
layout_mode = 2
offset_top = 526.0
offset_right = 1146.0
offset_bottom = 526.0
[node name="PropertyEditors" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer"]
unique_name_in_owner = true
layout_mode = 2
offset_right = 1146.0
[node name="EditEnumArray" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource("13_7nia1")]
visible = false
layout_mode = 2
anchors_preset = 0
anchor_right = 0.0
offset_right = 1146.0
offset_bottom = 61.0
grow_horizontal = 2
[node name="EditArray" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource("12")]
visible = false
layout_mode = 2
offset_bottom = 4.0
[node name="EditColor" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource("7")]
visible = false
layout_mode = 2
anchors_preset = 0
grow_horizontal = 1
[node name="EditNumber" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource("8")]
visible = false
layout_mode = 2
offset_bottom = 126.0
grow_horizontal = 2
[node name="EditTexture" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource("10")]
visible = false
layout_mode = 2
offset_bottom = 286.0
[node name="Control" type="Control" parent="."]
layout_mode = 2
anchors_preset = 0
offset_left = 3.0
offset_right = 1149.0
offset_bottom = 643.0
mouse_filter = 2
[node name="FileDialog" type="FileDialog" parent="Control"]
@ -613,7 +437,7 @@ mode_overrides_title = false
file_mode = 2
[node name="Control" type="Control" parent="Control/FileDialog"]
custom_minimum_size = Vector2i(1152, 573)
custom_minimum_size = Vector2(1152, 573)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -633,7 +457,7 @@ size = Vector2i(1000, 500)
popup_window = true
[node name="MarginContainer" type="MarginContainer" parent="Control/Info"]
custom_minimum_size = Vector2i(1000, 500)
custom_minimum_size = Vector2(1000, 500)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
@ -646,13 +470,9 @@ grow_vertical = 2
[node name="Panel" type="Panel" parent="Control/Info/MarginContainer"]
layout_mode = 2
offset_right = 1000.0
offset_bottom = 500.0
[node name="RichTextLabel" type="RichTextLabel" parent="Control/Info/MarginContainer"]
layout_mode = 2
offset_right = 1000.0
offset_bottom = 500.0
bbcode_enabled = true
text = "Edit Resources as Spreadsheet
@ -676,153 +496,97 @@ https://github.com/don-tnowe/godot-resources-as-sheets-plugin"
[node name="Settings" type="AcceptDialog" parent="Control"]
title = "Settings"
size = Vector2i(616, 377)
popup_window = true
size = Vector2i(500, 300)
min_size = Vector2i(500, 300)
[node name="MarginContainer" type="ScrollContainer" parent="Control/Settings"]
custom_minimum_size = Vector2i(600, 320)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = -544.0
offset_bottom = -320.0
offset_right = -622.0
offset_bottom = -322.0
grow_horizontal = 2
grow_vertical = 2
[node name="RichTextLabel" type="VBoxContainer" parent="Control/Settings/MarginContainer"]
layout_mode = 2
offset_right = 600.0
offset_bottom = 320.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="Control/Settings/MarginContainer/RichTextLabel"]
layout_mode = 2
offset_right = 600.0
offset_bottom = 227.0
columns = 2
script = ExtResource("14")
[node name="Label" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 2.0
offset_right = 513.0
offset_bottom = 28.0
size_flags_horizontal = 3
text = "Color-type cells style rows"
autowrap_mode = 2
[node name="ColorRows" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_right = 600.0
offset_bottom = 31.0
button_pressed = true
text = "Enable"
[node name="Label2" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 37.0
offset_right = 513.0
offset_bottom = 63.0
size_flags_horizontal = 3
text = "Colored array elements"
autowrap_mode = 2
[node name="ColorArrays" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 35.0
offset_right = 600.0
offset_bottom = 66.0
button_pressed = true
text = "Enable"
[node name="Label3" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 72.0
offset_right = 513.0
offset_bottom = 98.0
size_flags_horizontal = 3
text = "Array cell min width"
autowrap_mode = 2
[node name="ArrayMinWidth" type="SpinBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 70.0
offset_right = 600.0
offset_bottom = 101.0
min_value = 32.0
max_value = 512.0
value = 128.0
[node name="Label6" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
[node name="Label8" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 107.0
offset_right = 513.0
offset_bottom = 133.0
size_flags_horizontal = 3
text = "Resource preview size (Including Textures)"
autowrap_mode = 2
[node name="ResourcePreviewSize" type="SpinBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 105.0
offset_right = 513.0
offset_bottom = 157.0
min_value = 8.0
max_value = 1024.0
value = 32.0
[node name="Label7" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Clip header text (more compact view but header text wont be fully visible) (restart when switching)"
text = "Clip header text (makes columns smaller)"
autowrap_mode = 2
[node name="ClipHeaders" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 105.0
offset_right = 600.0
offset_bottom = 157.0
text = "Enable"
[node name="Label5" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 163.0
offset_right = 513.0
offset_bottom = 189.0
size_flags_horizontal = 3
text = "Duplicate arrays on edit (slower, but can be undone)"
autowrap_mode = 2
[node name="DupeArrays" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 161.0
offset_right = 600.0
offset_bottom = 192.0
button_pressed = true
text = "Enable"
[node name="Label6" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 198.0
offset_right = 513.0
offset_bottom = 224.0
size_flags_horizontal = 3
text = "Resource preview size"
autowrap_mode = 2
[node name="ResourcePreviewSize" type="SpinBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_left = 517.0
offset_top = 196.0
offset_right = 600.0
offset_bottom = 227.0
min_value = 8.0
max_value = 1024.0
value = 12.0
[connection signal="grid_updated" from="." to="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages" method="_on_grid_updated"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/MenuStrip/File" to="." method="_on_File_pressed"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/MenuStrip/SearchProcess" to="." method="_on_SearchProcess_pressed"]

View File

@ -36,4 +36,4 @@ func _has_main_screen():
func _get_plugin_icon():
# Until I add an actual icon, this'll do.
return get_editor_interface().get_base_control().get_theme_icon("GridContainer", "EditorIcons")
return get_editor_interface().get_base_control().get_theme_icon("VisualShaderNodeComment", "EditorIcons")

View File

@ -97,11 +97,11 @@ static func multi_paste(values : Array, cursor_positions : Array):
cursor_positions[i] += pasted_lines[i].length()
else:
cursor_positions[i] += OS.clipboard.length()
cursor_positions[i] += DisplayServer.clipboard_get().length()
values[i] = (
values[i].left(cursor_positions[i])
+ (pasted_lines[i] if paste_each_line else OS.clipboard)
+ (pasted_lines[i] if paste_each_line else DisplayServer.clipboard_get())
+ values[i].substr(cursor_positions[i])
)

View File

@ -14,7 +14,8 @@ func create_cell(caller : Control) -> Control:
return node
func _resize_color_rect(rect : ColorRect):
func _resize_color_rect(rect):
if !is_instance_valid(rect): return # Table refreshed twice, probably? Either way, this fix is easier
rect.size = Vector2(8, 0)
rect.anchors_preset = Control.PRESET_LEFT_WIDE
await rect.get_tree().process_frame

View File

@ -2,7 +2,11 @@ extends CellEditorArray
func can_edit_value(value, type, property_hint, column_index) -> bool:
if (type != TYPE_PACKED_INT32_ARRAY and type != TYPE_PACKED_INT64_ARRAY and type != TYPE_ARRAY) or property_hint != 25:
if (
type != TYPE_PACKED_INT32_ARRAY
and type != TYPE_PACKED_INT64_ARRAY
and type != TYPE_ARRAY
) or property_hint != PROPERTY_HINT_TYPE_STRING:
return false
return hint_strings_array[column_index][0].begins_with("2/2:")