initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Godot;
|
||||
using ReEdit.Syntax;
|
||||
using System;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
|
||||
public partial class TextEditor : CodeEdit
|
||||
{
|
||||
public string Extension = "lua";
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
UpdateHighlighter();
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
public void UpdateHighlighter()
|
||||
{
|
||||
switch (Extension)
|
||||
{
|
||||
default: SyntaxHighlighter = new PlainText(); break; // things like plaintext, aswell as unrecongnized extensions
|
||||
case "lua" or "luac" or "luau": SyntaxHighlighter = new Lua(); break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user