└── addons └── Clipboard_Panel ├── plugin.cfg ├── Clipboard_init.gd ├── Clipboard_Logic.gd ├── Text_Line.gd ├── Text_Line.tscn └── Clipboard_Panel.tscn /addons/Clipboard_Panel/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="Clipboard Panel" 4 | description="" 5 | author="Thane5" 6 | version="" 7 | script="clipboard_init.gd" 8 | -------------------------------------------------------------------------------- /addons/Clipboard_Panel/Clipboard_init.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends EditorPlugin 3 | 4 | var clipboardPanel 5 | 6 | func _enter_tree(): 7 | clipboardPanel = preload("res://addons/Clipboard_Panel/Clipboard_Panel.tscn").instance() 8 | add_control_to_bottom_panel(clipboardPanel, "Clipboard") 9 | 10 | 11 | func _exit_tree(): 12 | remove_control_from_bottom_panel(clipboardPanel) 13 | clipboardPanel.free() 14 | -------------------------------------------------------------------------------- /addons/Clipboard_Panel/Clipboard_Logic.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends Control 3 | 4 | export(NodePath) var parentPath 5 | const ICON_ADD = "Add" 6 | 7 | func _enter_tree(): 8 | var vLine = load("res://addons/Clipboard_Panel/Text_Line.tscn").instance() 9 | get_node(parentPath).add_child(vLine) 10 | 11 | var addIcon = get_icon(ICON_ADD, 'EditorIcons') 12 | get_node("ScrollContainer/HBoxContainer/Add").set_button_icon(addIcon) 13 | 14 | 15 | # sometimes i get strange ghost instances in my scene so maybe this removes them? 16 | func _exit_tree(): 17 | for child in get_node("ScrollContainer/HBoxContainer/InstanceContainer").get_children(): 18 | if get_node("ScrollContainer/HBoxContainer/InstanceContainer").get_child_count() > 1: 19 | child.queue_free() 20 | 21 | 22 | func _on_Add_pressed(): 23 | var vLine = load("res://addons/Clipboard_Panel/Text_Line.tscn").instance() 24 | get_node(parentPath).add_child(vLine) 25 | -------------------------------------------------------------------------------- /addons/Clipboard_Panel/Text_Line.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends HBoxContainer 3 | 4 | const ICON_COPY = "ActionCopy" 5 | const ICON_CLEAR = "Clear" 6 | const ICON_REMOVE = "Remove" 7 | 8 | 9 | func _enter_tree(): 10 | 11 | var copyIcon = get_icon(ICON_COPY, 'EditorIcons') 12 | get_node("Copy").set_button_icon(copyIcon) 13 | 14 | var clearIcon = get_icon(ICON_CLEAR, 'EditorIcons') 15 | get_node("Clear").set_button_icon(clearIcon) 16 | 17 | var removeIcon = get_icon(ICON_REMOVE, 'EditorIcons') 18 | get_node("Remove").set_button_icon(removeIcon) 19 | 20 | 21 | 22 | func _on_Copy_pressed(): 23 | get_node("TextEdit").select_all() 24 | get_node("TextEdit").copy() 25 | yield(get_tree().create_timer(0.1), "timeout") 26 | get_node("TextEdit").deselect() 27 | 28 | func _on_Clear_pressed(): 29 | get_node("TextEdit").set_text("") 30 | 31 | 32 | func _on_Remove_pressed(): 33 | var container = (get_node("..")) 34 | if container.get_child_count() > 1: 35 | self.queue_free() 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /addons/Clipboard_Panel/Text_Line.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://addons/Clipboard_Panel/Text_Line.gd" type="Script" id=1] 4 | 5 | [sub_resource type="Image" id=3] 6 | data = { 7 | "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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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 ), 8 | "format": "LumAlpha8", 9 | "height": 16, 10 | "mipmaps": false, 11 | "width": 16 12 | } 13 | 14 | [sub_resource type="ImageTexture" id=2] 15 | flags = 4 16 | flags = 4 17 | image = SubResource( 3 ) 18 | size = Vector2( 16, 16 ) 19 | 20 | [node name="textLine" type="HBoxContainer"] 21 | anchor_right = 0.999719 22 | anchor_bottom = 0.08 23 | margin_right = 0.287964 24 | margin_bottom = 2.0 25 | rect_min_size = Vector2( 0, 30 ) 26 | size_flags_vertical = 3 27 | script = ExtResource( 1 ) 28 | __meta__ = { 29 | "_edit_use_anchors_": true 30 | } 31 | 32 | [node name="Clear" type="Button" parent="."] 33 | margin_right = 28.0 34 | margin_bottom = 50.0 35 | size_flags_vertical = 3 36 | icon = SubResource( 2 ) 37 | 38 | [node name="Copy" type="Button" parent="."] 39 | margin_left = 32.0 40 | margin_right = 60.0 41 | margin_bottom = 50.0 42 | size_flags_vertical = 3 43 | icon = SubResource( 2 ) 44 | 45 | [node name="TextEdit" type="TextEdit" parent="."] 46 | margin_left = 64.0 47 | margin_right = 992.0 48 | margin_bottom = 50.0 49 | size_flags_horizontal = 3 50 | size_flags_vertical = 3 51 | syntax_highlighting = true 52 | show_line_numbers = true 53 | __meta__ = { 54 | "_edit_use_anchors_": false 55 | } 56 | 57 | [node name="Remove" type="Button" parent="."] 58 | margin_left = 996.0 59 | margin_right = 1024.0 60 | margin_bottom = 50.0 61 | size_flags_vertical = 3 62 | icon = SubResource( 2 ) 63 | 64 | [connection signal="pressed" from="Clear" to="." method="_on_Clear_pressed"] 65 | [connection signal="pressed" from="Copy" to="." method="_on_Copy_pressed"] 66 | [connection signal="pressed" from="Remove" to="." method="_on_Remove_pressed"] 67 | -------------------------------------------------------------------------------- /addons/Clipboard_Panel/Clipboard_Panel.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://addons/Clipboard_Panel/Clipboard_Logic.gd" type="Script" id=1] 4 | 5 | [sub_resource type="Image" id=1] 6 | data = { 7 | "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 ), 8 | "format": "LumAlpha8", 9 | "height": 16, 10 | "mipmaps": false, 11 | "width": 16 12 | } 13 | 14 | [sub_resource type="ImageTexture" id=2] 15 | flags = 4 16 | flags = 4 17 | image = SubResource( 1 ) 18 | size = Vector2( 16, 16 ) 19 | 20 | [node name="Clipboard" type="Control"] 21 | anchor_right = 1.0 22 | anchor_bottom = 0.426667 23 | rect_min_size = Vector2( 0, 32 ) 24 | script = ExtResource( 1 ) 25 | __meta__ = { 26 | "_edit_use_anchors_": true 27 | } 28 | parentPath = NodePath("ScrollContainer/HBoxContainer/InstanceContainer") 29 | 30 | [node name="ScrollContainer" type="ScrollContainer" parent="."] 31 | anchor_right = 1.0 32 | anchor_bottom = 1.0 33 | rect_min_size = Vector2( 0, 32 ) 34 | __meta__ = { 35 | "_edit_use_anchors_": false 36 | } 37 | 38 | [node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer"] 39 | margin_right = 1024.0 40 | margin_bottom = 256.0 41 | size_flags_horizontal = 3 42 | size_flags_vertical = 3 43 | __meta__ = { 44 | "_edit_use_anchors_": false 45 | } 46 | 47 | [node name="InstanceContainer" type="VBoxContainer" parent="ScrollContainer/HBoxContainer"] 48 | margin_right = 984.0 49 | margin_bottom = 256.0 50 | size_flags_horizontal = 3 51 | size_flags_vertical = 3 52 | __meta__ = { 53 | "_edit_use_anchors_": false 54 | } 55 | 56 | [node name="VSeparator" type="VSeparator" parent="ScrollContainer/HBoxContainer"] 57 | margin_left = 988.0 58 | margin_right = 992.0 59 | margin_bottom = 256.0 60 | 61 | [node name="Add" type="Button" parent="ScrollContainer/HBoxContainer"] 62 | margin_left = 996.0 63 | margin_right = 1024.0 64 | margin_bottom = 256.0 65 | icon = SubResource( 2 ) 66 | __meta__ = { 67 | "_edit_use_anchors_": false 68 | } 69 | 70 | [connection signal="pressed" from="ScrollContainer/HBoxContainer/Add" to="." method="_on_Add_pressed"] 71 | --------------------------------------------------------------------------------