Godot 4 port

This commit is contained in:
don-tnowe 2022-09-26 19:38:20 +03:00
parent 744436e66d
commit c1354071ed
87 changed files with 2805 additions and 2575 deletions

View File

@ -1,14 +0,0 @@
tool
class_name ThemeIconButton
extends Button
export var icon_name := "Node" setget _set_icon_name
func _ready():
_set_icon_name(icon_name)
func _set_icon_name(v):
icon_name = v
icon = get_icon(v, "EditorIcons")

View File

@ -1,21 +0,0 @@
tool
class_name ThemeStylebox
extends Control
export var box_class := "EditorStyles" setget _set_box_class
export var box_name := "Background" setget _set_box_name
func _ready():
_set_box_name(box_name)
_set_box_class(box_class)
func _set_box_name(v):
box_name = v
add_stylebox_override(box_name, get_stylebox(box_name, box_class))
func _set_box_class(v):
box_class = v
add_stylebox_override(box_name, get_stylebox(box_name, box_class))

View File

@ -1,714 +0,0 @@
[gd_scene load_steps=20 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/editor_view.gd" type="Script" id=1]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_string.gd" type="Script" id=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_color.gd" type="Script" id=3]
[ext_resource path="res://addons/resources_speadsheet_view/editor_icon_button.gd" type="Script" id=4]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_bool.gd" type="Script" id=5]
[ext_resource path="res://addons/resources_speadsheet_view/table_header.tscn" type="PackedScene" id=6]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_color.tscn" type="PackedScene" id=7]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_number.tscn" type="PackedScene" id=8]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_resource.gd" type="Script" id=9]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_texture.tscn" type="PackedScene" id=10]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_array.gd" type="Script" id=11]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_array.tscn" type="PackedScene" id=12]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_enum.gd" type="Script" id=13]
[ext_resource path="res://addons/resources_speadsheet_view/settings_grid.gd" type="Script" id=14]
[ext_resource path="res://addons/resources_speadsheet_view/typed_cells/cell_editor_enum_array.gd" type="Script" id=15]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_enum_array.tscn" type="PackedScene" id=16]
[ext_resource path="res://addons/resources_speadsheet_view/table_pages.gd" type="Script" id=17]
[sub_resource type="Image" id=3]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 3 )
size = Vector2( 16, 16 )
[node name="Control" type="MarginContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
focus_neighbour_left = NodePath(".")
focus_neighbour_top = NodePath(".")
focus_neighbour_right = NodePath(".")
focus_neighbour_bottom = NodePath(".")
focus_next = NodePath(".")
focus_previous = NodePath(".")
focus_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/margin_right = 3
custom_constants/margin_top = 0
custom_constants/margin_left = 3
custom_constants/margin_bottom = 3
script = ExtResource( 1 )
__meta__ = {
"_edit_lock_": true
}
table_header_scene = ExtResource( 6 )
cell_editor_classes = [ ExtResource( 15 ), ExtResource( 13 ), ExtResource( 11 ), ExtResource( 3 ), ExtResource( 5 ), ExtResource( 9 ), ExtResource( 2 ) ]
path_folder_path = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path")
path_recent_paths = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths")
path_table_root = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid")
path_property_editors = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors")
path_columns = NodePath("HeaderContentSplit/VBoxContainer/Columns/Columns")
path_hide_columns_button = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer2/VisibleCols")
path_page_manager = NodePath("HeaderContentSplit/VBoxContainer/Pages")
[node name="HeaderContentSplit" type="VBoxContainer" parent="."]
margin_left = 3.0
margin_right = 1021.0
margin_bottom = 597.0
__meta__ = {
"_edit_lock_": true
}
[node name="VBoxContainer" type="VBoxContainer" parent="HeaderContentSplit"]
margin_right = 1018.0
margin_bottom = 56.0
custom_constants/separation = 2
__meta__ = {
"_edit_lock_": true
}
[node name="HBoxContainer2" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
margin_right = 1018.0
margin_bottom = 22.0
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_top = 4.0
margin_right = 91.0
margin_bottom = 18.0
text = "Folder Display"
[node name="Control" type="Control" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_left = 95.0
margin_right = 746.0
margin_bottom = 22.0
size_flags_horizontal = 3
[node name="VisibleCols" type="MenuButton" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_left = 750.0
margin_right = 871.0
margin_bottom = 22.0
hint_tooltip = "Hide/Show Columns"
text = "Hide Columns"
icon = SubResource( 2 )
script = ExtResource( 4 )
icon_name = "GuiVisibilityVisible"
[node name="Settings" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_left = 875.0
margin_right = 956.0
margin_bottom = 22.0
hint_tooltip = "Settings"
text = "Settings"
icon = SubResource( 2 )
flat = true
script = ExtResource( 4 )
icon_name = "GDScript"
[node name="HSeparator2" type="VSeparator" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_left = 960.0
margin_right = 964.0
margin_bottom = 22.0
[node name="Info" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer2"]
margin_left = 968.0
margin_right = 1018.0
margin_bottom = 22.0
text = "About"
flat = true
__meta__ = {
"_edit_lock_": true
}
[node name="HBoxContainer" type="HSplitContainer" parent="HeaderContentSplit/VBoxContainer"]
margin_top = 24.0
margin_right = 1018.0
margin_bottom = 48.0
split_offset = -249
__meta__ = {
"_edit_lock_": true
}
[node name="HBoxContainer" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer"]
margin_right = 637.0
margin_bottom = 24.0
size_flags_horizontal = 3
custom_constants/separation = 0
__meta__ = {
"_edit_lock_": true
}
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 107.0
margin_bottom = 19.0
text = "Resource Folder:"
[node name="Path" type="LineEdit" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
unique_name_in_owner = true
margin_left = 107.0
margin_right = 553.0
margin_bottom = 24.0
size_flags_horizontal = 3
caret_blink = true
caret_blink_speed = 0.5
__meta__ = {
"_edit_lock_": true
}
[node name="SelectDir" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
margin_left = 553.0
margin_right = 581.0
margin_bottom = 24.0
hint_tooltip = "Open Folder"
icon = SubResource( 2 )
script = ExtResource( 4 )
__meta__ = {
"_edit_lock_": true
}
icon_name = "Folder"
[node name="Refresh" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
margin_left = 581.0
margin_right = 609.0
margin_bottom = 24.0
hint_tooltip = "Refresh"
icon = SubResource( 2 )
script = ExtResource( 4 )
__meta__ = {
"_edit_lock_": true
}
icon_name = "Refresh"
[node name="DeletePath" type="Button" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
margin_left = 609.0
margin_right = 637.0
margin_bottom = 24.0
hint_tooltip = "Remove Path from Recent"
icon = SubResource( 2 )
script = ExtResource( 4 )
__meta__ = {
"_edit_lock_": true
}
icon_name = "Remove"
[node name="HBoxContainer2" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/HBoxContainer"]
margin_left = 649.0
margin_right = 1018.0
margin_bottom = 24.0
[node name="Label2" type="Label" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2"]
margin_top = 5.0
margin_right = 87.0
margin_bottom = 19.0
text = "Open Recent:"
__meta__ = {
"_edit_lock_": true
}
[node name="RecentPaths" type="OptionButton" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2"]
unique_name_in_owner = true
margin_left = 91.0
margin_right = 369.0
margin_bottom = 24.0
size_flags_horizontal = 3
clip_text = true
__meta__ = {
"_edit_lock_": true
}
[node name="Sep4" type="Control" parent="HeaderContentSplit/VBoxContainer"]
margin_top = 50.0
margin_right = 1018.0
margin_bottom = 50.0
[node name="Pages" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer"]
visible = false
margin_top = 50.0
margin_right = 1018.0
margin_bottom = 74.0
script = ExtResource( 17 )
path_editor_view_root = NodePath("../../..")
[node name="Label" type="Label" parent="HeaderContentSplit/VBoxContainer/Pages"]
margin_top = 5.0
margin_right = 34.0
margin_bottom = 19.0
text = "Page:"
[node name="Pagelist" type="HBoxContainer" parent="HeaderContentSplit/VBoxContainer/Pages"]
margin_left = 38.0
margin_right = 38.0
margin_bottom = 24.0
[node name="Label2" type="Label" parent="HeaderContentSplit/VBoxContainer/Pages"]
margin_left = 42.0
margin_top = 5.0
margin_right = 138.0
margin_bottom = 19.0
text = "Rows per page:"
[node name="LineEdit" type="SpinBox" parent="HeaderContentSplit/VBoxContainer/Pages"]
margin_left = 142.0
margin_right = 200.0
margin_bottom = 24.0
min_value = 2.0
max_value = 300.0
value = 50.0
[node name="Sep3" type="Control" parent="HeaderContentSplit/VBoxContainer"]
margin_top = 52.0
margin_right = 1018.0
margin_bottom = 52.0
[node name="Columns" type="Control" parent="HeaderContentSplit/VBoxContainer"]
margin_top = 54.0
margin_right = 1018.0
margin_bottom = 54.0
rect_clip_content = true
[node name="Columns" type="Control" parent="HeaderContentSplit/VBoxContainer/Columns"]
margin_right = 1020.0
[node name="Sep2" type="Control" parent="HeaderContentSplit/VBoxContainer"]
margin_top = 56.0
margin_right = 1018.0
margin_bottom = 56.0
[node name="MarginContainer" type="MarginContainer" parent="HeaderContentSplit"]
margin_top = 60.0
margin_right = 1018.0
margin_bottom = 597.0
mouse_filter = 2
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_lock_": true
}
[node name="FooterContentSplit" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer"]
margin_right = 1018.0
margin_bottom = 537.0
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_lock_": true
}
[node name="Panel" type="MarginContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit"]
margin_right = 1018.0
margin_bottom = 487.0
mouse_filter = 2
size_flags_vertical = 3
__meta__ = {
"_edit_lock_": true
}
[node name="Panel" type="Panel" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
margin_right = 1018.0
margin_bottom = 487.0
__meta__ = {
"_edit_lock_": true
}
[node name="Scroll" type="ScrollContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
margin_right = 1018.0
margin_bottom = 487.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
__meta__ = {
"_edit_lock_": true
}
[node name="MarginContainer" type="MarginContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll"]
margin_right = 5.65
custom_constants/margin_right = 0
custom_constants/margin_top = 0
__meta__ = {
"_edit_lock_": true
}
[node name="TableGrid" type="GridContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer"]
margin_right = 5.65
rect_min_size = Vector2( 5.65, 0 )
custom_constants/vseparation = 0
custom_constants/hseparation = 0
__meta__ = {
"_edit_lock_": true
}
[node name="Label" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel"]
self_modulate = Color( 1, 1, 1, 0.498039 )
margin_right = 1018.0
margin_bottom = 487.0
size_flags_horizontal = 3
size_flags_vertical = 3
text = "No folder selected!
Please select a folder to edit using the controls above.
Then, Shift+Click or Ctrl+Click cells to edit them using the keyboard,
Inspector dock or this screen's bottom panels.
To find out keybindings available, open the \"About\" menu."
align = 1
valign = 1
[node name="Footer" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit"]
margin_top = 491.0
margin_right = 1018.0
margin_bottom = 537.0
__meta__ = {
"_edit_lock_": true
}
[node name="PropertyEditors" type="VBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer"]
unique_name_in_owner = true
margin_right = 1018.0
[node name="EditArray" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource( 12 )]
visible = false
anchor_right = 0.0
margin_right = 1020.0
margin_bottom = 2.22834e+06
[node name="EditColor" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource( 7 )]
visible = false
anchor_right = 0.0
margin_right = 1020.0
[node name="EditNumber" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource( 8 )]
visible = false
anchor_right = 0.0
margin_right = 1020.0
margin_bottom = 84.0
[node name="EditTexture" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource( 10 )]
visible = false
anchor_right = 0.0
margin_right = 1020.0
margin_bottom = 84.0
[node name="EditEnumArray" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors" instance=ExtResource( 16 )]
visible = false
anchor_right = 0.0
margin_right = 1018.0
margin_bottom = 38.0
[node name="HBoxContainer" type="HBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer"]
margin_top = 4.0
margin_right = 1018.0
margin_bottom = 18.0
[node name="Label" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/HBoxContainer"]
margin_right = 183.0
margin_bottom = 14.0
text = "GDScript Search and Process"
[node name="HSeparator" type="HSeparator" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/HBoxContainer"]
margin_left = 187.0
margin_right = 1018.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Search" type="HBoxContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer"]
margin_top = 22.0
margin_right = 1018.0
margin_bottom = 46.0
[node name="Label" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_top = 5.0
margin_right = 65.0
margin_bottom = 19.0
text = "Condition:"
[node name="Label2" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 69.0
margin_top = 3.0
margin_right = 87.0
margin_bottom = 21.0
rect_min_size = Vector2( 18, 18 )
hint_tooltip = "Enter an expression. The table only show rows where the expression returns `true`.
You can use `res.<property_name>` to get a property. Hit ENTER to run the search.
Try out these:
- (res.number_property > 0 and res.number_property < 100)
- (res.text_property != \"\")
- (\"a\" in res.text_property)"
mouse_filter = 0
mouse_default_cursor_shape = 16
text = "(?)"
align = 1
[node name="SearchCond" type="LineEdit" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 91.0
margin_right = 508.0
margin_bottom = 24.0
size_flags_horizontal = 3
text = "true"
[node name="VSeparator" type="VSeparator" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 512.0
margin_right = 516.0
margin_bottom = 24.0
[node name="Label3" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 520.0
margin_top = 5.0
margin_right = 574.0
margin_bottom = 19.0
text = "Process:"
[node name="Label4" type="Label" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 578.0
margin_top = 3.0
margin_right = 596.0
margin_bottom = 21.0
rect_min_size = Vector2( 18, 18 )
hint_tooltip = "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
and `cell_index` to get the cell's selection order. Hit ENTER to run the search.
These are some valid expressions:
- (res.property1 + res.property2)
- (res.property1.replace(\"old_string\", \"new_string\"))
- (load(\"res://path/to_resource.tres\"))
Don't forget quotation marks on strings and str() on non-strings."
mouse_filter = 0
mouse_default_cursor_shape = 16
text = "(?)"
align = 1
[node name="ProcessExpr" type="LineEdit" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search"]
margin_left = 600.0
margin_right = 1018.0
margin_bottom = 24.0
size_flags_horizontal = 3
text = "value"
[node name="Control" type="Control" parent="."]
margin_left = 3.0
margin_right = 1021.0
margin_bottom = 597.0
mouse_filter = 2
__meta__ = {
"_edit_lock_": true
}
[node name="FileDialog" type="FileDialog" parent="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -307.0
margin_top = -192.0
margin_right = 307.0
margin_bottom = 192.0
rect_min_size = Vector2( 150, 52.5 )
window_title = "Open a Folder"
mode_overrides_title = false
mode = 2
[node name="Info" type="AcceptDialog" parent="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -320.0
margin_top = -152.0
margin_right = 320.0
margin_bottom = 152.0
window_title = "About"
__meta__ = {
"_edit_group_": true
}
[node name="MarginContainer" type="MarginContainer" parent="Control/Info"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 8.0
margin_right = -8.0
margin_bottom = -36.0
[node name="RichTextLabel" type="RichTextLabel" parent="Control/Info/MarginContainer"]
margin_right = 624.0
margin_bottom = 260.0
bbcode_enabled = true
bbcode_text = "[center]Edit Resources as Spreadsheet[/center]
\"Welp, it is what it sounds like!\"
Possible inputs:
- [code]Ctrl + Click / Cmd + Click[/code] - Select multiple cells in one column
- [code]Shift + Click[/code] - Select all cells between A and B in one column
- [code]Left/Right[/code] - Move cursor along cell text
- [code]Backspace/Delete[/code] - Erase text Left / Right from cursor
- [code]Home/End[/code] - Move cursor to start/end of cell
- [code]Ctrl + <move/erase> / Cmd + <move/erase>[/code] - Move through / Erase whole word
- [code]Ctrl/Cmd + C/V[/code] - Copy cells / Paste text into cells
- [code]Ctrl/Cmd + (Shift) + Z[/code] - The Savior
If clipboard contains as many lines as there are cells selected, each line is pasted into a separate cell.
Made by Don Tnowe. 2022.
[url]https://twitter.com/don_tnowe[/url]
Issues and contribution:
[url]https://github.com/don-tnowe/godot-resources-as-sheets-plugin[/url]"
text = "Edit Resources as Spreadsheet
\"Welp, it is what it sounds like!\"
Possible inputs:
- Ctrl + Click / Cmd + Click - Select multiple cells in one column
- Shift + Click - Select all cells between A and B in one column
- Left/Right - Move cursor along cell text
- Backspace/Delete - Erase text Left / Right from cursor
- Home/End - Move cursor to start/end of cell
- Ctrl + <move/erase> / Cmd + <move/erase> - Move through / Erase whole word
- Ctrl/Cmd + C/V - Copy cells / Paste text into cells
- Ctrl/Cmd + (Shift) + Z - The Savior
If clipboard contains as many lines as there are cells selected, each line is pasted into a separate cell.
Made by Don Tnowe. 2022.
https://twitter.com/don_tnowe
Issues and contribution:
https://github.com/don-tnowe/godot-resources-as-sheets-plugin"
[node name="Settings" type="AcceptDialog" parent="Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -235.0
margin_top = -123.0
margin_right = 185.0
margin_bottom = 88.0
window_title = "Settings"
__meta__ = {
"_edit_group_": true
}
[node name="MarginContainer" type="ScrollContainer" parent="Control/Settings"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 8.0
margin_right = -8.0
margin_bottom = -36.0
scroll_horizontal_enabled = false
[node name="RichTextLabel" type="VBoxContainer" parent="Control/Settings/MarginContainer"]
margin_right = 404.0
margin_bottom = 167.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="GridContainer" type="GridContainer" parent="Control/Settings/MarginContainer/RichTextLabel"]
margin_right = 404.0
margin_bottom = 150.0
columns = 2
script = ExtResource( 14 )
[node name="Label" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_top = 5.0
margin_right = 326.0
margin_bottom = 19.0
size_flags_horizontal = 3
text = "Color-type cells style rows"
[node name="ColorRows" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_left = 330.0
margin_right = 404.0
margin_bottom = 24.0
pressed = true
text = "Enable"
[node name="Label2" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_top = 33.0
margin_right = 326.0
margin_bottom = 47.0
size_flags_horizontal = 3
text = "Colored array elements"
[node name="ColorArrays" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_left = 330.0
margin_top = 28.0
margin_right = 404.0
margin_bottom = 52.0
pressed = true
text = "Enable"
[node name="Label3" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_top = 61.0
margin_right = 326.0
margin_bottom = 75.0
size_flags_horizontal = 3
text = "Array cell min width"
[node name="ArrayMinWidth" type="SpinBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_left = 330.0
margin_top = 56.0
margin_right = 404.0
margin_bottom = 80.0
min_value = 32.0
max_value = 512.0
value = 128.0
[node name="Label4" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_top = 84.0
margin_right = 326.0
margin_bottom = 115.0
size_flags_horizontal = 3
text = "Clip header text (more compact view but header text wont be fully visible) (restart when switching)"
autowrap = true
[node name="ClipHeaders" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_left = 330.0
margin_top = 84.0
margin_right = 404.0
margin_bottom = 115.0
text = "Enable"
[node name="Label5" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_top = 119.0
margin_right = 326.0
margin_bottom = 150.0
size_flags_horizontal = 3
text = "Duplicate arrays on edit (slower, but can be undone)"
autowrap = true
[node name="DupeArrays" type="CheckBox" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
margin_left = 330.0
margin_top = 119.0
margin_right = 404.0
margin_bottom = 150.0
pressed = true
text = "Enable"
[connection signal="grid_updated" from="." to="HeaderContentSplit/VBoxContainer/Pages" method="_on_Control_grid_updated"]
[connection signal="about_to_show" from="HeaderContentSplit/VBoxContainer/HBoxContainer2/VisibleCols" to="." method="_on_VisibleCols_about_to_show"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer2/Settings" to="Control/Settings" method="popup_centered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer2/Info" to="Control/Info" method="popup_centered"]
[connection signal="text_entered" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path" to="." method="_on_Path_text_entered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/SelectDir" to="Control/FileDialog" method="popup_centered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Refresh" to="." method="_on_Path_text_entered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/DeletePath" to="." method="remove_selected_path_from_recent"]
[connection signal="item_selected" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths" to="." method="_on_RecentPaths_item_selected"]
[connection signal="value_changed" from="HeaderContentSplit/VBoxContainer/Pages/LineEdit" to="HeaderContentSplit/VBoxContainer/Pages" method="_on_LineEdit_value_changed"]
[connection signal="text_entered" from="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search/SearchCond" to="." method="_on_SearchCond_text_entered"]
[connection signal="text_entered" from="HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/Search/ProcessExpr" to="." method="_on_ProcessExpr_text_entered"]
[connection signal="dir_selected" from="Control/FileDialog" to="." method="_on_FileDialog_dir_selected"]

View File

@ -1,29 +0,0 @@
tool
class_name SettingsGrid
extends GridContainer
const SETTING_PREFIX = "addons/resources_spreadsheet_view/"
func _ready():
for x in get_children():
var setting = SETTING_PREFIX + TextEditingUtils.pascal_case_to_snake_case(x.name)
if x is BaseButton:
x.connect("toggled", self, "_set_setting", [setting])
if !ProjectSettings.has_setting(setting):
call("_set_setting", x.pressed, setting)
else:
x.pressed = ProjectSettings.get_setting(setting)
elif x is Range:
x.connect("value_changed", self, "_set_setting", [setting])
if !ProjectSettings.has_setting(setting):
call("_set_setting", x.value, setting)
else:
x.value = ProjectSettings.get_setting(setting)
func _set_setting(new_value, setting):
ProjectSettings.set_setting(setting, new_value)

View File

@ -1,47 +0,0 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/table_header.gd" type="Script" id=1]
[ext_resource path="res://addons/resources_speadsheet_view/editor_icon_button.gd" type="Script" id=2]
[sub_resource type="Image" id=3]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 3 )
size = Vector2( 16, 16 )
[node name="Header" type="HBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -892.0
margin_bottom = -580.0
size_flags_horizontal = 3
custom_constants/separation = 0
script = ExtResource( 1 )
[node name="Button" type="Button" parent="."]
margin_right = 104.0
margin_bottom = 20.0
hint_tooltip = "Click to sort column."
size_flags_horizontal = 3
size_flags_vertical = 0
text = "resource_name"
clip_text = true
[node name="Button2" type="MenuButton" parent="."]
margin_left = 104.0
margin_right = 132.0
margin_bottom = 22.0
size_flags_horizontal = 9
icon = SubResource( 2 )
items = [ "Select all cells", null, 0, false, false, 0, 0, null, "", false, "Hide column", null, 0, false, false, 1, 0, null, "", false ]
script = ExtResource( 2 )
icon_name = "ArrowDown"

View File

@ -1,43 +0,0 @@
[gd_scene format=2]
[node name="Label" type="MarginContainer"]
margin_right = 58.0
margin_bottom = 14.0
rect_min_size = Vector2( 128, 0 )
size_flags_vertical = 9
__meta__ = {
"_edit_lock_": true
}
[node name="Box" type="HFlowContainer" parent="."]
margin_right = 128.0
margin_bottom = 14.0
mouse_filter = 2
custom_constants/vseparation = 0
custom_constants/hseparation = 0
[node name="Back" type="Control" parent="."]
show_behind_parent = true
margin_right = 128.0
margin_bottom = 14.0
mouse_filter = 2
__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
margin_bottom = 14.0
mouse_filter = 2
color = Color( 1, 1, 1, 0.247059 )

View File

@ -1,32 +0,0 @@
[gd_scene format=2]
[node name="Label" type="Label"]
margin_right = 58.0
margin_bottom = 14.0
rect_min_size = Vector2( 58, 0 )
mouse_filter = 0
size_flags_vertical = 9
__meta__ = {
"_edit_lock_": true
}
[node name="Back" type="ColorRect" parent="."]
show_behind_parent = true
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 )
__meta__ = {
"_edit_lock_": true
}
[node name="Selected" type="ColorRect" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 1, 1, 1, 0.247059 )

View File

@ -1,32 +0,0 @@
class_name CellEditor
extends Reference
const CELL_SCENE_DIR = "res://addons/resources_speadsheet_view/typed_cells/"
var hint_strings_array := []
# Override to define where the cell should be shown.
func can_edit_value(value, type, property_hint, column_index) -> bool:
return value != null
# Override to change how the cell is created; preload a scene or create nodes from code.
# Caller is an instance of `editor_view.tscn`.
func create_cell(caller : Control) -> Control:
return load(CELL_SCENE_DIR + "basic.tscn").instance()
# Override to change behaviour when the cell is clicked to be selected.
func set_selected(node : Control, selected : bool):
node.get_node("Selected").visible = selected
# Override to change how the value is displayed.
func set_value(node : Control, value):
node.text = TextEditingUtils.show_non_typing(str(value))
# Override to prevent the cell from being edited as text.
func is_text():
return true
# Override to change behaviour when there are color cells to the left of this cell.
func set_color(node : Control, color : Color):
node.get_node("Back").modulate = color * 1.0

View File

@ -1,30 +0,0 @@
extends CellEditor
var _cached_color := Color.white
func create_cell(caller : Control) -> Control:
var node = load(CELL_SCENE_DIR + "basic.tscn").instance()
var color = ColorRect.new()
node.align = Label.ALIGN_RIGHT
node.rect_min_size.x = 56
node.add_child(color)
color.name = "Color"
color.anchor_bottom = 1.0
color.rect_size = Vector2(8, 0)
return node
func can_edit_value(value, type, property_hint, column_index) -> bool:
return type == TYPE_COLOR
func set_value(node : Control, value):
if value is String:
node.text = TextEditingUtils.show_non_typing(str(value))
else:
node.text = value.to_html(true)
_cached_color = value
node.get_node("Color").color = value

View File

@ -1,18 +0,0 @@
extends CellEditorArray
func can_edit_value(value, type, property_hint, column_index) -> bool:
if (type != TYPE_INT_ARRAY and type != TYPE_ARRAY) or property_hint != 26:
return false
return hint_strings_array[column_index][0].begins_with("2/3:")
func _write_value_to_child(value, hint_arr : PoolStringArray, child : Label, colored : bool):
if value == 0:
# Enum array hints have "2/3:" before list.
var found := hint_arr[0].find(":") + 1
._write_value_to_child(hint_arr[0].substr(hint_arr[0].find(":") + 1), hint_arr, child, colored)
else:
._write_value_to_child(hint_arr[value], hint_arr, child, colored)

View File

@ -1,59 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://icon.png" type="Texture" id=1]
[node name="Label" type="MarginContainer"]
margin_right = 58.0
margin_bottom = 14.0
size_flags_vertical = 9
__meta__ = {
"_edit_lock_": true
}
[node name="Back" type="Control" parent="."]
show_behind_parent = true
margin_right = 85.0
margin_bottom = 32.0
mouse_filter = 2
__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
margin_bottom = 32.0
mouse_filter = 2
color = Color( 1, 1, 1, 0.247059 )
[node name="Box" type="HBoxContainer" parent="."]
margin_right = 85.0
margin_bottom = 32.0
[node name="Tex" type="TextureRect" parent="Box"]
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
texture = ExtResource( 1 )
expand = true
stretch_mode = 6
[node name="Label" type="Label" parent="Box"]
margin_left = 36.0
margin_top = 9.0
margin_right = 85.0
margin_bottom = 23.0
size_flags_horizontal = 3
text = "res.tres"
align = 1
valign = 1

View File

@ -1,222 +0,0 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_array.gd" type="Script" id=1]
[ext_resource path="res://addons/resources_speadsheet_view/editor_icon_button.gd" type="Script" id=2]
[sub_resource type="Image" id=3]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 3 )
size = Vector2( 16, 16 )
[node name="EditArray" type="VBoxContainer"]
anchor_right = 1.0
margin_bottom = 62.0
rect_pivot_offset = Vector2( -460, -28 )
mouse_filter = 0
script = ExtResource( 1 )
[node name="Header" type="HBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 14.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
margin_right = 70.0
margin_bottom = 14.0
text = "EDIT: Array"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
margin_left = 74.0
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
margin_left = 459.0
margin_right = 565.0
margin_bottom = 14.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
margin_left = 569.0
margin_right = 1024.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HSplitContainer" parent="."]
margin_top = 18.0
margin_right = 1024.0
margin_bottom = 70.0
split_offset = 192
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer"]
margin_right = 571.0
margin_bottom = 52.0
alignment = 2
[node name="Panel" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
margin_right = 320.0
margin_bottom = 52.0
size_flags_horizontal = 3
[node name="Label" type="TextEdit" parent="HBoxContainer/HBoxContainer/Panel"]
margin_right = 320.0
margin_bottom = 52.0
rect_min_size = Vector2( 128, 0 )
size_flags_vertical = 5
text = "[]"
readonly = true
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
margin_left = 324.0
margin_right = 328.0
margin_bottom = 52.0
[node name="Control" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
margin_left = 332.0
margin_right = 563.0
margin_bottom = 52.0
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/HBoxContainer/Control"]
margin_right = 231.0
margin_bottom = 52.0
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
margin_right = 231.0
margin_bottom = 26.0
rect_min_size = Vector2( 128, 0 )
clear_button_enabled = true
placeholder_text = "Input value to add/erase..."
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
margin_top = 30.0
margin_right = 231.0
margin_bottom = 52.0
[node name="Label" type="Label" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_top = 4.0
margin_right = 29.0
margin_bottom = 18.0
text = "Add:"
[node name="String" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 33.0
margin_right = 61.0
margin_bottom = 22.0
hint_tooltip = "Add String"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "String"
[node name="Int" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 65.0
margin_right = 93.0
margin_bottom = 22.0
hint_tooltip = "Add Integer"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "int"
[node name="Float" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 97.0
margin_right = 125.0
margin_bottom = 22.0
hint_tooltip = "Add Float"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "float"
[node name="Variant" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 129.0
margin_right = 157.0
margin_bottom = 22.0
hint_tooltip = "Guess Type and Add"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "Variant"
[node name="Label2" type="Label" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 161.0
margin_top = 4.0
margin_right = 199.0
margin_bottom = 18.0
text = "Erase:"
[node name="Remove" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
margin_left = 203.0
margin_right = 231.0
margin_bottom = 22.0
hint_tooltip = "Erase Value from Array"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "Remove"
[node name="VSeparator" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
margin_left = 567.0
margin_right = 571.0
margin_bottom = 52.0
[node name="Control2" type="MarginContainer" parent="HBoxContainer"]
margin_left = 583.0
margin_right = 1024.0
margin_bottom = 52.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Control2"]
margin_right = 441.0
margin_bottom = 52.0
alignment = 2
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/Control2/HBoxContainer"]
margin_right = 4.0
margin_bottom = 52.0
[node name="HFlowContainer" type="HFlowContainer" parent="HBoxContainer/Control2/HBoxContainer"]
margin_left = 8.0
margin_right = 441.0
margin_bottom = 52.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
margin_top = 4.0
margin_right = 48.0
margin_bottom = 18.0
text = "Recent:"
[node name="OptionButton" type="OptionButton" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
margin_left = 52.0
margin_right = 106.0
margin_bottom = 22.0
text = "Add"
items = [ "Add", null, false, 0, null, "Erase", null, false, 1, null, "Delete From Recent", null, false, 2, null ]
selected = 0
[node name="AddRecentFromSel" type="Button" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
margin_left = 110.0
margin_right = 138.0
margin_bottom = 22.0
hint_tooltip = "Copy Selection into this List"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "ListSelect"
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/String" to="." method="_on_String_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Int" to="." method="_on_Int_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Float" to="." method="_on_Float_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Variant" to="." method="_on_Variant_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Remove" to="." method="_on_Remove_pressed"]
[connection signal="pressed" from="HBoxContainer/Control2/HBoxContainer/HFlowContainer/AddRecentFromSel" to="." method="_on_AddRecentFromSel_pressed"]

View File

@ -1,424 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_color.gd" type="Script" id=1]
[node name="EditColor" type="VBoxContainer"]
anchor_right = 1.0
margin_bottom = 86.0
rect_pivot_offset = Vector2( -460, -28 )
mouse_filter = 0
script = ExtResource( 1 )
[node name="Header" type="HBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 14.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
margin_right = 70.0
margin_bottom = 14.0
text = "EDIT: Color"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
margin_left = 74.0
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
margin_left = 459.0
margin_right = 565.0
margin_bottom = 14.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
margin_left = 569.0
margin_right = 1024.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="EditColor" type="HBoxContainer" parent="."]
margin_top = 18.0
margin_right = 1024.0
margin_bottom = 86.0
alignment = 1
[node name="VSeparator7" type="Control" parent="EditColor"]
margin_right = 172.0
margin_bottom = 68.0
rect_min_size = Vector2( 16, 0 )
size_flags_horizontal = 3
[node name="VSeparator3" type="Control" parent="EditColor"]
visible = false
margin_right = 16.0
margin_bottom = 68.0
rect_min_size = Vector2( 16, 0 )
[node name="ButtonRowTemplate" type="Control" parent="EditColor"]
visible = false
margin_left = 20.0
margin_right = 20.0
margin_bottom = 42.0
[node name="Button3" type="Button" parent="EditColor/ButtonRowTemplate"]
margin_right = 25.0
margin_bottom = 20.0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/ButtonRowTemplate"]
margin_left = 29.0
margin_right = 54.0
margin_bottom = 20.0
text = "-5"
[node name="Label" type="Label" parent="EditColor/ButtonRowTemplate"]
margin_left = 87.0
margin_top = 3.0
margin_right = 111.0
margin_bottom = 17.0
text = "Red"
align = 1
[node name="Button5" type="Button" parent="EditColor/ButtonRowTemplate"]
margin_left = 147.0
margin_right = 175.0
margin_bottom = 20.0
text = "+5"
[node name="Button6" type="Button" parent="EditColor/ButtonRowTemplate"]
margin_left = 179.0
margin_right = 207.0
margin_bottom = 20.0
text = "+X"
[node name="RGBGrid" type="GridContainer" parent="EditColor"]
margin_left = 176.0
margin_right = 353.0
margin_bottom = 68.0
columns = 5
[node name="Button3" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 1, 0.780392, 0.780392, 1 )
margin_right = 25.0
margin_bottom = 20.0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 1, 0.780392, 0.780392, 1 )
margin_left = 29.0
margin_right = 62.0
margin_bottom = 20.0
text = "-10"
[node name="Label" type="Label" parent="EditColor/RGBGrid"]
margin_left = 66.0
margin_top = 3.0
margin_right = 105.0
margin_bottom = 17.0
text = "Red"
align = 1
[node name="Button5" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 1, 0.780392, 0.780392, 1 )
margin_left = 109.0
margin_right = 145.0
margin_bottom = 20.0
text = "+10"
[node name="Button6" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 1, 0.780392, 0.780392, 1 )
margin_left = 149.0
margin_right = 177.0
margin_bottom = 20.0
text = "+X"
[node name="Button7" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.666667, 1, 0.745098, 1 )
margin_top = 24.0
margin_right = 25.0
margin_bottom = 44.0
text = "-X"
[node name="Button8" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.666667, 1, 0.745098, 1 )
margin_left = 29.0
margin_top = 24.0
margin_right = 62.0
margin_bottom = 44.0
text = "-10"
[node name="Label2" type="Label" parent="EditColor/RGBGrid"]
margin_left = 66.0
margin_top = 27.0
margin_right = 105.0
margin_bottom = 41.0
text = "Green"
align = 1
[node name="Button11" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.666667, 1, 0.745098, 1 )
margin_left = 109.0
margin_top = 24.0
margin_right = 145.0
margin_bottom = 44.0
text = "+10"
[node name="Button12" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.666667, 1, 0.745098, 1 )
margin_left = 149.0
margin_top = 24.0
margin_right = 177.0
margin_bottom = 44.0
text = "+X"
[node name="Button13" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.772549, 0.792157, 1, 1 )
margin_top = 48.0
margin_right = 25.0
margin_bottom = 68.0
text = "-X"
[node name="Button14" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.772549, 0.792157, 1, 1 )
margin_left = 29.0
margin_top = 48.0
margin_right = 62.0
margin_bottom = 68.0
text = "-10"
[node name="Label3" type="Label" parent="EditColor/RGBGrid"]
margin_left = 66.0
margin_top = 51.0
margin_right = 105.0
margin_bottom = 65.0
text = "Blue"
align = 1
[node name="Button17" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.772549, 0.792157, 1, 1 )
margin_left = 109.0
margin_top = 48.0
margin_right = 145.0
margin_bottom = 68.0
text = "+10"
[node name="Button18" type="Button" parent="EditColor/RGBGrid"]
modulate = Color( 0.772549, 0.792157, 1, 1 )
margin_left = 149.0
margin_top = 48.0
margin_right = 177.0
margin_bottom = 68.0
text = "+X"
[node name="VSeparator" type="VSeparator" parent="EditColor"]
margin_left = 357.0
margin_right = 361.0
margin_bottom = 68.0
[node name="ColorProper" type="VBoxContainer" parent="EditColor"]
margin_left = 365.0
margin_right = 461.0
margin_bottom = 68.0
[node name="ColorRect" type="ColorRect" parent="EditColor/ColorProper"]
margin_right = 96.0
margin_bottom = 44.0
size_flags_vertical = 3
[node name="Button" type="Button" parent="EditColor/ColorProper"]
margin_top = 48.0
margin_right = 96.0
margin_bottom = 68.0
text = "Choose Color"
[node name="VSeparator2" type="VSeparator" parent="EditColor"]
margin_left = 465.0
margin_right = 469.0
margin_bottom = 68.0
[node name="HSVGrid" type="GridContainer" parent="EditColor"]
margin_left = 473.0
margin_right = 646.0
margin_bottom = 68.0
columns = 5
[node name="Button3" type="Button" parent="EditColor/HSVGrid"]
modulate = Color( 1, 0.913725, 0.776471, 1 )
margin_right = 25.0
margin_bottom = 20.0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/HSVGrid"]
modulate = Color( 0.898039, 1, 0.698039, 1 )
margin_left = 29.0
margin_right = 62.0
margin_bottom = 20.0
text = "-10"
[node name="Label" type="Label" parent="EditColor/HSVGrid"]
margin_left = 66.0
margin_top = 3.0
margin_right = 101.0
margin_bottom = 17.0
text = "Hue"
align = 1
[node name="Button5" type="Button" parent="EditColor/HSVGrid"]
modulate = Color( 0.717647, 1, 0.980392, 1 )
margin_left = 105.0
margin_right = 141.0
margin_bottom = 20.0
text = "+10"
[node name="Button6" type="Button" parent="EditColor/HSVGrid"]
modulate = Color( 0.74902, 0.729412, 1, 1 )
margin_left = 145.0
margin_right = 173.0
margin_bottom = 20.0
text = "+X"
[node name="Button7" type="Button" parent="EditColor/HSVGrid"]
margin_top = 24.0
margin_right = 25.0
margin_bottom = 44.0
text = "-X"
[node name="Button8" type="Button" parent="EditColor/HSVGrid"]
margin_left = 29.0
margin_top = 24.0
margin_right = 62.0
margin_bottom = 44.0
text = "-5"
[node name="Label2" type="Label" parent="EditColor/HSVGrid"]
margin_left = 66.0
margin_top = 27.0
margin_right = 101.0
margin_bottom = 41.0
text = "Sat"
align = 1
[node name="Button11" type="Button" parent="EditColor/HSVGrid"]
margin_left = 105.0
margin_top = 24.0
margin_right = 141.0
margin_bottom = 44.0
text = "+5"
[node name="Button12" type="Button" parent="EditColor/HSVGrid"]
margin_left = 145.0
margin_top = 24.0
margin_right = 173.0
margin_bottom = 44.0
text = "+X"
[node name="Button13" type="Button" parent="EditColor/HSVGrid"]
margin_top = 48.0
margin_right = 25.0
margin_bottom = 68.0
text = "-X"
[node name="Button14" type="Button" parent="EditColor/HSVGrid"]
margin_left = 29.0
margin_top = 48.0
margin_right = 62.0
margin_bottom = 68.0
text = "-5"
[node name="Label3" type="Label" parent="EditColor/HSVGrid"]
margin_left = 66.0
margin_top = 51.0
margin_right = 101.0
margin_bottom = 65.0
text = "Value"
align = 1
[node name="Button17" type="Button" parent="EditColor/HSVGrid"]
margin_left = 105.0
margin_top = 48.0
margin_right = 141.0
margin_bottom = 68.0
text = "+5"
[node name="Button18" type="Button" parent="EditColor/HSVGrid"]
margin_left = 145.0
margin_top = 48.0
margin_right = 173.0
margin_bottom = 68.0
text = "+X"
[node name="VSeparator4" type="VSeparator" parent="EditColor"]
margin_left = 650.0
margin_right = 654.0
margin_bottom = 68.0
[node name="CustomX" type="VBoxContainer" parent="EditColor"]
margin_left = 658.0
margin_right = 848.0
margin_bottom = 68.0
[node name="Label" type="Label" parent="EditColor/CustomX"]
margin_top = 13.0
margin_right = 190.0
margin_bottom = 27.0
size_flags_vertical = 6
text = "Custom Value (for +X buttons)"
[node name="LineEdit" type="LineEdit" parent="EditColor/CustomX"]
margin_top = 44.0
margin_right = 190.0
margin_bottom = 68.0
text = "20"
[node name="VSeparator6" type="Control" parent="EditColor"]
margin_left = 852.0
margin_right = 1024.0
margin_bottom = 68.0
rect_min_size = Vector2( 16, 0 )
size_flags_horizontal = 3
[node name="Panel" type="PanelContainer" parent="EditColor/VSeparator6"]
visible = false
anchor_top = 1.0
anchor_bottom = 1.0
margin_left = -601.0
margin_top = -504.0
margin_right = -278.0
[node name="Panel2" type="Panel" parent="EditColor/VSeparator6/Panel"]
self_modulate = Color( 1.5, 1.5, 1.5, 1 )
margin_left = 7.0
margin_top = 7.0
margin_right = 316.0
margin_bottom = 497.0
[node name="MarginContainer" type="MarginContainer" parent="EditColor/VSeparator6/Panel"]
margin_left = 7.0
margin_top = 7.0
margin_right = 316.0
margin_bottom = 497.0
custom_constants/margin_right = 4
custom_constants/margin_top = 4
custom_constants/margin_left = 4
custom_constants/margin_bottom = 4
[node name="ColorPicker" type="ColorPicker" parent="EditColor/VSeparator6/Panel/MarginContainer"]
margin_left = 4.0
margin_top = 4.0
margin_right = 305.0
margin_bottom = 486.0
[node name="Button" type="Button" parent="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker"]
margin_top = 462.0
margin_right = 301.0
margin_bottom = 482.0
text = "OK"
[connection signal="pressed" from="EditColor/ColorProper/Button" to="." method="_on_Button_pressed"]
[connection signal="gui_input" from="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker" to="." method="_on_ColorPicker_gui_input"]
[connection signal="pressed" from="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker/Button" to="." method="_on_Button_pressed"]

View File

@ -1,147 +0,0 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_enum_array.gd" type="Script" id=1]
[ext_resource path="res://addons/resources_speadsheet_view/editor_icon_button.gd" type="Script" id=2]
[sub_resource type="Image" id=3]
data = {
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"format": "LumAlpha8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id=2]
flags = 4
flags = 4
image = SubResource( 3 )
size = Vector2( 16, 16 )
[node name="EditEnumArray" type="VBoxContainer"]
anchor_right = 1.0
margin_bottom = 62.0
rect_pivot_offset = Vector2( -460, -28 )
mouse_filter = 0
script = ExtResource( 1 )
[node name="Header" type="HBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 14.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
margin_right = 110.0
margin_bottom = 14.0
text = "EDIT: Enum Array"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
margin_left = 114.0
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
margin_left = 459.0
margin_right = 565.0
margin_bottom = 14.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
margin_left = 569.0
margin_right = 1024.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HSplitContainer" parent="."]
margin_top = 18.0
margin_right = 1024.0
margin_bottom = 40.0
split_offset = 64
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer"]
margin_right = 363.0
margin_bottom = 22.0
alignment = 2
[node name="Panel" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
margin_right = 192.0
margin_bottom = 22.0
size_flags_horizontal = 3
[node name="Label" type="TextEdit" parent="HBoxContainer/HBoxContainer/Panel"]
margin_right = 192.0
margin_bottom = 22.0
rect_min_size = Vector2( 128, 0 )
size_flags_vertical = 5
text = "[]"
readonly = true
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
margin_left = 196.0
margin_right = 200.0
margin_bottom = 22.0
[node name="Control" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
margin_left = 204.0
margin_right = 355.0
margin_bottom = 22.0
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/HBoxContainer/Control"]
margin_right = 151.0
margin_bottom = 22.0
[node name="Remove" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
margin_right = 151.0
margin_bottom = 22.0
hint_tooltip = "Erase Value from Array"
text = "Remove Last Value"
icon = SubResource( 2 )
script = ExtResource( 2 )
icon_name = "Remove"
[node name="VSeparator" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
margin_left = 359.0
margin_right = 363.0
margin_bottom = 22.0
[node name="Control2" type="MarginContainer" parent="HBoxContainer"]
margin_left = 375.0
margin_right = 1024.0
margin_bottom = 22.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Control2"]
margin_right = 649.0
margin_bottom = 22.0
alignment = 2
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/Control2/HBoxContainer"]
margin_right = 4.0
margin_bottom = 22.0
[node name="HFlowContainer" type="HFlowContainer" parent="HBoxContainer/Control2/HBoxContainer"]
margin_left = 8.0
margin_right = 649.0
margin_bottom = 22.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
margin_top = 3.0
margin_right = 55.0
margin_bottom = 17.0
text = "Options:"
[node name="OptionButton" type="OptionButton" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
margin_left = 59.0
margin_right = 113.0
margin_bottom = 20.0
text = "Add"
items = [ "Add", null, false, 0, null, "Erase", null, false, 1, null ]
selected = 0
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/Remove" to="." method="_on_Remove_pressed"]

View File

@ -1,108 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_texture.gd" type="Script" id=1]
[ext_resource path="res://icon.png" type="Texture" id=2]
[node name="EditTexture" type="VBoxContainer"]
anchor_right = 1.0
margin_bottom = 86.0
rect_pivot_offset = Vector2( -460, -28 )
mouse_filter = 0
script = ExtResource( 1 )
[node name="Header" type="HBoxContainer" parent="."]
margin_right = 1024.0
margin_bottom = 14.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
margin_right = 85.0
margin_bottom = 14.0
text = "EDIT: Texture"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
margin_left = 89.0
margin_right = 455.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
margin_left = 459.0
margin_right = 565.0
margin_bottom = 14.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
margin_left = 569.0
margin_right = 1024.0
margin_bottom = 14.0
size_flags_horizontal = 3
[node name="CenterContainer" type="CenterContainer" parent="."]
margin_top = 18.0
margin_right = 1024.0
margin_bottom = 84.0
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer"]
margin_left = 384.0
margin_right = 640.0
margin_bottom = 66.0
alignment = 1
[node name="TextureRect" type="TextureRect" parent="CenterContainer/HBoxContainer"]
margin_right = 48.0
margin_bottom = 66.0
rect_min_size = Vector2( 48, 48 )
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource( 2 )
expand = true
stretch_mode = 6
[node name="VSeparator" type="VSeparator" parent="CenterContainer/HBoxContainer"]
margin_left = 52.0
margin_right = 56.0
margin_bottom = 66.0
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/HBoxContainer"]
margin_left = 60.0
margin_right = 256.0
margin_bottom = 66.0
[node name="Label" type="Label" parent="CenterContainer/HBoxContainer/VBoxContainer"]
margin_right = 196.0
margin_bottom = 14.0
text = "Atlas Chopper"
align = 1
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/HBoxContainer/VBoxContainer"]
margin_top = 18.0
margin_right = 196.0
margin_bottom = 42.0
[node name="LineEdit" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
margin_right = 96.0
margin_bottom = 24.0
rect_min_size = Vector2( 96, 0 )
size_flags_horizontal = 3
placeholder_text = "H Count"
[node name="LineEdit2" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
margin_left = 100.0
margin_right = 196.0
margin_bottom = 24.0
rect_min_size = Vector2( 96, 0 )
size_flags_horizontal = 3
placeholder_text = "V Count"
[node name="Button" type="Button" parent="CenterContainer/HBoxContainer/VBoxContainer"]
margin_top = 46.0
margin_right = 196.0
margin_bottom = 66.0
text = "Chop chop chop!!!"
[connection signal="pressed" from="CenterContainer/HBoxContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"]

View File

@ -0,0 +1,7 @@
@tool
class_name ThemeColorSetter
extends Control
func _ready():
modulate = get_theme_color("accent_color", "Editor")

View File

@ -0,0 +1,12 @@
@tool
class_name ThemeIconButton
extends Button
@export var icon_name := "Node" :
set(v):
icon_name = v
icon = get_theme_icon(v, "EditorIcons")
func _ready():
self.icon_name = (icon_name)

View File

@ -0,0 +1,21 @@
@tool
class_name ThemeStylebox
extends Control
@export var box_class := "EditorStyles"
@export var box_name := "Background"
func _ready():
_set_box_name(box_name)
_set_box_class(box_class)
func _set_box_name(v):
box_name = v
add_theme_stylebox_override(box_name, get_theme_stylebox(box_name, box_class))
func _set_box_class(v):
box_class = v
add_theme_stylebox_override(box_name, get_theme_stylebox(box_name, box_class))

View File

@ -1,19 +1,18 @@
tool
@tool
extends Control
signal grid_updated()
export var table_header_scene : PackedScene
@export var table_header_scene : PackedScene
@export var cell_editor_classes : Array[Script] = []
export(Array, Script) var cell_editor_classes := []
export var path_folder_path := NodePath("")
export var path_recent_paths := NodePath("")
export var path_table_root := NodePath("")
export var path_property_editors := NodePath("")
export var path_columns := NodePath("")
export var path_hide_columns_button := NodePath("")
export var path_page_manager := NodePath("")
@export @onready var node_folder_path : LineEdit = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path"
@export @onready var node_recent_paths : OptionButton = $"HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths"
@export @onready var node_table_root : GridContainer = $"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid"
@export @onready var node_property_editors : VBoxContainer = $"HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors"
@export @onready var node_columns : HBoxContainer = $"HeaderContentSplit/VBoxContainer/Columns/Columns"
@export @onready var node_hide_columns_button : BaseButton = $"HeaderContentSplit/VBoxContainer/MenuStrip/VisibleCols"
@export @onready var node_page_manager : Control = $"HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages"
var editor_interface : EditorInterface
var editor_plugin : EditorPlugin
@ -39,7 +38,8 @@ var edited_cells := []
var edited_cells_text := []
var edit_cursor_positions := []
var inspector_resource : Resource
var search_cond : Reference
var search_cond : RefCounted
var my_undo_redo : UndoRedo
var hidden_columns := {}
var first_row := 0
@ -47,33 +47,28 @@ var last_row := 0
func _ready():
get_node(path_recent_paths).clear()
editor_interface.get_resource_filesystem()\
.connect("filesystem_changed", self, "_on_filesystem_changed")
editor_interface.get_inspector()\
.connect("property_edited", self, "_on_inspector_property_edited")
get_node(path_hide_columns_button).get_popup()\
.connect("id_pressed", self, "_on_VisibleCols_id_pressed")
node_recent_paths.clear()
my_undo_redo = editor_plugin.get_undo_redo().get_history_undo_redo(editor_plugin.get_undo_redo().get_object_history_id(self))
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)
# Load saved recent paths
var file := File.new()
if file.file_exists(save_data_path):
file.open(save_data_path, File.READ)
if FileAccess.file_exists(save_data_path):
var file = FileAccess.open(save_data_path, FileAccess.READ)
var as_text = file.get_as_text()
var as_var = str2var(as_text)
var as_var = JSON.parse_string(as_text)
for x in as_var["recent_paths"]:
add_path_to_recent(x, true)
hidden_columns = as_var["hidden_columns"]
hidden_columns = as_var.get("hidden_columns", {})
# Load cell editors and instantiate them
for x in cell_editor_classes:
all_cell_editors.append(x.new())
all_cell_editors[all_cell_editors.size() - 1].hint_strings_array = column_hint_strings
display_folder(recent_paths[0], "resource_name", false, true)
func _on_filesystem_changed():
var path = editor_interface.get_resource_filesystem().get_filesystem_path(current_path)
@ -98,25 +93,25 @@ func display_folder(folderpath : String, sort_by : String = "", sort_reverse : b
folderpath += "/"
if search_cond == null:
_on_SearchCond_text_entered("true")
_on_search_cond_text_submitted("true")
first_row = get_node(path_page_manager).first_row
last_row = min(get_node(path_page_manager).last_row, rows.size())
first_row = node_page_manager.first_row
last_row = min(node_page_manager.last_row, rows.size())
_load_resources_from_folder(folderpath, sort_by, sort_reverse)
if columns.size() == 0: return
get_node(path_folder_path).text = folderpath
node_folder_path.text = folderpath
_create_table(
force_rebuild
or current_path != folderpath
or columns.size() != get_node(path_columns).get_child_count()
or columns.size() != node_columns.get_child_count()
)
current_path = folderpath
_update_hidden_columns()
_update_column_sizes()
yield(get_tree(), "idle_frame")
if get_node(path_table_root).get_child_count() == 0:
await get_tree().process_frame
if node_table_root.get_child_count() == 0:
display_folder(folderpath, sort_by, sort_reverse, force_rebuild)
else:
@ -128,8 +123,7 @@ func refresh(force_rebuild : bool = true):
func _load_resources_from_folder(folderpath : String, sort_by : String, sort_reverse : bool):
var dir := Directory.new()
dir.open(folderpath)
var dir = DirAccess.open(folderpath)
dir.list_dir_begin()
rows.clear()
@ -193,7 +187,7 @@ func _compare_values(a, b) -> bool:
if a is Resource:
return a.resource_path > b.resource_path
if a is Array or a is PoolStringArray or a is PoolRealArray or a is PoolIntArray:
if a is Array:
return a.size() > b.size()
return a > b
@ -206,32 +200,36 @@ func _set_sorting(sort_by):
sorting_by = sort_by
func _select_column(column_name):
deselect_all_cells()
select_cell(node_table_root.get_child(columns.find(column_name)))
select_cells_to(node_table_root.get_child(columns.find(column_name) + columns.size() * (rows.size() - 1)))
func _create_table(columns_changed : bool):
var root_node = get_node(path_table_root)
var headers_node = get_node(path_columns)
deselect_all_cells()
edited_cells = []
edited_cells_text = []
edit_cursor_positions = []
var new_node : Control
if columns_changed:
root_node.columns = columns.size()
for x in root_node.get_children():
node_table_root.columns = columns.size()
for x in node_table_root.get_children():
x.free()
for x in headers_node.get_children():
for x in node_columns.get_children():
x.queue_free()
for x in columns:
new_node = table_header_scene.instance()
headers_node.add_child(new_node)
new_node = table_header_scene.instantiate()
node_columns.add_child(new_node)
new_node.editor_view = self
new_node.set_label(x)
new_node.get_node("Button").connect("pressed", self, "_set_sorting", [x])
new_node.get_node("Button").pressed.connect(_set_sorting.bind(x))
var to_free = root_node.get_child_count() - (last_row - first_row) * columns.size()
var to_free = node_table_root.get_child_count() - (last_row - first_row) * columns.size()
while to_free > 0:
root_node.get_child(0).free()
node_table_root.get_child(0).free()
to_free -= 1
var color_rows = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "color_rows")
@ -249,51 +247,53 @@ func _update_row_range(first : int, last : int, color_rows : bool):
func _update_column_sizes():
yield(get_tree(), "idle_frame")
var table_root := get_node(path_table_root)
var column_headers := get_node(path_columns).get_children()
if table_root.get_child_count() < column_headers.size(): return
if node_table_root.get_child_count() == 0:
return
await get_tree().process_frame
var column_headers := node_columns.get_children()
if node_table_root.get_child_count() < column_headers.size(): return
if column_headers.size() != columns.size():
refresh()
return
var clip_text : bool = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "clip_headers")
var min_width := 0
var cell : Control
get_node(path_columns).get_parent().rect_min_size.y = column_headers[0].rect_size.y
node_columns.get_parent().custom_minimum_size.y = column_headers[0].size.y
for i in column_headers.size():
cell = table_root.get_child(i)
cell = node_table_root.get_child(i)
column_headers[i].get_child(0).clip_text = clip_text
column_headers[i].rect_min_size.x = 0
cell.rect_min_size.x = 0
column_headers[i].rect_size.x = 0
column_headers[i].custom_minimum_size.x = 0
cell.custom_minimum_size.x = 0
column_headers[i].size.x = 0
node_columns.queue_sort()
min_width = max(column_headers[i].rect_size.x, cell.rect_size.x)
column_headers[i].rect_min_size.x = min_width
cell.rect_min_size.x = column_headers[i].get_minimum_size().x
column_headers[i].rect_size.x = min_width
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
yield(get_tree(), "idle_frame")
await get_tree().process_frame
for i in column_headers.size():
column_headers[i].rect_position.x = table_root.get_child(i).rect_position.x
column_headers[i].position.x = node_table_root.get_child(i).position.x
func _update_row(row_index : int, color_rows : bool = true):
var root_node = get_node(path_table_root)
var current_node : Control
var next_color := Color.white
var next_color := Color.WHITE
for i in columns.size():
if root_node.get_child_count() <= (row_index - first_row) * columns.size() + i:
if node_table_root.get_child_count() <= (row_index - first_row) * columns.size() + i:
current_node = column_editors[i].create_cell(self)
current_node.connect("gui_input", self, "_on_cell_gui_input", [current_node])
root_node.add_child(current_node)
current_node.gui_input.connect(_on_cell_gui_input.bind(current_node))
node_table_root.add_child(current_node)
else:
current_node = root_node.get_child((row_index - first_row) * columns.size() + i)
current_node.hint_tooltip = (
current_node = node_table_root.get_child((row_index - first_row) * columns.size() + i)
current_node.tooltip_text = (
TextEditingUtils.string_snake_to_naming_case(columns[i])
+ "\n---\n"
+ "Of " + rows[row_index].resource_path.get_file().get_basename()
@ -314,12 +314,11 @@ func _update_hidden_columns():
hidden_columns[current_path] = {}
return
var node_table_root = get_node(path_table_root)
var visible_column_count = 0
for i in columns.size():
var column_visible = !hidden_columns[current_path].has(columns[i])
get_node(path_columns).get_child(i).visible = column_visible
node_columns.get_child(i).visible = column_visible
for j in last_row - first_row:
node_table_root.get_child(j * columns.size() + i).visible = column_visible
@ -332,38 +331,36 @@ func _update_hidden_columns():
func add_path_to_recent(path : String, is_loading : bool = false):
if path in recent_paths: return
var node_recent := get_node(path_recent_paths)
var idx_in_array := recent_paths.find(path)
if idx_in_array != -1:
node_recent.remove_item(idx_in_array)
recent_paths.remove(idx_in_array)
node_recent_paths.remove_item(idx_in_array)
recent_paths.remove_at(idx_in_array)
recent_paths.append(path)
node_recent.add_item(path)
node_recent.select(node_recent.get_item_count() - 1)
node_recent_paths.add_item(path)
node_recent_paths.select(node_recent_paths.get_item_count() - 1)
if !is_loading:
save_data()
func remove_selected_path_from_recent():
if get_node(path_recent_paths).get_item_count() == 0:
if node_recent_paths.get_item_count() == 0:
return
var idx_in_array = get_node(path_recent_paths).selected
recent_paths.remove(idx_in_array)
get_node(path_recent_paths).remove_item(idx_in_array)
var idx_in_array = node_recent_paths.selected
recent_paths.remove_at(idx_in_array)
node_recent_paths.remove_item(idx_in_array)
if get_node(path_recent_paths).get_item_count() != 0:
get_node(path_recent_paths).select(0)
if node_recent_paths.get_item_count() != 0:
node_recent_paths.select(0)
display_folder(recent_paths[0])
save_data()
func save_data():
var file = File.new()
file.open(save_data_path, File.WRITE)
file.store_string(var2str(
var file = FileAccess.open(save_data_path, FileAccess.WRITE)
file.store_string(str(
{
"recent_paths" : recent_paths,
"hidden_columns" : hidden_columns,
@ -371,7 +368,7 @@ func save_data():
))
func _on_Path_text_entered(new_text : String = ""):
func _on_path_text_submitted(new_text : String = ""):
if new_text != "":
current_path = new_text
add_path_to_recent(new_text)
@ -383,12 +380,12 @@ func _on_Path_text_entered(new_text : String = ""):
func _on_RecentPaths_item_selected(index : int):
current_path = recent_paths[index]
get_node(path_folder_path).text = recent_paths[index]
node_folder_path.text = recent_paths[index]
display_folder(current_path)
func _on_FileDialog_dir_selected(dir : String):
get_node(path_folder_path).text = dir
node_folder_path.text = dir
add_path_to_recent(dir)
display_folder(dir)
@ -407,10 +404,10 @@ func deselect_cell(cell : Control):
if idx == -1: return
column_editors[_get_cell_column(cell)].set_selected(cell, false)
edited_cells.remove(idx)
edited_cells.remove_at(idx)
if edited_cells_text.size() != 0:
edited_cells_text.remove(idx)
edit_cursor_positions.remove(idx)
edited_cells_text.remove_at(idx)
edit_cursor_positions.remove_at(idx)
func select_cell(cell : Control):
@ -418,7 +415,8 @@ func select_cell(cell : Control):
if _can_select_cell(cell):
_add_cell_to_selection(cell)
_try_open_docks(cell)
inspector_resource = rows[_get_cell_row(cell)].duplicate()
# inspector_resource = rows[_get_cell_row(cell)].duplicate() #
inspector_resource = rows[_get_cell_row(cell)]
editor_plugin.get_editor_interface().edit_resource(inspector_resource)
@ -432,10 +430,9 @@ func select_cells_to(cell : Control):
var edge_shift = -1 if row_start > row_end else 1
row_start += edge_shift
row_end += edge_shift
var table_root := get_node(path_table_root)
for i in range(row_start, row_end, edge_shift):
var cur_cell := table_root.get_child(i * columns.size() + column_index)
var cur_cell := node_table_root.get_child(i * columns.size() + column_index)
if !cur_cell.visible:
# When search is active, some cells will be hidden.
continue
@ -450,8 +447,8 @@ func select_cells_to(cell : Control):
func select_column(column_index : int):
deselect_all_cells()
select_cell(get_node(path_table_root).get_child(column_index))
select_cells_to(get_node(path_table_root).get_child(column_index + columns.size() * (last_row - first_row - 1)))
select_cell(node_table_root.get_child(column_index))
select_cells_to(node_table_root.get_child(column_index + columns.size() * (last_row - first_row - 1)))
func hide_column(column_index : int):
@ -475,7 +472,7 @@ func _add_cell_to_selection(cell : Control):
func _try_open_docks(cell : Control):
var column_index = _get_cell_column(cell)
for x in get_node(path_property_editors).get_children():
for x in node_property_editors.get_children():
x.visible = x.try_edit_value(
rows[_get_cell_row(cell)].get(columns[column_index]),
column_types[column_index],
@ -515,7 +512,7 @@ func set_edited_cells_values(new_cell_values : Array):
)
editor_plugin.undo_redo.commit_action()
editor_interface.get_resource_filesystem().scan()
undo_redo_version = editor_plugin.undo_redo.get_version()
undo_redo_version = my_undo_redo.get_version()
_update_column_sizes()
@ -546,7 +543,7 @@ func _can_select_cell(cell : Control) -> bool:
if edited_cells.size() == 0:
return true
if !Input.is_key_pressed(KEY_CONTROL):
if !Input.is_key_pressed(KEY_CTRL):
return false
if (
@ -559,26 +556,26 @@ func _can_select_cell(cell : Control) -> bool:
func _get_cell_column(cell) -> int:
return cell.get_position_in_parent() % columns.size()
return cell.get_index() % columns.size()
func _get_cell_row(cell) -> int:
return cell.get_position_in_parent() / columns.size() + first_row
return cell.get_index() / columns.size() + first_row
func _update_scroll():
get_node(path_columns).rect_position.x = -get_node(path_table_root).get_node("../..").scroll_horizontal
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 != BUTTON_LEFT:
if event.button_index != MOUSE_BUTTON_LEFT:
return
grab_focus()
if event.pressed:
if Input.is_key_pressed(KEY_CONTROL):
if Input.is_key_pressed(KEY_CTRL):
if cell in edited_cells:
deselect_cell(cell)
@ -596,7 +593,7 @@ func _on_cell_gui_input(event : InputEvent, cell : Control):
func _gui_input(event : InputEvent):
if event is InputEventMouseButton:
_update_scroll()
if event.button_index != BUTTON_LEFT:
if event.button_index != MOUSE_BUTTON_LEFT:
return
grab_focus()
@ -611,74 +608,76 @@ func _input(event : InputEvent):
if !has_focus() or edited_cells.size() == 0:
return
if event.scancode == KEY_CONTROL or event.scancode == KEY_SHIFT:
if event.keycode == KEY_CTRL or event.keycode == KEY_SHIFT:
# Modifier keys do not get processed.
return
# Ctrl + Z (before, and instead of, committing the action!)
if Input.is_key_pressed(KEY_CONTROL) and event.scancode == KEY_Z:
if Input.is_key_pressed(KEY_CTRL) and event.keycode == KEY_Z:
if Input.is_key_pressed(KEY_SHIFT):
editor_plugin.undo_redo.redo()
my_undo_redo.redo()
# Ctrl + z
else:
editor_plugin.undo_redo.undo()
my_undo_redo.undo()
return
# This shortcut is used by Godot as well.
if Input.is_key_pressed(KEY_CONTROL) and event.scancode == KEY_Y:
editor_plugin.undo_redo.redo()
if Input.is_key_pressed(KEY_CTRL) and event.keycode == KEY_Y:
my_undo_redo.redo()
return
_key_specific_action(event)
grab_focus()
editor_interface.get_resource_filesystem().scan()
undo_redo_version = editor_plugin.undo_redo.get_version()
undo_redo_version = my_undo_redo.get_version()
func _key_specific_action(event : InputEvent):
var column = _get_cell_column(edited_cells[0])
var ctrl_pressed := Input.is_key_pressed(KEY_CONTROL)
if ctrl_pressed:
editor_plugin.hide_bottom_panel()
var ctrl_pressed := Input.is_key_pressed(KEY_CTRL)
# BETWEEN-CELL NAVIGATION
if event.keycode == KEY_UP:
_move_selection_on_grid(0, (-1 if !ctrl_pressed else -10))
elif event.keycode == KEY_DOWN:
_move_selection_on_grid(0, (1 if !ctrl_pressed else 10))
elif Input.is_key_pressed(KEY_SHIFT) and event.keycode == KEY_TAB:
_move_selection_on_grid((-1 if !ctrl_pressed else -10), 0)
elif event.keycode == KEY_TAB:
_move_selection_on_grid((1 if !ctrl_pressed else 10), 0)
# Non-text and paths can't be edited.
if columns[column] == "resource_path":
return
if !column_editors[column].is_text():
return
# CURSOR MOVEMENT
if event.scancode == KEY_LEFT:
if event.keycode == KEY_LEFT:
TextEditingUtils.multi_move_left(
edited_cells_text, edit_cursor_positions, Input.is_key_pressed(KEY_CONTROL)
edited_cells_text, edit_cursor_positions, ctrl_pressed
)
elif event.scancode == KEY_RIGHT:
elif event.keycode == KEY_RIGHT:
TextEditingUtils.multi_move_right(
edited_cells_text, edit_cursor_positions, Input.is_key_pressed(KEY_CONTROL)
edited_cells_text, edit_cursor_positions, ctrl_pressed
)
elif event.scancode == KEY_HOME:
elif event.keycode == KEY_HOME:
for i in edit_cursor_positions.size():
edit_cursor_positions[i] = 0
elif event.scancode == KEY_END:
elif event.keycode == KEY_END:
for i in edit_cursor_positions.size():
edit_cursor_positions[i] = edited_cells_text[i].length()
# BETWEEN-CELL NAVIGATION
elif event.scancode == KEY_UP:
_move_selection_on_grid(0, (-1 if !ctrl_pressed else -10))
elif event.scancode == KEY_DOWN:
_move_selection_on_grid(0, (1 if !ctrl_pressed else 10))
elif Input.is_key_pressed(KEY_SHIFT) and event.scancode == KEY_TAB:
_move_selection_on_grid((-1 if !ctrl_pressed else -10), 0)
get_tree().set_input_as_handled()
elif event.scancode == KEY_TAB:
_move_selection_on_grid((1 if !ctrl_pressed else 10), 0)
get_tree().set_input_as_handled()
# Ctrl + C (so you can edit in a proper text editor instead of this wacky nonsense)
elif ctrl_pressed and event.scancode == KEY_C:
elif ctrl_pressed and event.keycode == KEY_C:
TextEditingUtils.multi_copy(edited_cells_text)
# The following actions do not work on non-editable cells.
@ -686,25 +685,26 @@ func _key_specific_action(event : InputEvent):
return
# Ctrl + V
elif ctrl_pressed and event.scancode == KEY_V:
elif ctrl_pressed and event.keycode == KEY_V:
set_edited_cells_values(TextEditingUtils.multi_paste(
edited_cells_text, edit_cursor_positions
))
# ERASING
elif event.scancode == KEY_BACKSPACE:
elif event.keycode == KEY_BACKSPACE:
set_edited_cells_values(TextEditingUtils.multi_erase_left(
edited_cells_text, edit_cursor_positions, Input.is_key_pressed(KEY_CONTROL)
edited_cells_text, edit_cursor_positions, ctrl_pressed
))
elif event.scancode == KEY_DELETE:
elif event.keycode == KEY_DELETE:
set_edited_cells_values(TextEditingUtils.multi_erase_right(
edited_cells_text, edit_cursor_positions, Input.is_key_pressed(KEY_CONTROL)
edited_cells_text, edit_cursor_positions, ctrl_pressed
))
get_tree().set_input_as_handled() # Because this is one dangerous action.
get_viewport().set_input_as_handled() # Because this is one dangerous action
# And finally, text typing.
elif event.scancode == KEY_ENTER:
elif event.keycode == KEY_ENTER:
set_edited_cells_values(TextEditingUtils.multi_input(
"\n", edited_cells_text, edit_cursor_positions
))
@ -716,24 +716,29 @@ func _key_specific_action(event : InputEvent):
func _move_selection_on_grid(move_h : int, move_v : int):
var cell = edited_cells[0]
grab_focus()
deselect_all_cells()
select_cell(
get_node(path_table_root).get_child(
edited_cells[0].get_position_in_parent()
node_table_root.get_child(
cell.get_index()
+ move_h + move_v * columns.size()
)
)
deselect_cell(edited_cells[0])
func _update_resources(update_rows : Array, update_cells : Array, update_column : int, values : Array):
for i in update_rows.size():
column_editors[update_column].set_value(update_cells[i], values[i])
values[i] = _try_convert(values[i], column_types[update_column])
if values[i] is String:
values[i] = _try_convert(values[i], column_types[update_column])
if values[i] == null:
continue
update_rows[i].set(columns[update_column], convert(values[i], column_types[update_column]))
ResourceSaver.save(update_rows[i].resource_path, update_rows[i])
update_rows[i].set(columns[update_column], values[i])
ResourceSaver.save(update_rows[i])
if column_types[update_column] == TYPE_COLOR:
for j in columns.size() - update_column:
if j != 0 and column_types[j + update_column] == TYPE_COLOR:
@ -767,7 +772,7 @@ func _get_edited_cells_resources() -> Array:
return arr
func _on_SearchCond_text_entered(new_text : String):
func _on_search_cond_text_submitted(new_text : String):
var new_script := GDScript.new()
new_script.source_code = "static func can_show(res, index):\n\treturn " + new_text
new_script.reload()
@ -777,7 +782,7 @@ func _on_SearchCond_text_entered(new_text : String):
refresh()
func _on_ProcessExpr_text_entered(new_text : String):
func _on_process_expr_text_submitted(new_text : String):
if new_text == "":
new_text = "true"
@ -799,7 +804,8 @@ func _on_ProcessExpr_text_entered(new_text : String):
func _on_inspector_property_edited(property : String):
if !visible: return
if inspector_resource == null: return
if undo_redo_version > editor_plugin.undo_redo.get_version(): return
undo_redo_version = my_undo_redo.get_version()
var value = inspector_resource.get(property)
var values = []
@ -815,14 +821,24 @@ func _on_inspector_property_edited(property : String):
var index := 0
for i in previously_edited.size():
index = _get_cell_row(previously_edited[i]) * columns.size() + new_column
_add_cell_to_selection(get_node(path_table_root).get_child(index - first_row))
_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])
func _on_VisibleCols_about_to_show():
var popup = get_node(path_hide_columns_button).get_popup()
func _on_File_pressed():
node_folder_path.get_parent().get_parent().visible = !node_folder_path.get_parent().get_parent().visible
func _on_SearchProcess_pressed():
$"HeaderContentSplit/VBoxContainer/Search".visible = !$"HeaderContentSplit/VBoxContainer/Search".visible
func _on_visible_cols_about_to_popup():
var popup = node_hide_columns_button.get_popup()
popup.clear()
popup.hide_on_checkable_item_selection = false
@ -831,8 +847,8 @@ func _on_VisibleCols_about_to_show():
popup.set_item_checked(i, hidden_columns[current_path].has(columns[i]))
func _on_VisibleCols_id_pressed(id : int):
var popup = get_node(path_hide_columns_button).get_popup()
func _on_visible_cols_id_pressed(id : int):
var popup = node_hide_columns_button.get_popup()
if popup.is_item_checked(id):
popup.set_item_checked(id, false)
hidden_columns[current_path].erase(columns[id])

View File

@ -0,0 +1,830 @@
[gd_scene load_steps=23 format=3 uid="uid://dpdgrocww8a51"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_view.gd" id="1"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_string.gd" id="2"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_color.gd" id="3"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="4"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_bool.gd" id="5"]
[ext_resource type="PackedScene" uid="uid://bya5ugi40ptxl" path="res://addons/resources_spreadsheet_view/table_header.tscn" id="6"]
[ext_resource type="PackedScene" uid="uid://b3a3bo6cfyh5t" path="res://addons/resources_spreadsheet_view/typed_editors/dock_color.tscn" id="7"]
[ext_resource type="PackedScene" path="res://addons/resources_spreadsheet_view/typed_editors/dock_number.tscn" id="8"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_enum_array.gd" id="8_2kaah"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_resource.gd" id="9"]
[ext_resource type="PackedScene" uid="uid://rww3gpl052bn" path="res://addons/resources_spreadsheet_view/typed_editors/dock_texture.tscn" id="10"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_color_setter.gd" id="10_b87c7"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_array.gd" id="11"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/table_pages.gd" id="11_5gh4r"]
[ext_resource type="PackedScene" uid="uid://c3a2cip8ffccv" path="res://addons/resources_spreadsheet_view/typed_editors/dock_array.tscn" id="12"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_cells/cell_editor_enum.gd" id="13"]
[ext_resource type="PackedScene" uid="uid://ddqak780cwwfj" path="res://addons/resources_spreadsheet_view/typed_editors/dock_enum_array.tscn" id="13_7nia1"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/settings_grid.gd" id="14"]
[sub_resource type="Gradient" id="Gradient_8kp6w"]
offsets = PackedFloat32Array(0, 0.995413, 1)
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"]
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",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_wgkau"]
image = SubResource("Image_1jisk")
[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
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath(".")
focus_neighbor_bottom = NodePath(".")
focus_next = NodePath(".")
focus_previous = NodePath(".")
focus_mode = 2
theme_override_constants/margin_left = 3
theme_override_constants/margin_right = 3
theme_override_constants/margin_bottom = 5
script = ExtResource("1")
table_header_scene = ExtResource("6")
cell_editor_classes = [ExtResource("8_2kaah"), ExtResource("11"), ExtResource("5"), ExtResource("3"), ExtResource("13"), ExtResource("9"), ExtResource("2")]
node_folder_path = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path")
node_recent_paths = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths")
node_table_root = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer/TableGrid")
node_property_editors = NodePath("HeaderContentSplit/MarginContainer/FooterContentSplit/Footer/PropertyEditors")
node_columns = NodePath("HeaderContentSplit/VBoxContainer/Columns/Columns")
node_hide_columns_button = NodePath("HeaderContentSplit/VBoxContainer/MenuStrip/VisibleCols")
node_page_manager = NodePath("HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages")
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
button_pressed = true
text = "File"
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
text = "Filter/Process"
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"
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)
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"]
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 48.0
grow_horizontal = 0
grow_vertical = 2
texture = SubResource("GradientTexture2D_18il8")
ignore_texture_size = true
[node name="ColorRect3" type="Control" parent="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2i(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")
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")
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
[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)
layout_mode = 2
offset_right = 6.0
offset_bottom = 26.0
size_flags_vertical = 5
script = ExtResource("10_b87c7")
[node name="TextureRect" type="TextureRect" parent="HeaderContentSplit/VBoxContainer/Search/HBoxContainer/ColorRect4"]
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 48.0
grow_horizontal = 0
grow_vertical = 2
texture = SubResource("GradientTexture2D_18il8")
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)
layout_mode = 2
offset_right = 6.0
offset_bottom = 31.0
size_flags_vertical = 5
script = ExtResource("10_b87c7")
[node name="TextureRect" type="TextureRect" parent="HeaderContentSplit/VBoxContainer/Search/Search/ColorRect2"]
layout_mode = 1
anchors_preset = 11
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 48.0
grow_horizontal = 0
grow_vertical = 2
texture = SubResource("GradientTexture2D_18il8")
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.
Try out these:
- (res.number_property > 0 and res.number_property < 100)
- (res.text_property != \\\"\\\")
- (\\\"a\\\" in res.text_property)
- (index < 5)"
mouse_filter = 0
mouse_default_cursor_shape = 16
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
and `cell_index` to get the cell's selection order. Hit ENTER to run the search.
These are some valid expressions:
- (res.property1 + res.property2)
- (res.property1.replace(\\\"old_string\\\", \\\"new_string\\\"))
- (load(\\\"res://path/to_resource.tres\\\"))
Don't forget quotation marks on strings and str() on non-strings."
mouse_filter = 0
mouse_default_cursor_shape = 16
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")
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
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
[node name="MarginContainer" type="MarginContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll"]
layout_mode = 2
[node name="TableGrid" type="GridContainer" parent="HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Scroll/MarginContainer"]
layout_mode = 2
theme_override_constants/h_separation = 0
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!
Please select a folder to edit using the text field or Open button above.
Then, Shift+Click or Ctrl+Click cells to edit them using the keyboard,
Inspector dock or this screen's bottom panels.
To find out keybindings available, open the \"About\" menu."
horizontal_alignment = 1
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"]
title = "Open"
size = Vector2i(1168, 630)
popup_window = true
ok_button_text = "Select Current Folder"
mode_overrides_title = false
file_mode = 2
[node name="Control" type="Control" parent="Control/FileDialog"]
custom_minimum_size = Vector2i(1152, 573)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = 8.0
offset_bottom = -67.0
grow_horizontal = 2
grow_vertical = 2
auto_translate = false
mouse_filter = 2
[node name="Info" type="AcceptDialog" parent="Control"]
title = "About"
size = Vector2i(1000, 500)
popup_window = true
[node name="MarginContainer" type="MarginContainer" parent="Control/Info"]
custom_minimum_size = Vector2i(1000, 500)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = -144.0
offset_bottom = -140.0
grow_horizontal = 2
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
\"Welp, it is what it sounds like!\"
Possible inputs:
- Ctrl + Click / Cmd + Click - Select multiple cells in one column
- Shift + Click - Select all cells between A and B in one column
- Left/Right - Move cursor along cell text
- Backspace/Delete - Erase text Left / Right from cursor
- Home/End - Move cursor to start/end of cell
- Ctrl + <move/erase> / Cmd + <move/erase> - Move through / Erase whole word
- Ctrl/Cmd + C/V - Copy cells / Paste text into cells
- Ctrl/Cmd + (Shift) + Z - The Savior
If clipboard contains as many lines as there are cells selected, each line is pasted into a separate cell.
Made by Don Tnowe. 2022.
https://twitter.com/don_tnowe
Issues and contribution:
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
[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
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="Label4" type="Label" parent="Control/Settings/MarginContainer/RichTextLabel/GridContainer"]
layout_mode = 2
offset_top = 105.0
offset_right = 513.0
offset_bottom = 157.0
size_flags_horizontal = 3
text = "Clip header text (more compact view but header text wont be fully visible) (restart when switching)"
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"]
[connection signal="about_to_popup" from="HeaderContentSplit/VBoxContainer/MenuStrip/VisibleCols" to="." method="_on_visible_cols_about_to_popup"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/MenuStrip/Settings" to="Control/Settings" method="popup_centered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/MenuStrip/Info" to="Control/Info" method="popup_centered"]
[connection signal="text_submitted" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/Path" to="." method="_on_path_text_submitted"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/SelectDir" to="Control/FileDialog" method="popup_centered"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer/DeletePath" to="." method="remove_selected_path_from_recent"]
[connection signal="item_selected" from="HeaderContentSplit/VBoxContainer/HBoxContainer/HBoxContainer2/RecentPaths" to="." method="_on_RecentPaths_item_selected"]
[connection signal="text_submitted" from="HeaderContentSplit/VBoxContainer/Search/Search/SearchCond" to="." method="_on_search_cond_text_submitted"]
[connection signal="text_submitted" from="HeaderContentSplit/VBoxContainer/Search/Search/ProcessExpr" to="." method="_on_process_expr_text_submitted"]
[connection signal="pressed" from="HeaderContentSplit/VBoxContainer/HBoxContainer3/Refresh" to="." method="_on_path_text_submitted"]
[connection signal="value_changed" from="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages/LineEdit" to="HeaderContentSplit/VBoxContainer/HBoxContainer3/Pages" method="_on_LineEdit_value_changed"]
[connection signal="dir_selected" from="Control/FileDialog" to="." method="_on_FileDialog_dir_selected"]

View File

@ -5,5 +5,5 @@ description="Edit Many Resources from one Folder as a table.
Heavily inspired by Multi-Cursor-Editing in text editors, so after selecting multiple cells (in the same column!) using Ctrl+Click or Shift+Click, most Basic-to-Intermediate movements should be available."
author="Don Tnowe"
version="1.6"
version="2.1"
script="plugin.gd"

View File

@ -1,17 +1,17 @@
tool
@tool
extends EditorPlugin
var editor_view : Control
var undo_redo : UndoRedo
var undo_redo : EditorUndoRedoManager
func _enter_tree() -> void:
editor_view = load(get_script().resource_path.get_base_dir() + "/editor_view.tscn").instance()
editor_view = load(get_script().resource_path.get_base_dir() + "/editor_view.tscn").instantiate()
editor_view.editor_interface = get_editor_interface()
editor_view.editor_plugin = self
undo_redo = get_undo_redo()
get_editor_interface().get_editor_viewport().add_child(editor_view)
make_visible(false)
get_editor_interface().get_editor_main_screen().add_child(editor_view)
_make_visible(false)
func _exit_tree() -> void:
@ -19,21 +19,21 @@ func _exit_tree() -> void:
editor_view.queue_free()
func get_plugin_name():
func _get_plugin_name():
return "Sheets"
func make_visible(visible):
func _make_visible(visible):
if is_instance_valid(editor_view):
editor_view.visible = visible
if visible:
editor_view.display_folder(editor_view.current_path)
func has_main_screen():
func _has_main_screen():
return true
func get_plugin_icon():
func _get_plugin_icon():
# Until I add an actual icon, this'll do.
return get_editor_interface().get_base_control().get_icon("VisualScriptComment", "EditorIcons")
return get_editor_interface().get_base_control().get_theme_icon("GridContainer", "EditorIcons")

View File

@ -0,0 +1 @@
{ "recent_paths": ["res://example/Random Upgrades/upgrades", "res://example/Random Upgrades/upgrades/"], "hidden_columns": { "res://example/Random Upgrades/upgrades/": { "resource_name": true, "resource_local_to_scene": true, "list_item_delimeter": true, "list_row_delimeter": true } } }

View File

@ -0,0 +1,29 @@
@tool
class_name SettingsGrid
extends GridContainer
const SETTING_PREFIX = "addons/resources_spreadsheet_view/"
func _ready():
for x in get_children():
var setting = SETTING_PREFIX + TextEditingUtils.pascal_case_to_snake_case(x.name)
if x is BaseButton:
x.toggled.connect(_set_setting.bind(setting))
if !ProjectSettings.has_setting(setting):
_set_setting(x.button_pressed, setting)
else:
x.button_pressed = ProjectSettings.get_setting(setting)
elif x is Range:
x.value_changed.connect(_set_setting.bind(setting))
if !ProjectSettings.has_setting(setting):
_set_setting(x.value, setting)
else:
x.value = ProjectSettings.get_setting(setting)
func _set_setting(new_value, setting):
ProjectSettings.set_setting(setting, new_value)

View File

@ -1,4 +1,4 @@
tool
@tool
extends HBoxContainer
var editor_view : Control
@ -6,20 +6,20 @@ var editor_view : Control
func set_label(label : String):
$"Button".text = TextEditingUtils.string_snake_to_naming_case(label)
$"Button".hint_tooltip = label + "\nClick to sort."
$"Button".tooltip_text = label + "\nClick to sort."
func _ready():
$"Button".connect("gui_input", self, "_on_main_gui_input")
$"Button2".get_popup().connect("id_pressed", self, "_on_list_id_pressed")
$"Button".gui_input.connect(_on_main_gui_input)
$"Button2".get_popup().id_pressed.connect(_on_list_id_pressed)
func _on_main_gui_input(event):
if event is InputEventMouseButton and event.pressed:
var popup = $"Button2".get_popup()
if event.button_index == BUTTON_RIGHT:
if event.button_index == MOUSE_BUTTON_RIGHT:
popup.visible = !popup.visible
popup.rect_position = get_global_mouse_position()
popup.position = get_global_mouse_position()
else:
popup.visible = false
@ -27,7 +27,7 @@ func _on_main_gui_input(event):
func _on_list_id_pressed(id : int):
if id == 0:
editor_view.select_column(get_position_in_parent())
editor_view.select_column(get_index())
else:
editor_view.hide_column(get_position_in_parent())
editor_view.hide_column(get_index())

View File

@ -0,0 +1,49 @@
[gd_scene load_steps=5 format=3 uid="uid://bya5ugi40ptxl"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/table_header.gd" id="1_xhap0"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2_t08bs"]
[sub_resource type="Image" id="Image_1jisk"]
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",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_wgkau"]
image = SubResource("Image_1jisk")
[node name="Header" type="HBoxContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
script = ExtResource("1_xhap0")
[node name="Button" type="Button" parent="."]
layout_mode = 2
offset_right = 1124.0
offset_bottom = 31.0
size_flags_horizontal = 3
size_flags_vertical = 0
text = "resource_name"
clip_text = true
[node name="Button2" type="MenuButton" parent="."]
layout_mode = 2
offset_left = 1128.0
offset_right = 1152.0
offset_bottom = 648.0
size_flags_horizontal = 9
icon = SubResource("ImageTexture_wgkau")
item_count = 2
popup/item_0/text = "Select All"
popup/item_0/id = 0
popup/item_1/text = "Hide"
popup/item_1/id = 1
script = ExtResource("2_t08bs")
icon_name = "ArrowDown"

View File

@ -1,25 +1,28 @@
tool
@tool
extends HBoxContainer
export var path_editor_view_root := NodePath("")
@export @onready var node_editor_view_root : Control = $"../../../.."
# These can not be set externally.
var rows_per_page := 50 setget _set_none
var current_page := 0 setget _set_none
var first_row := 0 setget _set_none
var last_row := 50 setget _set_none
var rows_per_page := 50:
set(v): pass
var current_page := 0:
set(v): pass
var first_row := 0:
set(v): pass
var last_row := 50:
set(v): pass
func _set_none(v): pass
func _on_Control_grid_updated():
var root = get_node(path_editor_view_root)
func _on_grid_updated():
visible = true
var page_count = (root.rows.size() - 1) / rows_per_page + 1
var page_count = (node_editor_view_root.rows.size() - 1) / rows_per_page + 1
first_row = min(current_page, page_count) * rows_per_page
last_row = min(first_row + rows_per_page, root.rows.size())
last_row = min(first_row + rows_per_page, node_editor_view_root.rows.size())
var pagelist_node = $"Pagelist"
for x in pagelist_node.get_children():
@ -32,22 +35,22 @@ func _on_Control_grid_updated():
var btn = Button.new()
btns[i] = btn
btn.toggle_mode = true
btn.group = button_group
btn.button_group = button_group
btn.text = str(i + 1)
btn.connect("pressed", self, "_on_button_pressed", [btn])
btn.pressed.connect(_on_button_pressed.bind(btn))
pagelist_node.add_child(btn)
btns[current_page].pressed = true
btns[current_page].button_pressed = true
var sort_property = root.sorting_by
var sort_property = node_editor_view_root.sorting_by
if sort_property == "": sort_property = "resource_path"
var sort_type = root.column_types[root.columns.find(sort_property)]
var sort_type = node_editor_view_root.column_types[node_editor_view_root.columns.find(sort_property)]
var property_values = []
property_values.resize(page_count)
for i in page_count:
property_values[i] = root.rows[i * rows_per_page].get(sort_property)
property_values[i] = node_editor_view_root.rows[i * rows_per_page].get(sort_property)
if sort_type == TYPE_REAL or sort_type == TYPE_INT:
if sort_type == TYPE_FLOAT or sort_type == TYPE_INT:
for i in page_count:
btns[i].text = str(property_values[i])
@ -94,8 +97,8 @@ func _fill_buttons_with_prefixes(btns, strings, page_count):
func _on_button_pressed(button):
button.pressed = true
current_page = button.get_position_in_parent()
button.button_pressed = true
current_page = button.get_index()
_update_view()
@ -105,6 +108,5 @@ func _on_LineEdit_value_changed(value):
func _update_view():
_on_Control_grid_updated()
var view = get_node(path_editor_view_root)
view.refresh(false)
_on_grid_updated()
node_editor_view_root.refresh(false)

View File

@ -1,26 +1,26 @@
class_name TextEditingUtils
extends Reference
extends RefCounted
const non_typing_paragraph := ""
const non_typing_space := ""
const whitespace_chars := [
ord(" "),
ord(","),
ord(":"),
ord("-"),
ord(";"),
ord("("),
ord(")"),
ord("."),
ord(non_typing_paragraph),
ord(non_typing_space),
32, # " "
44, # ","
58, # ":"
45, # "-"
59, # ";"
40, # "("
41, # ")"
46, # "."
182, # "¶" Linefeed
967, # "●" Whitespace
]
static func is_character_whitespace(text : String, idx : int) -> bool:
if idx <= 0: return true # Stop at the edges.
if idx >= text.length(): return true
return text.ord_at(idx) in whitespace_chars
return text.unicode_at(idx) in whitespace_chars
static func show_non_typing(text : String) -> String:
@ -89,7 +89,7 @@ static func multi_move_right(values : Array, cursor_positions : Array, ctrl_pres
static func multi_paste(values : Array, cursor_positions : Array):
var pasted_lines := OS.clipboard.split("\n")
var pasted_lines := DisplayServer.clipboard_get().split("\n")
var paste_each_line := pasted_lines.size() == values.size()
for i in values.size():
@ -112,7 +112,7 @@ static func multi_copy(values : Array):
for i in values.size():
values[i] = values[i]
OS.clipboard = "\n".join(values)
DisplayServer.clipboard_set("\n".join(values))
static func multi_input(input_char : String, values : Array, cursor_positions : Array):
@ -153,12 +153,12 @@ static func string_snake_to_naming_case(string : String, add_spaces : bool = tru
static func pascal_case_to_snake_case(string : String) -> String:
var i = 0
while i < string.length():
if string.ord_at(i) < 97:
string = string.left(i) + ("_" if i > 0 else "") + string[i].to_lower() + string.substr(i + 1)
i += 1
i += 1
var i = 0
while i < string.length():
if string.unicode_at(i) < 97:
string = string.left(i) + ("_" if i > 0 else "") + string[i].to_lower() + string.substr(i + 1)
i += 1
i += 1
return string
return string

View File

@ -0,0 +1,43 @@
[gd_scene format=3 uid="uid://ydrs54md3knl"]
[node name="Label" type="MarginContainer"]
offset_right = 16.0
offset_bottom = 16.0
size_flags_vertical = 9
mouse_filter = 0
[node name="Box" type="HFlowContainer" parent="."]
layout_mode = 2
offset_right = 16.0
offset_bottom = 16.0
mouse_filter = 2
[node name="Back" type="Control" parent="."]
show_behind_parent = true
layout_mode = 2
anchors_preset = 0
offset_right = 16.0
offset_bottom = 16.0
mouse_filter = 2
[node name="ColorRect" type="ColorRect" parent="Back"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 1.0
offset_top = 1.0
offset_right = -1.0
offset_bottom = -1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0.247059, 0.247059, 0.247059, 0.498039)
[node name="Selected" type="ColorRect" parent="."]
visible = false
layout_mode = 2
offset_right = 16.0
offset_bottom = 16.0
mouse_filter = 2
color = Color(1, 1, 1, 0.247059)

View File

@ -0,0 +1,31 @@
[gd_scene format=3 uid="uid://cghfjg6qt3rb1"]
[node name="Label" type="Label"]
offset_right = 20.0
offset_bottom = 23.0
size_flags_vertical = 9
mouse_filter = 0
[node name="Back" type="ColorRect" parent="."]
show_behind_parent = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 1.0
offset_top = 1.0
offset_right = -1.0
offset_bottom = -1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0.247059, 0.247059, 0.247059, 0.498039)
[node name="Selected" type="ColorRect" parent="."]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color(1, 1, 1, 0.247059)

View File

@ -0,0 +1,32 @@
class_name CellEditor
extends RefCounted
const CELL_SCENE_DIR = "res://addons/resources_spreadsheet_view/typed_cells/"
var hint_strings_array := []
## Override to define where the cell should be shown.
func can_edit_value(value, type, property_hint, column_index) -> bool:
return value != null
## Override to change how the cell is created; preload a scene or create nodes from code.
## Caller is an instance of `editor_view.tscn`.
func create_cell(caller : Control) -> Control:
return load(CELL_SCENE_DIR + "basic.tscn").instantiate()
## Override to change behaviour when the cell is clicked to be selected.
func set_selected(node : Control, selected : bool):
node.get_node("Selected").visible = selected
## Override to change how the value is displayed.
func set_value(node : Control, value):
node.text = TextEditingUtils.show_non_typing(str(value))
## Override to prevent the cell from being edited as text.
func is_text():
return true
## Override to change behaviour when there are color cells to the left of this cell.
func set_color(node : Control, color : Color):
node.get_node("Back").modulate = color * 1.0

View File

@ -3,22 +3,22 @@ extends CellEditor
func can_edit_value(value, type, property_hint, column_index) -> bool:
return type == TYPE_STRING_ARRAY or type == TYPE_ARRAY
return type == TYPE_PACKED_STRING_ARRAY or type == TYPE_ARRAY
func create_cell(caller : Control) -> Control:
return load(CELL_SCENE_DIR + "array.tscn").instance()
return load(CELL_SCENE_DIR + "array.tscn").instantiate()
func set_value(node : Control, value):
var children = node.get_node("Box").get_children()
node.rect_min_size.x = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "array_min_width")
node.custom_minimum_size.x = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "array_min_width")
var colored = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "color_arrays")
while children.size() < value.size():
children.append(Label.new())
node.get_node("Box").add_child(children[children.size() - 1])
var column_hints = hint_strings_array[node.get_position_in_parent() % hint_strings_array.size()]
var column_hints = hint_strings_array[node.get_index() % hint_strings_array.size()]
for i in children.size():
if i >= value.size():
children[i].visible = false
@ -26,17 +26,16 @@ func set_value(node : Control, value):
else:
children[i].visible = true
_write_value_to_child(value[i], column_hints, children[i], colored)
func _write_value_to_child(value, hint_arr : PoolStringArray, child : Label, colored : bool):
func _write_value_to_child(value, hint_arr : PackedStringArray, child : Label, colored : bool):
child.text = str(value)
child.self_modulate = (
Color.white
Color.WHITE
if !colored else
Color(str(value).hash()) + Color(0.25, 0.25, 0.25, 1.0)
)
func is_text():
return false

View File

@ -0,0 +1,36 @@
extends CellEditor
var _cached_color := Color.WHITE
func create_cell(caller : Control) -> Control:
var node : Label = load(CELL_SCENE_DIR + "basic.tscn").instantiate()
var color := ColorRect.new()
node.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
node.custom_minimum_size.x = 56
node.add_child(color)
color.name = "Color"
call_deferred("_resize_color_rect", color)
return node
func _resize_color_rect(rect : ColorRect):
rect.size = Vector2(8, 0)
rect.anchors_preset = Control.PRESET_LEFT_WIDE
await rect.get_tree().process_frame
rect.size.x = 8
func can_edit_value(value, type, property_hint, property_hint_string) -> bool:
return type == TYPE_COLOR
func set_value(node : Control, value):
if value is String:
node.text = TextEditingUtils.show_non_typing(str(value))
else:
node.text = value.to_html(true)
_cached_color = value
node.get_node("Color").color = value

View File

@ -6,9 +6,9 @@ func can_edit_value(value, type, property_hint, column_index) -> bool:
func set_value(node : Control, value):
node.text = hint_strings_array[node.get_position_in_parent() % hint_strings_array.size()][value]
node.text = hint_strings_array[node.get_index() % hint_strings_array.size()][value]
node.self_modulate = Color(node.text.hash()) + Color(0.25, 0.25, 0.25, 1.0)
node.align = Label.ALIGN_CENTER
node.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
func is_text():

View File

@ -0,0 +1,18 @@
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:
return false
return hint_strings_array[column_index][0].begins_with("2/2:")
func _write_value_to_child(value, hint_arr : PackedStringArray, child : Label, colored : bool):
if value == 0:
# Enum array hints have "2/3:" before list.
var found := hint_arr[0].find(":") + 1
super._write_value_to_child(hint_arr[0].substr(hint_arr[0].find(":") + 1), hint_arr, child, colored)
else:
super._write_value_to_child(hint_arr[value], hint_arr, child, colored)

View File

@ -11,7 +11,7 @@ func create_cell(caller : Control) -> Control:
if previewer == null:
previewer = caller.editor_plugin.get_editor_interface().get_resource_previewer()
var node = load(CELL_SCENE_DIR + "resource.tscn").instance()
var node = load(CELL_SCENE_DIR + "resource.tscn").instantiate()
return node
@ -24,14 +24,18 @@ func set_value(node : Control, value):
if !value is Resource: return
node.editor_description = value.resource_path
node.get_node("Box/Label").text = value.resource_name + "[" + value.resource_path.get_file().get_basename() + "]"
node.get_node("Box/Label").text = "[" + value.resource_path.get_file().get_basename() + "]"
if value is Texture:
node.get_node("Box/Tex").visible = true
node.get_node("Box/Tex").texture = value
else:
node.get_node("Box/Tex").visible = false
previewer.queue_resource_preview(value.resource_path, self, "_on_preview_loaded", node)
previewer.queue_resource_preview(value.resource_path, self, &"_on_preview_loaded", node)
node.get_node("Box/Tex").custom_minimum_size = Vector2.ONE * ProjectSettings.get_setting(
SettingsGrid.SETTING_PREFIX + "resource_preview_size"
)
func set_color(node : Control, color : Color):

View File

@ -0,0 +1,59 @@
[gd_scene load_steps=2 format=3 uid="uid://clcndgxaty503"]
[ext_resource type="Texture2D" uid="uid://c08qavfwqr3k7" path="res://icon.png" id="1"]
[node name="Label" type="MarginContainer"]
size_flags_vertical = 9
mouse_filter = 0
[node name="Back" type="Control" parent="."]
show_behind_parent = true
layout_mode = 2
anchors_preset = 0
offset_right = 63.0
offset_bottom = 26.0
mouse_filter = 2
[node name="ColorRect" type="ColorRect" parent="Back"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 1.0
offset_top = 1.0
offset_right = -2.0
offset_bottom = -1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0.247059, 0.247059, 0.247059, 0.498039)
[node name="Selected" type="ColorRect" parent="."]
visible = false
layout_mode = 2
offset_right = 63.0
offset_bottom = 26.0
mouse_filter = 2
color = Color(1, 1, 1, 0.247059)
[node name="Box" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 63.0
offset_bottom = 26.0
mouse_filter = 2
[node name="Tex" type="TextureRect" parent="Box"]
layout_mode = 2
offset_bottom = 26.0
mouse_filter = 2
texture = ExtResource("1")
ignore_texture_size = true
stretch_mode = 5
[node name="Label" type="Label" parent="Box"]
layout_mode = 2
offset_left = 4.0
offset_right = 63.0
offset_bottom = 26.0
size_flags_horizontal = 3
text = "res.tres"

View File

@ -1,10 +1,10 @@
tool
@tool
extends SheetsDockEditor
onready var recent_container := $"HBoxContainer/Control2/HBoxContainer/HFlowContainer"
onready var contents_label := $"HBoxContainer/HBoxContainer/Panel/Label"
onready var button_box := $"HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"
onready var value_input := $"HBoxContainer/HBoxContainer/Control/VBoxContainer/LineEdit"
@onready var recent_container := $"HBoxContainer/Control2/HBoxContainer/HFlowContainer"
@onready var contents_label := $"HBoxContainer/HBoxContainer/Panel/Label"
@onready var button_box := $"HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"
@onready var value_input := $"HBoxContainer/HBoxContainer/Control/VBoxContainer/LineEdit"
var _stored_value
var _stored_type := 0
@ -12,12 +12,13 @@ var _stored_type := 0
func try_edit_value(value, type, property_hint) -> bool:
if (
type != TYPE_ARRAY and type != TYPE_STRING_ARRAY
and type != TYPE_INT_ARRAY and type != TYPE_REAL_ARRAY
type != TYPE_ARRAY and type != TYPE_PACKED_STRING_ARRAY
and type != TYPE_PACKED_INT32_ARRAY and type != TYPE_PACKED_FLOAT32_ARRAY
and type != TYPE_PACKED_INT64_ARRAY and type != TYPE_PACKED_FLOAT64_ARRAY
):
return false
if sheet.column_hint_strings[sheet.get_selected_column()][0].begins_with("2/3:"):
if sheet.column_hint_strings[sheet.get_selected_column()][0].begins_with("2/2:"):
# For enums, prefer the specialized dock.
return false
@ -26,9 +27,9 @@ func try_edit_value(value, type, property_hint) -> bool:
contents_label.text = str(value)
var is_generic_array = _stored_type == TYPE_ARRAY
button_box.get_child(1).visible = is_generic_array or _stored_type == TYPE_STRING_ARRAY
button_box.get_child(2).visible = is_generic_array or _stored_type == TYPE_INT_ARRAY
button_box.get_child(3).visible = is_generic_array or _stored_type == TYPE_REAL_ARRAY
button_box.get_child(1).visible = is_generic_array or _stored_type == TYPE_PACKED_STRING_ARRAY
button_box.get_child(2).visible = is_generic_array or _stored_type == TYPE_PACKED_INT32_ARRAY or _stored_type == TYPE_PACKED_INT64_ARRAY
button_box.get_child(3).visible = is_generic_array or _stored_type == TYPE_PACKED_FLOAT32_ARRAY or _stored_type == TYPE_PACKED_FLOAT64_ARRAY
return true
@ -50,9 +51,9 @@ func _add_value(value):
func _remove_value(value):
_stored_value.erase(value)
_stored_value.remove_at(_stored_value.find(value))
var values = sheet.get_edited_cells_values()
var cur_value
var cur_value : Array
var dupe_array : bool = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "dupe_arrays")
for i in values.size():
cur_value = values[i]
@ -60,7 +61,7 @@ func _remove_value(value):
cur_value = cur_value.duplicate()
if cur_value.has(value): # erase() not defined in PoolArrays
cur_value.remove(cur_value.find(value))
cur_value.remove_at(cur_value.find(value))
values[i] = cur_value
@ -75,7 +76,7 @@ func _add_recent(value):
var node := Button.new()
node.text = str(value)
node.self_modulate = Color(value.hash()) + Color(0.25, 0.25, 0.25, 1.0)
node.connect("pressed", self, "_on_recent_clicked", [node, value])
node.pressed.connect(_on_recent_clicked.bind(node, value))
recent_container.add_child(node)
@ -93,7 +94,11 @@ func _on_recent_clicked(button, value):
func _on_Remove_pressed():
_remove_value(str2var(value_input.text))
if str_to_var(value_input.text) != null:
_remove_value(str_to_var(value_input.text))
else:
_remove_value(value_input.text)
func _on_ClearRecent_pressed():
@ -103,20 +108,21 @@ func _on_ClearRecent_pressed():
func _on_Float_pressed():
_add_value(float(value_input.text))
_add_value(value_input.text.to_float())
func _on_Int_pressed():
_add_value(int(value_input.text))
_add_value(value_input.text.to_int())
func _on_String_pressed():
if value_input.text == "": return
_add_value(value_input.text)
_add_recent(value_input.text)
func _on_Variant_pressed():
_add_value(str2var(value_input.text))
_add_value(str_to_var(value_input.text))
func _on_AddRecentFromSel_pressed():

View File

@ -0,0 +1,244 @@
[gd_scene load_steps=5 format=3 uid="uid://c3a2cip8ffccv"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_array.gd" id="1"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2"]
[sub_resource type="Image" id="Image_yhr7y"]
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",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_3oshq"]
image = SubResource("Image_yhr7y")
[node name="EditArray" type="VBoxContainer"]
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
mouse_filter = 0
script = ExtResource("1")
[node name="Header" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 1152.0
offset_bottom = 26.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
layout_mode = 2
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
layout_mode = 2
offset_right = 86.0
offset_bottom = 26.0
text = "EDIT: Array"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
layout_mode = 2
offset_left = 90.0
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
layout_mode = 2
offset_left = 510.0
offset_right = 642.0
offset_bottom = 26.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
layout_mode = 2
offset_left = 646.0
offset_right = 1152.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HSplitContainer" parent="."]
layout_mode = 2
offset_top = 30.0
offset_right = 1152.0
offset_bottom = 91.0
split_offset = 380
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer"]
layout_mode = 2
offset_right = 380.0
offset_bottom = 61.0
alignment = 2
[node name="Panel" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_right = 134.0
offset_bottom = 61.0
size_flags_horizontal = 3
[node name="Label" type="TextEdit" parent="HBoxContainer/HBoxContainer/Panel"]
layout_mode = 2
offset_right = 134.0
offset_bottom = 61.0
size_flags_vertical = 5
text = "[]"
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 138.0
offset_right = 142.0
offset_bottom = 61.0
[node name="Control" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 146.0
offset_right = 372.0
offset_bottom = 61.0
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/HBoxContainer/Control"]
layout_mode = 2
offset_right = 226.0
offset_bottom = 61.0
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
layout_mode = 2
offset_right = 226.0
offset_bottom = 31.0
placeholder_text = "Input value to add/erase..."
clear_button_enabled = true
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
layout_mode = 2
offset_top = 35.0
offset_right = 226.0
offset_bottom = 61.0
[node name="Label" type="Label" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_right = 35.0
offset_bottom = 26.0
text = "Add:"
[node name="String" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 39.0
offset_right = 63.0
offset_bottom = 26.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "String"
[node name="Int" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 67.0
offset_right = 91.0
offset_bottom = 26.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "int"
[node name="Float" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 95.0
offset_right = 119.0
offset_bottom = 26.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "float"
[node name="Variant" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 123.0
offset_right = 147.0
offset_bottom = 26.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "Variant"
[node name="Label2" type="Label" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 151.0
offset_right = 198.0
offset_bottom = 26.0
text = "Erase:"
[node name="Remove" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 202.0
offset_right = 226.0
offset_bottom = 26.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "Remove"
[node name="VSeparator" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 376.0
offset_right = 380.0
offset_bottom = 61.0
[node name="Control2" type="MarginContainer" parent="HBoxContainer"]
layout_mode = 2
offset_left = 392.0
offset_right = 1152.0
offset_bottom = 61.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Control2"]
layout_mode = 2
offset_right = 760.0
offset_bottom = 61.0
alignment = 2
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/Control2/HBoxContainer"]
layout_mode = 2
offset_right = 4.0
offset_bottom = 61.0
[node name="HFlowContainer" type="HFlowContainer" parent="HBoxContainer/Control2/HBoxContainer"]
layout_mode = 2
offset_left = 8.0
offset_right = 760.0
offset_bottom = 61.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
layout_mode = 2
offset_top = 2.0
offset_right = 58.0
offset_bottom = 28.0
text = "Recent:"
[node name="OptionButton" type="OptionButton" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
layout_mode = 2
offset_left = 62.0
offset_right = 136.0
offset_bottom = 31.0
item_count = 3
selected = 0
fit_to_longest_item = false
popup/item_0/text = "Add"
popup/item_0/id = 0
popup/item_1/text = "Erase"
popup/item_1/id = 1
popup/item_2/text = "Remove From Recent"
popup/item_2/id = 2
[node name="AddRecentFromSel" type="Button" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
layout_mode = 2
offset_left = 140.0
offset_right = 164.0
offset_bottom = 31.0
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2")
icon_name = "ListSelect"
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/String" to="." method="_on_String_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Int" to="." method="_on_Int_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Float" to="." method="_on_Float_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Variant" to="." method="_on_Variant_pressed"]
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/HBoxContainer/Remove" to="." method="_on_Remove_pressed"]
[connection signal="pressed" from="HBoxContainer/Control2/HBoxContainer/HFlowContainer/AddRecentFromSel" to="." method="_on_AddRecentFromSel_pressed"]

View File

@ -1,8 +1,8 @@
tool
@tool
class_name SheetsDockEditor
extends Control
export var path_property_name := NodePath("Header/Label")
@export var path_property_name := NodePath("Header/Label")
var sheet : Control
var selection : Array
@ -14,8 +14,8 @@ func _ready():
parent = parent.get_parent()
sheet = parent
get_node(path_property_name).add_font_override("bold", get_font("bold", "EditorFonts"))
get_node(path_property_name).add_theme_font_override("normal", get_theme_font("bold", "EditorFonts"))
# Override to define when to show the dock and, if it can edit the value, how to handle it.
## Override to define when to show the dock and, if it can edit the value, how to handle it.
func try_edit_value(value, type, property_hint) -> bool:
return true

View File

@ -1,15 +1,16 @@
tool
@tool
extends SheetsDockEditor
onready var _value_rect := $"EditColor/ColorProper/ColorRect"
onready var _color_picker_panel := $"EditColor/VSeparator6/Panel"
onready var _color_picker := $"EditColor/VSeparator6/Panel/MarginContainer/ColorPicker"
onready var _custom_value_edit := $"EditColor/CustomX/LineEdit"
@onready var _value_rect := $"EditColor/ColorProper/ColorRect"
@onready var _color_picker_panel := $"EditColor/VSeparator6/Panel"
@onready var _color_picker := $"EditColor/VSeparator6/Panel/MarginContainer/ColorPicker"
@onready var _custom_value_edit := $"EditColor/CustomX/LineEdit"
var _stored_value := Color.white
var _stored_value := Color.WHITE
func _ready():
super._ready()
_connect_buttons($"EditColor/RGBGrid", 0, 0)
_connect_buttons($"EditColor/RGBGrid", 5, 1)
_connect_buttons($"EditColor/RGBGrid", 10, 2)
@ -19,14 +20,14 @@ func _ready():
func _connect_buttons(grid, start_index, property_bind):
grid.get_child(start_index + 0).connect("pressed", self, "_increment_values_custom", [-1.0, property_bind])
grid.get_child(start_index + 1).connect("pressed", self, "_increment_values", [-10.0, property_bind])
grid.get_child(start_index + 3).connect("pressed", self, "_increment_values", [10.0, property_bind])
grid.get_child(start_index + 4).connect("pressed", self, "_increment_values_custom", [1.0, property_bind])
grid.get_child(start_index + 0).pressed.connect(_increment_values_custom.bind(-1.0, property_bind))
grid.get_child(start_index + 1).pressed.connect(_increment_values.bind(-10.0, property_bind))
grid.get_child(start_index + 3).pressed.connect(_increment_values.bind(10.0, property_bind))
grid.get_child(start_index + 4).pressed.connect(_increment_values_custom.bind(1.0, property_bind))
func try_edit_value(value, type, property_hint) -> bool:
_color_picker_panel.set_as_toplevel(false)
_color_picker_panel.top_level = false
if type != TYPE_COLOR:
return false
@ -84,22 +85,22 @@ func _increment_values_custom(multiplier : float, property : int):
# Numbered buttons increment by 5 for Sat and Value, so hue is x0.5 effect. Negate it here
multiplier *= 2.0
_increment_values(float(_custom_value_edit.text) * multiplier, property)
_increment_values(_custom_value_edit.text.to_float() * multiplier, property)
func _on_Button_pressed():
_color_picker_panel.visible = !_color_picker_panel.visible
if _color_picker_panel.visible:
_color_picker_panel.set_as_toplevel(true)
_color_picker_panel.rect_global_position = (
sheet.rect_global_position
+ Vector2(0, sheet.rect_size.y - _color_picker_panel.rect_size.y)
_color_picker_panel.top_level = true
_color_picker_panel.global_position = (
sheet.global_position
+ Vector2(0, sheet.size.y - _color_picker_panel.size.y)
+ Vector2(16, -16)
)
_color_picker_panel.rect_global_position.y = clamp(
_color_picker_panel.rect_global_position.y,
_color_picker_panel.global_position.y = clamp(
_color_picker_panel.global_position.y,
0,
sheet.editor_plugin.get_editor_interface().get_base_control().rect_size.y
sheet.editor_plugin.get_editor_interface().get_base_control().size.y
)
_color_picker.color = _stored_value

View File

@ -0,0 +1,446 @@
[gd_scene load_steps=2 format=3 uid="uid://b3a3bo6cfyh5t"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_color.gd" id="1"]
[node name="EditColor" type="VBoxContainer"]
anchors_preset = 10
offset_bottom = 131.0
grow_horizontal = 2
mouse_filter = 0
script = ExtResource("1")
[node name="Header" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 1152.0
offset_bottom = 26.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
layout_mode = 2
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
layout_mode = 2
offset_right = 85.0
offset_bottom = 26.0
text = "EDIT: Color"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
layout_mode = 2
offset_left = 89.0
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
layout_mode = 2
offset_left = 510.0
offset_right = 642.0
offset_bottom = 26.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
layout_mode = 2
offset_left = 646.0
offset_right = 1152.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="EditColor" type="HBoxContainer" parent="."]
layout_mode = 2
offset_top = 30.0
offset_right = 1152.0
offset_bottom = 131.0
alignment = 1
[node name="VSeparator7" type="Control" parent="EditColor"]
layout_mode = 2
anchors_preset = 0
offset_right = 200.0
offset_bottom = 101.0
size_flags_horizontal = 3
[node name="VSeparator3" type="Control" parent="EditColor"]
visible = false
layout_mode = 2
anchors_preset = 0
[node name="ButtonRowTemplate" type="Control" parent="EditColor"]
visible = false
layout_mode = 2
anchors_preset = 0
[node name="Button3" type="Button" parent="EditColor/ButtonRowTemplate"]
layout_mode = 0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/ButtonRowTemplate"]
layout_mode = 0
text = "-5"
[node name="Label" type="Label" parent="EditColor/ButtonRowTemplate"]
layout_mode = 0
text = "Red"
[node name="Button5" type="Button" parent="EditColor/ButtonRowTemplate"]
layout_mode = 0
text = "+5"
[node name="Button6" type="Button" parent="EditColor/ButtonRowTemplate"]
layout_mode = 0
text = "+X"
[node name="RGBGrid" type="GridContainer" parent="EditColor"]
layout_mode = 2
offset_left = 204.0
offset_right = 388.0
offset_bottom = 101.0
columns = 5
[node name="Button3" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(1, 0.780392, 0.780392, 1)
layout_mode = 2
offset_right = 24.0
offset_bottom = 31.0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(1, 0.780392, 0.780392, 1)
layout_mode = 2
offset_left = 28.0
offset_right = 60.0
offset_bottom = 31.0
text = "-10"
[node name="Label" type="Label" parent="EditColor/RGBGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 2.0
offset_right = 112.0
offset_bottom = 28.0
text = "Red"
horizontal_alignment = 1
[node name="Button5" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(1, 0.780392, 0.780392, 1)
layout_mode = 2
offset_left = 116.0
offset_right = 152.0
offset_bottom = 31.0
text = "+10"
[node name="Button6" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(1, 0.780392, 0.780392, 1)
layout_mode = 2
offset_left = 156.0
offset_right = 184.0
offset_bottom = 31.0
text = "+X"
[node name="Button7" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.666667, 1, 0.745098, 1)
layout_mode = 2
offset_top = 35.0
offset_right = 24.0
offset_bottom = 66.0
text = "-X"
[node name="Button8" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.666667, 1, 0.745098, 1)
layout_mode = 2
offset_left = 28.0
offset_top = 35.0
offset_right = 60.0
offset_bottom = 66.0
text = "-10"
[node name="Label2" type="Label" parent="EditColor/RGBGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 37.0
offset_right = 112.0
offset_bottom = 63.0
text = "Green"
horizontal_alignment = 1
[node name="Button11" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.666667, 1, 0.745098, 1)
layout_mode = 2
offset_left = 116.0
offset_top = 35.0
offset_right = 152.0
offset_bottom = 66.0
text = "+10"
[node name="Button12" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.666667, 1, 0.745098, 1)
layout_mode = 2
offset_left = 156.0
offset_top = 35.0
offset_right = 184.0
offset_bottom = 66.0
text = "+X"
[node name="Button13" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.772549, 0.792157, 1, 1)
layout_mode = 2
offset_top = 70.0
offset_right = 24.0
offset_bottom = 101.0
text = "-X"
[node name="Button14" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.772549, 0.792157, 1, 1)
layout_mode = 2
offset_left = 28.0
offset_top = 70.0
offset_right = 60.0
offset_bottom = 101.0
text = "-10"
[node name="Label3" type="Label" parent="EditColor/RGBGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 72.0
offset_right = 112.0
offset_bottom = 98.0
text = "Blue"
horizontal_alignment = 1
[node name="Button17" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.772549, 0.792157, 1, 1)
layout_mode = 2
offset_left = 116.0
offset_top = 70.0
offset_right = 152.0
offset_bottom = 101.0
text = "+10"
[node name="Button18" type="Button" parent="EditColor/RGBGrid"]
modulate = Color(0.772549, 0.792157, 1, 1)
layout_mode = 2
offset_left = 156.0
offset_top = 70.0
offset_right = 184.0
offset_bottom = 101.0
text = "+X"
[node name="VSeparator" type="VSeparator" parent="EditColor"]
layout_mode = 2
offset_left = 392.0
offset_right = 396.0
offset_bottom = 101.0
[node name="ColorProper" type="VBoxContainer" parent="EditColor"]
layout_mode = 2
offset_left = 400.0
offset_right = 511.0
offset_bottom = 101.0
[node name="ColorRect" type="ColorRect" parent="EditColor/ColorProper"]
layout_mode = 2
offset_right = 111.0
offset_bottom = 66.0
size_flags_vertical = 3
[node name="Button" type="Button" parent="EditColor/ColorProper"]
layout_mode = 2
offset_top = 70.0
offset_right = 111.0
offset_bottom = 101.0
text = "Choose Color"
[node name="VSeparator2" type="VSeparator" parent="EditColor"]
layout_mode = 2
offset_left = 515.0
offset_right = 519.0
offset_bottom = 101.0
[node name="HSVGrid" type="GridContainer" parent="EditColor"]
layout_mode = 2
offset_left = 523.0
offset_right = 703.0
offset_bottom = 101.0
columns = 5
[node name="Button3" type="Button" parent="EditColor/HSVGrid"]
modulate = Color(1, 0.913725, 0.776471, 1)
layout_mode = 2
offset_right = 24.0
offset_bottom = 31.0
text = "-X"
[node name="Button2" type="Button" parent="EditColor/HSVGrid"]
modulate = Color(0.898039, 1, 0.698039, 1)
layout_mode = 2
offset_left = 28.0
offset_right = 60.0
offset_bottom = 31.0
text = "-10"
[node name="Label" type="Label" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 2.0
offset_right = 108.0
offset_bottom = 28.0
text = "Hue"
horizontal_alignment = 1
[node name="Button5" type="Button" parent="EditColor/HSVGrid"]
modulate = Color(0.717647, 1, 0.980392, 1)
layout_mode = 2
offset_left = 112.0
offset_right = 148.0
offset_bottom = 31.0
text = "+10"
[node name="Button6" type="Button" parent="EditColor/HSVGrid"]
modulate = Color(0.74902, 0.729412, 1, 1)
layout_mode = 2
offset_left = 152.0
offset_right = 180.0
offset_bottom = 31.0
text = "+X"
[node name="Button7" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_top = 35.0
offset_right = 24.0
offset_bottom = 66.0
text = "-X"
[node name="Button8" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 28.0
offset_top = 35.0
offset_right = 60.0
offset_bottom = 66.0
text = "-5"
[node name="Label2" type="Label" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 37.0
offset_right = 108.0
offset_bottom = 63.0
text = "Sat"
horizontal_alignment = 1
[node name="Button11" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 112.0
offset_top = 35.0
offset_right = 148.0
offset_bottom = 66.0
text = "+5"
[node name="Button12" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 152.0
offset_top = 35.0
offset_right = 180.0
offset_bottom = 66.0
text = "+X"
[node name="Button13" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_top = 70.0
offset_right = 24.0
offset_bottom = 101.0
text = "-X"
[node name="Button14" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 28.0
offset_top = 70.0
offset_right = 60.0
offset_bottom = 101.0
text = "-5"
[node name="Label3" type="Label" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 64.0
offset_top = 72.0
offset_right = 108.0
offset_bottom = 98.0
text = "Value"
horizontal_alignment = 1
[node name="Button17" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 112.0
offset_top = 70.0
offset_right = 148.0
offset_bottom = 101.0
text = "+5"
[node name="Button18" type="Button" parent="EditColor/HSVGrid"]
layout_mode = 2
offset_left = 152.0
offset_top = 70.0
offset_right = 180.0
offset_bottom = 101.0
text = "+X"
[node name="VSeparator4" type="VSeparator" parent="EditColor"]
layout_mode = 2
offset_left = 707.0
offset_right = 711.0
offset_bottom = 101.0
[node name="CustomX" type="VBoxContainer" parent="EditColor"]
layout_mode = 2
offset_left = 715.0
offset_right = 947.0
offset_bottom = 101.0
[node name="Label" type="Label" parent="EditColor/CustomX"]
layout_mode = 2
offset_top = 20.0
offset_right = 232.0
offset_bottom = 46.0
size_flags_vertical = 6
text = "Custom Value (for +X buttons)"
[node name="LineEdit" type="LineEdit" parent="EditColor/CustomX"]
layout_mode = 2
offset_top = 70.0
offset_right = 232.0
offset_bottom = 101.0
text = "20"
[node name="VSeparator6" type="Control" parent="EditColor"]
layout_mode = 2
anchors_preset = 0
offset_left = 951.0
offset_right = 1152.0
offset_bottom = 101.0
size_flags_horizontal = 3
[node name="Panel" type="PanelContainer" parent="EditColor/VSeparator6"]
visible = false
layout_mode = 1
anchors_preset = 2
grow_vertical = 0
[node name="Panel2" type="Panel" parent="EditColor/VSeparator6/Panel"]
self_modulate = Color(1.5, 1.5, 1.5, 1)
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="EditColor/VSeparator6/Panel"]
layout_mode = 2
[node name="ColorPicker" type="ColorPicker" parent="EditColor/VSeparator6/Panel/MarginContainer"]
layout_mode = 2
offset_right = 290.0
offset_bottom = 542.0
[node name="Button" type="Button" parent="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker"]
layout_mode = 2
text = "OK"
[connection signal="pressed" from="EditColor/ColorProper/Button" to="." method="_on_Button_pressed"]
[connection signal="gui_input" from="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker" to="." method="_on_ColorPicker_gui_input"]
[connection signal="pressed" from="EditColor/VSeparator6/Panel/MarginContainer/ColorPicker/Button" to="." method="_on_Button_pressed"]

View File

@ -1,24 +1,24 @@
tool
@tool
extends SheetsDockEditor
onready var options_container := $"HBoxContainer/Control2/HBoxContainer/HFlowContainer"
onready var contents_label := $"HBoxContainer/HBoxContainer/Panel/Label"
@onready var options_container := $"HBoxContainer/Control2/HBoxContainer/HFlowContainer"
@onready var contents_label := $"HBoxContainer/HBoxContainer/Panel/Label"
onready var _init_nodes_in_options_container := options_container.get_child_count()
@onready var _init_nodes_in_options_container := options_container.get_child_count()
var _stored_value
var _last_column := -1
func try_edit_value(value, type, property_hint) -> bool:
if !sheet.column_hint_strings[sheet.get_selected_column()][0].begins_with("2/3:"):
if !sheet.column_hint_strings[sheet.get_selected_column()][0].begins_with("2/2:"):
return false
_stored_value = value.duplicate() # Generic arrays are passed by reference
if _last_column != sheet.get_selected_column():
_last_column = sheet.get_selected_column()
for x in options_container.get_children():
x.visible = x.get_position_in_parent() < _init_nodes_in_options_container
x.visible = x.get_index() < _init_nodes_in_options_container
for i in sheet.column_hint_strings[sheet.get_selected_column()].size():
_create_option_button(i)
@ -37,7 +37,7 @@ func _create_option_button(index : int):
if index >= options_container.get_child_count() - _init_nodes_in_options_container:
node = Button.new()
options_container.add_child(node)
node.connect("pressed", self, "_on_option_clicked", [index])
node.pressed.connect(_on_option_clicked.bind(index))
else:
node = options_container.get_child(index + _init_nodes_in_options_container)
@ -75,7 +75,7 @@ func _remove_value(option_value):
cur_value = cur_value.duplicate()
if cur_value.has(option_value):
cur_value.remove(cur_value.find(option_value))
cur_value.remove_at(cur_value.find(option_value))
values[i] = cur_value
@ -92,7 +92,7 @@ func _on_option_clicked(value : int):
func _on_Remove_pressed():
_stored_value.remove(_stored_value.size() - 1)
_stored_value.remove_at(_stored_value.size() - 1)
var values = sheet.get_edited_cells_values()
var cur_value
var dupe_array : bool = ProjectSettings.get_setting(SettingsGrid.SETTING_PREFIX + "dupe_arrays")
@ -101,7 +101,7 @@ func _on_Remove_pressed():
if dupe_array:
cur_value = cur_value.duplicate()
cur_value.remove(cur_value.size() - 1)
cur_value.remove_at(cur_value.size() - 1)
values[i] = cur_value
sheet.set_edited_cells_values(values)

View File

@ -0,0 +1,165 @@
[gd_scene load_steps=5 format=3 uid="uid://ddqak780cwwfj"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_enum_array.gd" id="1_n3flg"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/editor_icon_button.gd" id="2_mda1e"]
[sub_resource type="Image" id="Image_yhr7y"]
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",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_3oshq"]
image = SubResource("Image_yhr7y")
[node name="EditEnumArray" type="VBoxContainer"]
anchors_preset = 10
anchor_right = 1.0
mouse_filter = 0
script = ExtResource("1_n3flg")
[node name="Header" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 1152.0
offset_bottom = 26.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
layout_mode = 2
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
layout_mode = 2
offset_right = 135.0
offset_bottom = 26.0
text = "EDIT: Enum Array"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
layout_mode = 2
offset_left = 139.0
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
layout_mode = 2
offset_left = 510.0
offset_right = 642.0
offset_bottom = 26.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
layout_mode = 2
offset_left = 646.0
offset_right = 1152.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HSplitContainer" parent="."]
layout_mode = 2
offset_top = 30.0
offset_right = 1152.0
offset_bottom = 61.0
split_offset = 250
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer"]
layout_mode = 2
offset_right = 250.0
offset_bottom = 31.0
alignment = 2
[node name="Panel" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_right = 58.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="Label" type="TextEdit" parent="HBoxContainer/HBoxContainer/Panel"]
layout_mode = 2
offset_right = 58.0
offset_bottom = 31.0
size_flags_vertical = 5
text = "[]"
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 62.0
offset_right = 66.0
offset_bottom = 31.0
[node name="Control" type="MarginContainer" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 70.0
offset_right = 242.0
offset_bottom = 31.0
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/HBoxContainer/Control"]
layout_mode = 2
offset_right = 172.0
offset_bottom = 31.0
[node name="Remove" type="Button" parent="HBoxContainer/HBoxContainer/Control/VBoxContainer"]
layout_mode = 2
offset_right = 172.0
offset_bottom = 31.0
text = "Remove Last Value"
icon = SubResource("ImageTexture_3oshq")
script = ExtResource("2_mda1e")
icon_name = "Remove"
[node name="VSeparator" type="VSeparator" parent="HBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 246.0
offset_right = 250.0
offset_bottom = 31.0
[node name="Control2" type="MarginContainer" parent="HBoxContainer"]
layout_mode = 2
offset_left = 262.0
offset_right = 1152.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer/Control2"]
layout_mode = 2
offset_right = 890.0
offset_bottom = 31.0
alignment = 2
[node name="VSeparator2" type="VSeparator" parent="HBoxContainer/Control2/HBoxContainer"]
layout_mode = 2
offset_right = 4.0
offset_bottom = 31.0
[node name="HFlowContainer" type="HFlowContainer" parent="HBoxContainer/Control2/HBoxContainer"]
layout_mode = 2
offset_left = 8.0
offset_right = 890.0
offset_bottom = 31.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
layout_mode = 2
offset_top = 2.0
offset_right = 66.0
offset_bottom = 28.0
text = "Options:"
[node name="OptionButton" type="OptionButton" parent="HBoxContainer/Control2/HBoxContainer/HFlowContainer"]
layout_mode = 2
offset_left = 70.0
offset_right = 144.0
offset_bottom = 31.0
item_count = 2
selected = 0
fit_to_longest_item = false
popup/item_0/text = "Add"
popup/item_0/id = 0
popup/item_1/text = "Erase"
popup/item_1/id = 1
[connection signal="pressed" from="HBoxContainer/HBoxContainer/Control/VBoxContainer/Remove" to="." method="_on_Remove_pressed"]

View File

@ -1,10 +1,10 @@
tool
@tool
extends SheetsDockEditor
onready var _value_label := $"HBoxContainer/HBoxContainer/NumberPanel/Label"
onready var _button_grid := $"HBoxContainer/HBoxContainer/GridContainer"
onready var _sequence_gen_inputs := $"HBoxContainer/CustomX2/HBoxContainer"
onready var _custom_value_edit := $"HBoxContainer/CustomX/LineEdit"
@onready var _value_label := $"HBoxContainer/HBoxContainer/NumberPanel/Label"
@onready var _button_grid := $"HBoxContainer/HBoxContainer/GridContainer"
@onready var _sequence_gen_inputs := $"HBoxContainer/CustomX2/HBoxContainer"
@onready var _custom_value_edit := $"HBoxContainer/CustomX/LineEdit"
var _stored_value = 0
var _stored_value_is_int := false
@ -13,29 +13,30 @@ var _mouse_down := false
func _ready():
_button_grid.get_child(0).connect("pressed", self, "_increment_values", [0.1])
_button_grid.get_child(1).connect("pressed", self, "_increment_values", [1])
_button_grid.get_child(2).connect("pressed", self, "_increment_values", [10])
_button_grid.get_child(3).connect("pressed", self, "_increment_values", [100])
_button_grid.get_child(4).connect("pressed", self, "_increment_values_custom", [true, false])
_button_grid.get_child(5).connect("pressed", self, "_increment_values_custom", [true, true])
super._ready()
_button_grid.get_child(0).pressed.connect(_increment_values.bind(0.1))
_button_grid.get_child(1).pressed.connect(_increment_values.bind(1))
_button_grid.get_child(2).pressed.connect(_increment_values.bind(10))
_button_grid.get_child(3).pressed.connect(_increment_values.bind(100))
_button_grid.get_child(4).pressed.connect(_increment_values_custom.bind(true, false))
_button_grid.get_child(5).pressed.connect(_increment_values_custom.bind(true, true))
_button_grid.get_child(6).connect("pressed", self, "_increment_values", [-0.1])
_button_grid.get_child(7).connect("pressed", self, "_increment_values", [-1])
_button_grid.get_child(8).connect("pressed", self, "_increment_values", [-10])
_button_grid.get_child(9).connect("pressed", self, "_increment_values", [-100])
_button_grid.get_child(10).connect("pressed", self, "_increment_values_custom",[false, false])
_button_grid.get_child(11).connect("pressed", self, "_increment_values_custom",[false, true])
_button_grid.get_child(6).pressed.connect(_increment_values.bind(-0.1))
_button_grid.get_child(7).pressed.connect(_increment_values.bind(-1))
_button_grid.get_child(8).pressed.connect(_increment_values.bind(-10))
_button_grid.get_child(9).pressed.connect(_increment_values.bind(-100))
_button_grid.get_child(10).pressed.connect(_increment_values_custom.bind(false, false))
_button_grid.get_child(11).pressed.connect(_increment_values_custom.bind(false, true))
func try_edit_value(value, type, property_hint) -> bool:
if type != TYPE_REAL and type != TYPE_INT:
if type != TYPE_FLOAT and type != TYPE_INT:
return false
_stored_value = value
_value_label.text = str(value)
_stored_value_is_int = type != TYPE_REAL
_stored_value_is_int = type != TYPE_FLOAT
_button_grid.columns = 5 if _stored_value_is_int else 6
_button_grid.get_child(0).visible = !_stored_value_is_int
_button_grid.get_child(6).visible = !_stored_value_is_int
@ -78,7 +79,7 @@ func _increment_values_custom(positive : bool, multiplier : bool):
func _on_NumberPanel_gui_input(event):
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
if event.pressed:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
_mouse_drag_increment = 0.0
@ -87,7 +88,7 @@ func _on_NumberPanel_gui_input(event):
else:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
if _mouse_down:
Input.warp_mouse_position(_value_label.rect_global_position + _value_label.rect_size * 0.5)
Input.warp_mouse(_value_label.global_position + _value_label.size * 0.5)
_increment_values(_mouse_drag_increment)
_mouse_down = false

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://addons/resources_speadsheet_view/typed_editors/dock_number.gd" type="Script" id=1]
[ext_resource path="res://addons/resources_spreadsheet_view/typed_editors/dock_number.gd" type="Script" id=1]
[node name="EditNumber" type="VBoxContainer"]
anchor_right = 1.0
margin_bottom = 86.0
rect_pivot_offset = Vector2( -460, -28 )
mouse_filter = 0
@ -66,7 +65,7 @@ text = "Fill with Sequence"
margin_left = 120.0
margin_right = 134.0
margin_bottom = 14.0
hint_tooltip = "Fill selected cells with a number sequence. Order is the same as the cells were selected.
tooltip_text = "Fill selected cells with a number sequence. Order is the same as the cells were selected.
- You must specify Start.
- If all values specified, selected cells will have a repeating sequence
of numbers from Start to End, with increment of Step, not including End.
@ -87,21 +86,21 @@ margin_bottom = 42.0
[node name="LineEdit" type="LineEdit" parent="HBoxContainer/CustomX2/HBoxContainer"]
margin_right = 58.0
margin_bottom = 24.0
hint_tooltip = "Start (must not be blank)"
tooltip_text = "Start (must not be blank)"
placeholder_text = "Start *"
[node name="LineEdit2" type="LineEdit" parent="HBoxContainer/CustomX2/HBoxContainer"]
margin_left = 62.0
margin_right = 120.0
margin_bottom = 24.0
hint_tooltip = "End"
tooltip_text = "End"
placeholder_text = "End"
[node name="LineEdit3" type="LineEdit" parent="HBoxContainer/CustomX2/HBoxContainer"]
margin_left = 124.0
margin_right = 182.0
margin_bottom = 24.0
hint_tooltip = "End"
tooltip_text = "End"
placeholder_text = "Step"
[node name="HBoxContainer2" type="HBoxContainer" parent="HBoxContainer/CustomX2"]

View File

@ -1,7 +1,7 @@
tool
@tool
extends SheetsDockEditor
var _stored_value : Texture
var _stored_value : Texture2D
func try_edit_value(value, type, property_hint) -> bool:
@ -14,12 +14,12 @@ func try_edit_value(value, type, property_hint) -> bool:
func _on_Button_pressed():
var h_count = int($"CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer/LineEdit".text)
var v_count = int($"CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer/LineEdit2".text)
var h_count = $"CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer/LineEdit".text.to_int()
var v_count = $"CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer/LineEdit2".text.to_int()
# No, Scene Unique Names can not be used in-editor (last time i checked)
var folder_name := _stored_value.resource_path.get_basename()
var dir := Directory.new()
var dir := DirAccess.open(folder_name)
dir.make_dir(folder_name)
var tex_size := _stored_value.get_size()
@ -32,7 +32,7 @@ func _on_Button_pressed():
tile.atlas = _stored_value
tile_array.append(tile)
tile.take_over_path(folder_name + "/" + folder_name.get_file() + "_" + str(j * v_count + i + 1) + ".tres")
ResourceSaver.save(tile.resource_path, tile)
ResourceSaver.save(tile)
tile_array.resize(sheet.edited_cells.size())
sheet.set_edited_cells_values(tile_array)

View File

@ -0,0 +1,132 @@
[gd_scene load_steps=3 format=3 uid="uid://rww3gpl052bn"]
[ext_resource type="Script" path="res://addons/resources_spreadsheet_view/typed_editors/dock_texture.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://c08qavfwqr3k7" path="res://icon.png" id="2"]
[node name="EditTexture" type="VBoxContainer"]
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.0694444
offset_bottom = 126.0
grow_horizontal = 2
mouse_filter = 0
script = ExtResource("1")
metadata/_edit_use_anchors_ = true
[node name="Header" type="HBoxContainer" parent="."]
layout_mode = 2
offset_right = 1152.0
offset_bottom = 26.0
[node name="HBoxContainer" type="HBoxContainer" parent="Header"]
layout_mode = 2
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header/HBoxContainer"]
layout_mode = 2
offset_right = 103.0
offset_bottom = 26.0
text = "EDIT: Texture"
[node name="HSeparator" type="HSeparator" parent="Header/HBoxContainer"]
layout_mode = 2
offset_left = 107.0
offset_right = 506.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="Label" type="Label" parent="Header"]
layout_mode = 2
offset_left = 510.0
offset_right = 642.0
offset_bottom = 26.0
text = "PROPERTY NAME"
[node name="HSeparator2" type="HSeparator" parent="Header"]
layout_mode = 2
offset_left = 646.0
offset_right = 1152.0
offset_bottom = 26.0
size_flags_horizontal = 3
[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 2
offset_top = 30.0
offset_right = 1152.0
offset_bottom = 126.0
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer"]
layout_mode = 2
offset_left = 394.0
offset_right = 758.0
offset_bottom = 96.0
alignment = 1
[node name="TextureRect" type="TextureRect" parent="CenterContainer/HBoxContainer"]
custom_minimum_size = Vector2i(96, 96)
layout_mode = 2
offset_right = 96.0
offset_bottom = 96.0
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("2")
ignore_texture_size = true
stretch_mode = 5
[node name="VSeparator" type="VSeparator" parent="CenterContainer/HBoxContainer"]
layout_mode = 2
offset_left = 100.0
offset_right = 104.0
offset_bottom = 96.0
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/HBoxContainer"]
layout_mode = 2
offset_left = 108.0
offset_right = 364.0
offset_bottom = 96.0
size_flags_horizontal = 3
auto_translate = false
[node name="Label" type="Label" parent="CenterContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
offset_right = 256.0
offset_bottom = 26.0
size_flags_vertical = 3
text = "Atlas Chopper"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/HBoxContainer/VBoxContainer"]
layout_mode = 2
offset_top = 30.0
offset_right = 256.0
offset_bottom = 61.0
size_flags_vertical = 4
[node name="LineEdit" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_right = 126.0
offset_bottom = 31.0
size_flags_horizontal = 3
placeholder_text = "H Count"
[node name="LineEdit2" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
offset_left = 130.0
offset_right = 256.0
offset_bottom = 31.0
size_flags_horizontal = 3
placeholder_text = "V Count"
[node name="Button" type="Button" parent="CenterContainer/HBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2i(256, 0)
layout_mode = 2
offset_top = 65.0
offset_right = 256.0
offset_bottom = 96.0
size_flags_vertical = 4
text = "Chop chop chop!!!"
[connection signal="pressed" from="CenterContainer/HBoxContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"]

View File

@ -1,8 +1,9 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/all_icons.png-28909f8bd099d79f5d095eb93a9167e6.stex"
type="CompressedTexture2D"
uid="uid://b7e3wp7i33ye5"
path="res://.godot/imported/all_icons.png-28909f8bd099d79f5d095eb93a9167e6.ctex"
metadata={
"vram_texture": false
}
@ -10,26 +11,24 @@ metadata={
[deps]
source_file="res://example/Random Upgrades/icons/all_icons.png"
dest_files=[ "res://.import/all_icons.png-28909f8bd099d79f5d095eb93a9167e6.stex" ]
dest_files=["res://.godot/imported/all_icons.png-28909f8bd099d79f5d095eb93a9167e6.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://c3bx6kf7frbwk"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 64, 64 )
atlas = ExtResource("1")
region = Rect2(0, 0, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cak6lra5ej68c"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_6pmrx"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 64, 128, 64, 64 )
atlas = ExtResource("1_6pmrx")
region = Rect2(64, 128, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dkc8d2p0xbl1n"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_lk0lg"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 128, 128, 64, 64 )
atlas = ExtResource("1_lk0lg")
region = Rect2(128, 128, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ciiykhulvckp7"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_fd56b"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 128, 64, 64 )
atlas = ExtResource("1_fd56b")
region = Rect2(192, 128, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dki1d3uksoyfj"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_ds6ve"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 192, 64, 64 )
atlas = ExtResource("1_ds6ve")
region = Rect2(0, 192, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cpenn4qsfhx28"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_icesd"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 64, 192, 64, 64 )
atlas = ExtResource("1_icesd")
region = Rect2(64, 192, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cm6cb8uou75x0"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_mlqxi"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 128, 192, 64, 64 )
atlas = ExtResource("1_mlqxi")
region = Rect2(128, 192, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://0c7ngrkwn42u"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_jk82p"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 192, 64, 64 )
atlas = ExtResource("1_jk82p")
region = Rect2(192, 192, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dfpwu4ra3fxgx"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 64, 0, 64, 64 )
atlas = ExtResource("1")
region = Rect2(64, 0, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://d38giyxvkhl6g"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 128, 0, 64, 64 )
atlas = ExtResource("1")
region = Rect2(128, 0, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cluvoehgeqmcu"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 64, 64 )
atlas = ExtResource("1")
region = Rect2(192, 0, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://djjpa8lluue1g"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 64, 64, 64 )
atlas = ExtResource("1")
region = Rect2(0, 64, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://butx3l1jdcgcc"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_em1jn"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 64, 64, 64, 64 )
atlas = ExtResource("1_em1jn")
region = Rect2(64, 64, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dfhgifwrrigrw"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_bpiay"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 128, 64, 64, 64 )
atlas = ExtResource("1_bpiay")
region = Rect2(128, 64, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dacww8ptt8uyo"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_mbxiu"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 64, 64, 64 )
atlas = ExtResource("1_mbxiu")
region = Rect2(192, 64, 64, 64)

View File

@ -1,8 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=2]
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dbbgxcs806sy8"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons.png" type="Texture" id=1]
[ext_resource type="Texture2D" uid="uid://b7e3wp7i33ye5" path="res://example/Random Upgrades/icons/all_icons.png" id="1_bw3gq"]
[resource]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 128, 64, 64 )
atlas = ExtResource("1_bw3gq")
region = Rect2(0, 128, 64, 64)

View File

@ -1,34 +1,31 @@
[gd_scene format=2]
[gd_scene format=3 uid="uid://b4cix5ebtpdbf"]
[node name="Node2D" type="Node2D"]
[node name="ColorRect" type="ColorRect" parent="."]
margin_left = 51.0
margin_top = 54.0
margin_right = 374.0
margin_bottom = 371.0
rect_rotation = -15.0
color = Color( 0, 1, 0.0156863, 1 )
offset_left = 363.0
offset_top = 83.0
offset_right = 718.0
offset_bottom = 632.0
color = Color(0, 1, 0.0156863, 1)
[node name="ColorRect2" type="ColorRect" parent="."]
margin_left = 484.0
margin_top = 66.0
margin_right = 807.0
margin_bottom = 383.0
rect_rotation = 15.0
color = Color( 0, 0.905882, 1, 1 )
offset_left = 833.0
offset_top = 304.0
offset_right = 1095.0
offset_bottom = 653.0
color = Color(0, 0.905882, 1, 1)
[node name="ColorRect3" type="ColorRect" parent="."]
margin_left = -39.0
margin_top = 324.0
margin_right = 284.0
margin_bottom = 641.0
rect_rotation = -30.0
color = Color( 0, 0.0156863, 1, 1 )
offset_left = 553.0
offset_top = 491.0
offset_right = 929.0
offset_bottom = 770.0
color = Color(0, 0.0156863, 1, 1)
[node name="ColorRect4" type="ColorRect" parent="."]
margin_left = 271.0
margin_top = 219.0
margin_right = 594.0
margin_bottom = 536.0
color = Color( 0.686275, 0, 1, 1 )
offset_left = 746.0
offset_top = 397.0
offset_right = 1077.0
offset_bottom = 632.0
color = Color(0.686275, 0, 1, 1)

View File

@ -1,4 +1,4 @@
tool
@tool
extends Resource
enum Attributes {
@ -9,19 +9,19 @@ enum Attributes {
Luck,
}
export var color1 := Color.white
export var max_duplicates := 0
export(Array, String) var tags : Array
export(int, "Weapon", "Passive", "Mastery") var type := 0
export(Array, Attributes) var attributes
export var icon : Texture
export var custom_scene : PackedScene
export var color2 := Color.white
export var base_weight := 10.0
export var is_notable := false
export(String, MULTILINE) var multiplier_per_tag := ""
export(String, MULTILINE) var multiplier_if_tag_present := ""
export(String, MULTILINE) var multiplier_if_tag_not_present := ""
export(String, MULTILINE) var max_tags_present := ""
export var list_item_delimeter := " "
export var list_row_delimeter := ";"
@export var color1 := Color.WHITE
@export var max_duplicates := 0
@export var tags : Array[String]
@export_enum("Weapon", "Passive", "Mastery") var type := 0
@export var attributes : Array[Attributes]
@export var icon : Texture
@export var custom_scene : PackedScene
@export var color2 := Color.WHITE
@export var base_weight := 10.0
@export var is_notable := false
@export_multiline var multiplier_per_tag := ""
@export_multiline var multiplier_if_tag_present := ""
@export_multiline var multiplier_if_tag_not_present := ""
@export_multiline var max_tags_present := ""
@export var list_item_delimeter := " "
@export var list_row_delimeter := ";"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://df0gymb6kab1q"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_6.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://butx3l1jdcgcc" path="res://example/Random Upgrades/icons/all_icons/all_icons_6.tres" id="1_utkae"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Upgrade: Elemental Damage"
script = ExtResource( 2 )
color1 = Color( 1, 1, 1, 1 )
script = ExtResource("2")
color1 = Color(1, 1, 1, 1)
max_duplicates = 9
tags = [ "elemental" ]
tags = ["elemental"]
type = 1
attributes = [ 1 ]
icon = ExtResource( 1 )
color2 = Color( 0.964706, 0.298039, 0.298039, 1 )
icon = ExtResource("1_utkae")
color2 = Color(0.964706, 0.298039, 0.298039, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = ""

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://dys7hpijn82t0"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_1.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://c3bx6kf7frbwk" path="res://example/Random Upgrades/icons/all_icons/all_icons_1.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Upgrade: Health"
script = ExtResource( 2 )
color1 = Color( 1, 1, 1, 1 )
script = ExtResource("2")
color1 = Color(1, 1, 1, 1)
max_duplicates = 9
tags = [ "health", "melee" ]
tags = ["health", "melee"]
type = 1
attributes = [ 2 ]
icon = ExtResource( 1 )
color2 = Color( 0.129412, 1, 0.243137, 1 )
attributes = [2]
icon = ExtResource("1")
color2 = Color(0.129412, 1, 0.243137, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "strength 1.5 melee 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://dmrklxbnskel8"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_5.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://djjpa8lluue1g" path="res://example/Random Upgrades/icons/all_icons/all_icons_5.tres" id="1_ardng"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Mastery: Magic"
script = ExtResource( 2 )
color1 = Color( 1, 0.847059, 0.160784, 1 )
script = ExtResource("2")
color1 = Color(1, 0.847059, 0.160784, 1)
max_duplicates = 9
tags = [ "magic", "mastery" ]
tags = ["magic", "mastery"]
type = 2
attributes = [ 1, 1, 4 ]
icon = ExtResource( 1 )
color2 = Color( 0.407843, 0.192157, 0.827451, 1 )
attributes = [1, 1, 4]
icon = ExtResource("1_ardng")
color2 = Color(0.407843, 0.192157, 0.827451, 1)
base_weight = 1.0
is_notable = true
multiplier_per_tag = "magic 1.2"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://d1suh8iai43st"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_2.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://dfpwu4ra3fxgx" path="res://example/Random Upgrades/icons/all_icons/all_icons_2.tres" id="1_442ey"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Mastery: Strength"
script = ExtResource( 2 )
color1 = Color( 1, 0.847059, 0.160784, 1 )
script = ExtResource("2")
color1 = Color(1, 0.847059, 0.160784, 1)
max_duplicates = 9
tags = [ "strength", "mastery" ]
tags = ["strength", "mastery"]
type = 2
attributes = [ 0, 0, 4 ]
icon = ExtResource( 1 )
color2 = Color( 0.992157, 0.941176, 0.2, 1 )
attributes = [0, 0, 4]
icon = ExtResource("1_442ey")
color2 = Color(0.992157, 0.941176, 0.2, 1)
base_weight = 1.0
is_notable = true
multiplier_per_tag = ""

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://2y7extlq12d5"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_6.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://butx3l1jdcgcc" path="res://example/Random Upgrades/icons/all_icons/all_icons_6.tres" id="1_prpsx"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Upgrade: Area of Effect"
script = ExtResource( 2 )
color1 = Color( 1, 1, 1, 1 )
script = ExtResource("2")
color1 = Color(1, 1, 1, 1)
max_duplicates = 4
tags = [ "aoe" ]
tags = ["aoe"]
type = 1
attributes = [ 3 ]
icon = ExtResource( 1 )
color2 = Color( 0.964706, 0.298039, 0.298039, 1 )
attributes = [3]
icon = ExtResource("1_prpsx")
color2 = Color(0.964706, 0.298039, 0.298039, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = ""

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://ce2kulhm7amkp"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_5.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://djjpa8lluue1g" path="res://example/Random Upgrades/icons/all_icons/all_icons_5.tres" id="1_we1lq"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Upgrade: Magic"
script = ExtResource( 2 )
color1 = Color( 1, 1, 1, 1 )
script = ExtResource("2")
color1 = Color(1, 1, 1, 1)
max_duplicates = 9
tags = [ "magic" ]
tags = ["magic"]
type = 1
attributes = [ 1 ]
icon = ExtResource( 1 )
color2 = Color( 0.188235, 0.45098, 0.901961, 1 )
attributes = [1]
icon = ExtResource("1_we1lq")
color2 = Color(0.188235, 0.45098, 0.901961, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = ""

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://c6hsg3j74vm56"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_2.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://dfpwu4ra3fxgx" path="res://example/Random Upgrades/icons/all_icons/all_icons_2.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Upgrade: Strength"
script = ExtResource( 2 )
color1 = Color( 1, 1, 1, 1 )
script = ExtResource("2")
color1 = Color(1, 1, 1, 1)
max_duplicates = 9
tags = [ "strength" ]
tags = ["strength"]
type = 1
attributes = [ 0 ]
icon = ExtResource( 1 )
color2 = Color( 0.988235, 0.584314, 0.192157, 1 )
icon = ExtResource("1")
color2 = Color(0.980392, 0.584314, 0.203922, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = ""

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://b78jqcpgef2ud"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://d38giyxvkhl6g" path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Axe"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "strength", "melee", "weapon" ]
tags = ["strength", "melee", "weapon"]
type = 0
attributes = [ 0, 2 ]
icon = ExtResource( 1 )
color2 = Color( 0.988235, 0.584314, 0.192157, 1 )
attributes = [0, 2]
icon = ExtResource("1")
color2 = Color(0.980392, 0.584314, 0.203922, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "strength 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://djqq1lqaevth5"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://cluvoehgeqmcu" path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" id="1_xleln"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Blizzard"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "magic", "elemental" ]
tags = ["weapon", "magic", "elemental"]
type = 0
attributes = [ 1, 2 ]
icon = ExtResource( 1 )
color2 = Color( 0.189457, 0.452246, 0.902344, 1 )
icon = ExtResource("1_xleln")
color2 = Color(0.189457, 0.452246, 0.902344, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "magic 2.0"

View File

@ -1,20 +1,20 @@
[gd_resource type="Resource" load_steps=4 format=2]
[gd_resource type="Resource" load_steps=4 format=3 uid="uid://60buw33oe30f"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/new scene.tscn" type="PackedScene" id=2]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=3]
[ext_resource type="PackedScene" uid="uid://b4cix5ebtpdbf" path="res://example/Random Upgrades/new scene.tscn" id="2"]
[ext_resource type="Texture2D" uid="uid://cluvoehgeqmcu" path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" id="2_eyyv1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="3"]
[resource]
resource_name = "Weapon: Chaos Blast"
script = ExtResource( 3 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("3")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "magic", "projectile", "legendary" ]
tags = ["weapon", "magic", "projectile", "legendary"]
type = 0
attributes = [ 1, 1, 1, 3 ]
icon = ExtResource( 1 )
custom_scene = ExtResource( 2 )
color2 = Color( 0.407843, 0.192157, 0.827451, 1 )
icon = ExtResource("2_eyyv1")
custom_scene = ExtResource("2")
color2 = Color(0.407843, 0.192157, 0.827451, 1)
base_weight = 1.0
is_notable = true
multiplier_per_tag = "magic 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://cux4x0qopwiqk"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://d38giyxvkhl6g" path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Daggers"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "strength", "projectile" ]
tags = ["weapon", "strength", "projectile"]
type = 0
attributes = [ 0, 3 ]
icon = ExtResource( 1 )
color2 = Color( 0.988235, 0.584314, 0.192157, 1 )
icon = ExtResource("1")
color2 = Color(0.980392, 0.584314, 0.203922, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "strength 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://rjxr4qtfc6qd"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://cluvoehgeqmcu" path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Fireball"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "magic", "projectile", "elemental" ]
tags = ["weapon", "magic", "projectile", "elemental"]
type = 0
attributes = [ 1, 2 ]
icon = ExtResource( 1 )
color2 = Color( 0.189457, 0.452246, 0.902344, 1 )
icon = ExtResource("1")
color2 = Color(0.189457, 0.452246, 0.902344, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "magic 2.0"

View File

@ -1,20 +1,20 @@
[gd_resource type="Resource" load_steps=4 format=2]
[gd_resource type="Resource" load_steps=4 format=3 uid="uid://c1mrcevxrm5kv"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/new scene.tscn" type="PackedScene" id=2]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=3]
[ext_resource type="PackedScene" uid="uid://b4cix5ebtpdbf" path="res://example/Random Upgrades/new scene.tscn" id="2"]
[ext_resource type="Texture2D" uid="uid://d38giyxvkhl6g" path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" id="2_kfnh0"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="3"]
[resource]
resource_name = "Weapon: Giga Sword"
script = ExtResource( 3 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("3")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "strength", "melee", "legendary" ]
tags = ["weapon", "strength", "melee", "legendary"]
type = 0
attributes = [ 0, 0, 0, 2 ]
icon = ExtResource( 1 )
custom_scene = ExtResource( 2 )
color2 = Color( 0.992157, 0.941176, 0.2, 1 )
icon = ExtResource("2_kfnh0")
custom_scene = ExtResource("2")
color2 = Color(0.992157, 0.941176, 0.2, 1)
base_weight = 1.0
is_notable = true
multiplier_per_tag = "strength 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://b0kdw067vtgvn"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://cluvoehgeqmcu" path="res://example/Random Upgrades/icons/all_icons/all_icons_4.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Lightning"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "magic", "elemental" ]
tags = ["weapon", "magic", "elemental"]
type = 0
attributes = [ 1, 3 ]
icon = ExtResource( 1 )
color2 = Color( 0.189457, 0.452246, 0.902344, 1 )
icon = ExtResource("1")
color2 = Color(0.189457, 0.452246, 0.902344, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "magic 2.0"

View File

@ -1,18 +1,18 @@
[gd_resource type="Resource" load_steps=3 format=2]
[gd_resource type="Resource" load_steps=3 format=3 uid="uid://xl0yx8uq6bfp"]
[ext_resource path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" type="Texture" id=1]
[ext_resource path="res://example/Random Upgrades/upgrade_data.gd" type="Script" id=2]
[ext_resource type="Texture2D" uid="uid://d38giyxvkhl6g" path="res://example/Random Upgrades/icons/all_icons/all_icons_3.tres" id="1"]
[ext_resource type="Script" path="res://example/Random Upgrades/upgrade_data.gd" id="2"]
[resource]
resource_name = "Weapon: Spear"
script = ExtResource( 2 )
color1 = Color( 0.635294, 0.760784, 1, 1 )
script = ExtResource("2")
color1 = Color(0.635294, 0.760784, 1, 1)
max_duplicates = 1
tags = [ "weapon", "strength", "melee" ]
tags = ["weapon", "strength", "melee"]
type = 0
attributes = [ 0, 3 ]
icon = ExtResource( 1 )
color2 = Color( 0.988235, 0.584314, 0.192157, 1 )
icon = ExtResource("1")
color2 = Color(0.980392, 0.584314, 0.203922, 1)
base_weight = 10.0
is_notable = false
multiplier_per_tag = "strength 2.0"

View File

@ -1,8 +1,9 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
type="CompressedTexture2D"
uid="uid://c08qavfwqr3k7"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={
"vram_texture": false
}
@ -10,26 +11,24 @@ metadata={
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -6,50 +6,56 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
config_version=5
_global_script_classes=[ {
"base": "Reference",
"class": "CellEditor",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/typed_cells/cell_editor.gd"
_global_script_classes=[{
"base": "RefCounted",
"class": &"CellEditor",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/typed_cells/cell_editor.gd"
}, {
"base": "CellEditor",
"class": "CellEditorArray",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/typed_cells/cell_editor_array.gd"
"class": &"CellEditorArray",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/typed_cells/cell_editor_array.gd"
}, {
"base": "GridContainer",
"class": "SettingsGrid",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/settings_grid.gd"
"class": &"SettingsGrid",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/settings_grid.gd"
}, {
"base": "Control",
"class": "SheetsDockEditor",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/typed_editors/dock_base.gd"
"class": &"SheetsDockEditor",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/typed_editors/dock_base.gd"
}, {
"base": "Reference",
"class": "TextEditingUtils",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/text_editing_utils.gd"
"base": "RefCounted",
"class": &"TextEditingUtils",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/text_editing_utils.gd"
}, {
"base": "Control",
"class": &"ThemeColorSetter",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/editor_color_setter.gd"
}, {
"base": "Button",
"class": "ThemeIconButton",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/editor_icon_button.gd"
"class": &"ThemeIconButton",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/editor_icon_button.gd"
}, {
"base": "Control",
"class": "ThemeStylebox",
"language": "GDScript",
"path": "res://addons/resources_speadsheet_view/editor_stylebox_overrider.gd"
} ]
"class": &"ThemeStylebox",
"language": &"GDScript",
"path": "res://addons/resources_spreadsheet_view/editor_stylebox_overrider.gd"
}]
_global_script_class_icons={
"CellEditor": "",
"CellEditorArray": "",
"SettingsGrid": "",
"SheetsDockEditor": "",
"TextEditingUtils": "",
"ThemeColorSetter": "",
"ThemeIconButton": "",
"ThemeStylebox": ""
}
@ -63,14 +69,16 @@ resources_spreadsheet_view/color_arrays=true
resources_spreadsheet_view/clip_headers=false
resources_spreadsheet_view/dupe_arrays=true
resources_spreadsheet_view/array_min_width=128.0
resources_spreadsheet_view/resource_preview_size=32.0
[application]
config/name="Addon: Resources as Sheets"
config/features=PackedStringArray("4.0")
[editor_plugins]
enabled=PoolStringArray( "res://addons/resources_speadsheet_view/plugin.cfg" )
enabled=PackedStringArray("res://addons/resources_spreadsheet_view/plugin.cfg")
[rendering]