Compare commits
3 commits
master
...
feature/Re
Author | SHA1 | Date | |
---|---|---|---|
c9c9fc9b90 | |||
a31b68eff2 | |||
a271827227 |
5 changed files with 60 additions and 1 deletions
17
addons/RenamingTool/RenamingTool.gd
Normal file
17
addons/RenamingTool/RenamingTool.gd
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@tool
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_pressed():
|
||||||
|
# TODO Get the files selected
|
||||||
|
EditorInterface.get_selected_paths() # Doesnt work
|
||||||
|
print("Pushed")
|
20
addons/RenamingTool/RenamingTool.tscn
Normal file
20
addons/RenamingTool/RenamingTool.tscn
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://cs740b0dde5o1"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://addons/RenamingTool/RenamingTool.gd" id="1_smv3y"]
|
||||||
|
|
||||||
|
[node name="RenamingTool" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_smv3y")
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="."]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_right = 8.0
|
||||||
|
offset_bottom = 8.0
|
||||||
|
text = "Rename"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
7
addons/RenamingTool/plugin.cfg
Normal file
7
addons/RenamingTool/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="RenamingTool"
|
||||||
|
description=""
|
||||||
|
author="Lucastucious"
|
||||||
|
version=""
|
||||||
|
script="plugin.gd"
|
15
addons/RenamingTool/plugin.gd
Normal file
15
addons/RenamingTool/plugin.gd
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
const DockScene := preload("res://addons/RenamingTool/RenamingTool.tscn")
|
||||||
|
const Dock := preload("res://addons/RenamingTool/RenamingTool.gd")
|
||||||
|
var _dockUI
|
||||||
|
|
||||||
|
func _enter_tree():
|
||||||
|
_dockUI = DockScene.instantiate() as Control
|
||||||
|
add_control_to_dock(EditorPlugin.DOCK_SLOT_LEFT_UL,_dockUI)
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree():
|
||||||
|
remove_control_from_docks(_dockUI)
|
||||||
|
_dockUI.free()
|
|
@ -23,7 +23,7 @@ version_control/autoload_on_startup=true
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/Todo_Manager/plugin.cfg")
|
enabled=PackedStringArray("res://addons/RenamingTool/plugin.cfg", "res://addons/Todo_Manager/plugin.cfg")
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue