This commit is contained in:
kobewi 2023-03-08 02:29:04 +01:00
parent 2362849ce1
commit b4e2637f75
6 changed files with 14 additions and 96 deletions

View File

@ -6,32 +6,20 @@
script = ExtResource("1_kya6i") script = ExtResource("1_kya6i")
[node name="DragPanel" type="Panel" parent="."] [node name="DragPanel" type="Panel" parent="."]
custom_minimum_size = Vector2i(20, 0) custom_minimum_size = Vector2(20, 0)
layout_mode = 2 layout_mode = 2
offset_right = 20.0
offset_bottom = 31.0
mouse_default_cursor_shape = 13 mouse_default_cursor_shape = 13
[node name="Name" type="LineEdit" parent="."] [node name="Name" type="LineEdit" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 24.0
offset_right = 91.0
offset_bottom = 31.0
size_flags_horizontal = 3 size_flags_horizontal = 3
text = "Column name" text = "Column name"
[node name="Counter" type="Label" parent="."] [node name="Counter" type="Label" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 95.0
offset_top = 2.0
offset_right = 105.0
offset_bottom = 28.0
text = "0" text = "0"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="Minimize" type="Button" parent="."] [node name="Minimize" type="Button" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 109.0
offset_right = 117.0
offset_bottom = 31.0
tooltip_text = "Fold/Unfold" tooltip_text = "Fold/Unfold"

View File

@ -26,45 +26,29 @@ size_flags_vertical = 3
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"] [node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2 layout_mode = 2
offset_right = 1152.0
offset_bottom = 31.0
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer"]
layout_mode = 2 layout_mode = 2
offset_right = 1152.0
offset_bottom = 31.0
[node name="Button" type="Button" parent="VBoxContainer/PanelContainer/VBoxContainer"] [node name="Button" type="Button" parent="VBoxContainer/PanelContainer/VBoxContainer"]
layout_mode = 2 layout_mode = 2
offset_left = 525.0
offset_right = 626.0
offset_bottom = 31.0
size_flags_horizontal = 4 size_flags_horizontal = 4
text = "Add column" text = "Add column"
[node name="ColumnMirror" type="Control" parent="VBoxContainer/PanelContainer/VBoxContainer"] [node name="ColumnMirror" type="Control" parent="VBoxContainer/PanelContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
custom_minimum_size = Vector2i(0, 30) custom_minimum_size = Vector2(0, 30)
layout_mode = 2 layout_mode = 2
anchors_preset = 0
offset_top = 35.0
offset_right = 1152.0
offset_bottom = 35.0
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"] [node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_top = 35.0
offset_right = 1152.0
offset_bottom = 648.0
size_flags_vertical = 3 size_flags_vertical = 3
[node name="Columns" type="HBoxContainer" parent="VBoxContainer/ScrollContainer"] [node name="Columns" type="HBoxContainer" parent="VBoxContainer/ScrollContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_right = 1152.0
offset_bottom = 613.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3

View File

@ -26,16 +26,18 @@ signal delete
func set_minimized(val: bool): func set_minimized(val: bool):
minimized = val minimized = val
header.minimize_button.icon = get_theme_icon(&"ArrowDown" if minimized else &"ArrowUp", &"EditorIcons") if plugin:
mirror_header.minimize_button.icon = get_theme_icon(&"ArrowDown" if minimized else &"ArrowUp", &"EditorIcons") header.minimize_button.icon = get_theme_icon(&"ArrowDown" if minimized else &"ArrowUp", &"EditorIcons")
mirror_header.minimize_button.icon = get_theme_icon(&"ArrowDown" if minimized else &"ArrowUp", &"EditorIcons")
for node in foldable: for node in foldable:
node.visible = not minimized node.visible = not minimized
func _ready() -> void: func _ready() -> void:
item_placement_holder = main.item_placement_holder item_placement_holder = main.item_placement_holder
delete_button.icon = get_theme_icon(&"Remove", &"EditorIcons") if plugin:
delete_button.icon = get_theme_icon(&"Remove", &"EditorIcons")
mirror_header_panel = PanelContainer.new() mirror_header_panel = PanelContainer.new()
main.column_mirror.add_child(mirror_header_panel) main.column_mirror.add_child(mirror_header_panel)

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=6 format=3 uid="uid://bga0tfe37uva2"] [gd_scene load_steps=4 format=3 uid="uid://bga0tfe37uva2"]
[ext_resource type="Script" path="res://addons/SimpleTODO/TODOColumn.gd" id="1"] [ext_resource type="Script" path="res://addons/SimpleTODO/TODOColumn.gd" id="1"]
[ext_resource type="PackedScene" uid="uid://cwcwdmxxpf65e" path="res://addons/SimpleTODO/ColumnHeader.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cwcwdmxxpf65e" path="res://addons/SimpleTODO/ColumnHeader.tscn" id="2"]
@ -14,71 +14,39 @@ corner_radius_top_right = 4
corner_radius_bottom_right = 4 corner_radius_bottom_right = 4
corner_radius_bottom_left = 4 corner_radius_bottom_left = 4
[sub_resource type="Image" id="Image_2oyio"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 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="5"]
image = SubResource("Image_2oyio")
[node name="TODOColumn" type="PanelContainer"] [node name="TODOColumn" type="PanelContainer"]
custom_minimum_size = Vector2i(400, 0) custom_minimum_size = Vector2(400, 0)
size_flags_vertical = 2 size_flags_vertical = 2
theme_override_styles/panel = SubResource("3") theme_override_styles/panel = SubResource("3")
script = ExtResource("1") script = ExtResource("1")
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 4.0
offset_top = 4.0
offset_right = 396.0
offset_bottom = 90.0
[node name="Header" parent="VBoxContainer" instance=ExtResource("2")] [node name="Header" parent="VBoxContainer" instance=ExtResource("2")]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_right = 392.0
offset_bottom = 31.0
[node name="TopSeparator" type="HSeparator" parent="VBoxContainer"] [node name="TopSeparator" type="HSeparator" parent="VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_top = 35.0
offset_right = 392.0
offset_bottom = 39.0
[node name="Items" type="VBoxContainer" parent="VBoxContainer"] [node name="Items" type="VBoxContainer" parent="VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_top = 43.0
offset_right = 392.0
offset_bottom = 43.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
[node name="BottomSeparator" type="HSeparator" parent="VBoxContainer"] [node name="BottomSeparator" type="HSeparator" parent="VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_top = 47.0
offset_right = 392.0
offset_bottom = 51.0
[node name="Actions" type="HBoxContainer" parent="VBoxContainer"] [node name="Actions" type="HBoxContainer" parent="VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_top = 55.0
offset_right = 392.0
offset_bottom = 86.0
[node name="AddItem" type="Button" parent="VBoxContainer/Actions"] [node name="AddItem" type="Button" parent="VBoxContainer/Actions"]
layout_mode = 2 layout_mode = 2
offset_right = 364.0
offset_bottom = 31.0
size_flags_horizontal = 3 size_flags_horizontal = 3
tooltip_text = "Add Item" tooltip_text = "Add Item"
text = "+" text = "+"
@ -86,11 +54,7 @@ text = "+"
[node name="DeleteColumn" type="Button" parent="VBoxContainer/Actions"] [node name="DeleteColumn" type="Button" parent="VBoxContainer/Actions"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
offset_left = 368.0
offset_right = 392.0
offset_bottom = 31.0
tooltip_text = "Delete Column" tooltip_text = "Delete Column"
icon = SubResource("5")
[node name="Timer" type="Timer" parent="."] [node name="Timer" type="Timer" parent="."]
wait_time = 0.5 wait_time = 0.5

View File

@ -24,7 +24,8 @@ func _ready() -> void:
undo_redo = main.undo_redo undo_redo = main.undo_redo
item_placement_holder = main.item_placement_holder item_placement_holder = main.item_placement_holder
next_parent_column = parent_column next_parent_column = parent_column
button.icon = get_theme_icon(&"Remove", &"EditorIcons") if plugin:
button.icon = get_theme_icon(&"Remove", &"EditorIcons")
set_process(false) set_process(false)
set_process_input(false) set_process_input(false)

View File

@ -1,35 +1,18 @@
[gd_scene load_steps=4 format=3 uid="uid://bdesiystlxdb2"] [gd_scene load_steps=2 format=3 uid="uid://bdesiystlxdb2"]
[ext_resource type="Script" path="res://addons/SimpleTODO/TODOItem.gd" id="1"] [ext_resource type="Script" path="res://addons/SimpleTODO/TODOItem.gd" id="1"]
[sub_resource type="Image" id="Image_m3ju7"]
data = {
"data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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="5"]
image = SubResource("Image_m3ju7")
[node name="TODOItem" type="HBoxContainer"] [node name="TODOItem" type="HBoxContainer"]
mouse_filter = 2 mouse_filter = 2
script = ExtResource("1") script = ExtResource("1")
[node name="DragPanel" type="Panel" parent="."] [node name="DragPanel" type="Panel" parent="."]
custom_minimum_size = Vector2i(20, 0) custom_minimum_size = Vector2(20, 0)
layout_mode = 2 layout_mode = 2
offset_right = 20.0
offset_bottom = 35.0
mouse_default_cursor_shape = 13 mouse_default_cursor_shape = 13
[node name="Text" type="TextEdit" parent="."] [node name="Text" type="TextEdit" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 24.0
offset_right = 32.0
offset_bottom = 35.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
text = "TODO" text = "TODO"
@ -38,11 +21,7 @@ scroll_fit_content_height = true
[node name="Button" type="Button" parent="."] [node name="Button" type="Button" parent="."]
layout_mode = 2 layout_mode = 2
offset_left = 36.0
offset_right = 60.0
offset_bottom = 35.0
tooltip_text = "Delete Item" tooltip_text = "Delete Item"
icon = SubResource("5")
[node name="Timer" type="Timer" parent="."] [node name="Timer" type="Timer" parent="."]
wait_time = 0.5 wait_time = 0.5