diff --git a/src/Views/StudioSyntax.cs b/src/Views/StudioSyntax.cs
index 9408b40..d2f0d2c 100644
--- a/src/Views/StudioSyntax.cs
+++ b/src/Views/StudioSyntax.cs
@@ -2,6 +2,7 @@ namespace Cthangover.Mods.ScenarioStudio
{
using System.Text;
using Cthangover.Core.UI.Theming;
+ using Cthangover.Mods.Interface.Theming;
using Cthangover.Mods.Dialog.Scenarios;
using Godot;
@@ -15,29 +16,9 @@ namespace Cthangover.Mods.ScenarioStudio
///
public static class StudioSyntax
{
- ///
- /// Highlighter for the inline text editor with the same palette: every
- /// registered command word (plus select/option) gold, quoted
- /// text ink, comments faint, :labels teal.
- ///
+ /// Uses the same scenario syntax as the full editor and embedded command fields.
public static CodeHighlighter CreateHighlighter()
- {
- var highlighter = new CodeHighlighter
- {
- NumberColor = UiTokens.Body,
- SymbolColor = UiTokens.Muted,
- FunctionColor = UiTokens.Body,
- MemberVariableColor = UiTokens.Body,
- };
- foreach (var command in ScenarioCommandStrategyFactory.GetAllCommandNames())
- highlighter.AddKeywordColor(command, UiTokens.AccentBright);
- highlighter.AddKeywordColor("select", UiTokens.AccentBright);
- highlighter.AddKeywordColor("option", UiTokens.AccentBright);
- highlighter.AddColorRegion("\"", "\"", UiTokens.Ink);
- highlighter.AddColorRegion("#", "", UiTokens.Faint, true);
- highlighter.AddColorRegion(":", " ", UiTokens.TypeTarget, true);
- return highlighter;
- }
+ => SourceSyntax.CreateScenarioHighlighter(ScenarioCommandStrategyFactory.GetAllCommandNames());
public static string ToBbCode(string line)
{