Initial commit
This commit is contained in:
commit
bb075d6353
20 changed files with 336 additions and 0 deletions
44
addons/placeholder_tracker/PlaceholderTracker.cs
Normal file
44
addons/placeholder_tracker/PlaceholderTracker.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
#if TOOLS
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
namespace PT;
|
||||
|
||||
[Tool]
|
||||
public partial class PlaceholderTracker : EditorPlugin
|
||||
{
|
||||
public const string TODO_EXTENSION = ".todo";
|
||||
|
||||
public static bool IsFilePlaceholder(string path) => FileAccess.FileExists(path + TODO_EXTENSION);
|
||||
|
||||
PtExportPlugin _exportPlugin;
|
||||
PtContextMenuPlugin _contextMenuPlugin;
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
// AddImportPlugin
|
||||
// AddResourceConversionPlugin
|
||||
_exportPlugin = new PtExportPlugin();
|
||||
AddExportPlugin(_exportPlugin);
|
||||
|
||||
_contextMenuPlugin = new PtContextMenuPlugin();
|
||||
AddContextMenuPlugin(EditorContextMenuPlugin.ContextMenuSlot.Filesystem, _contextMenuPlugin);
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
RemoveContextMenuPlugin(_contextMenuPlugin);
|
||||
RemoveExportPlugin(_exportPlugin);
|
||||
}
|
||||
|
||||
public override string _GetPluginName()
|
||||
{
|
||||
return "Placeholder Tracker";
|
||||
}
|
||||
|
||||
public override void _Notification(int what)
|
||||
{
|
||||
//GD.PrintErr(what);
|
||||
}
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue