mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Add Script Context and better parsing for d.ts handling
This commit is contained in:
1 parent
cd92c340c7
commit
71dba15270
8 files changed
+253
-96
No files matched your search
@@ -13,6 +13,7 @@ import noppes.npcs.client.NoppesUtil;
|
||||
import noppes.npcs.client.gui.script.GuiNPCEventScripts;
|
||||
import noppes.npcs.client.gui.script.GuiScriptInterface;
|
||||
import noppes.npcs.client.gui.util.*;
|
||||
import noppes.npcs.constants.ScriptContext;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.controllers.data.DataScript;
|
||||
@@ -166,8 +167,10 @@ public class GuiScript extends GuiScriptInterface {
|
||||
int scrollbarOffset = activeArea.hasVerticalScrollbar() ? -8 : -2;
|
||||
fullscreenButton.initGui(editorX + editorWidth, editorY, scrollbarOffset);
|
||||
|
||||
// ==================== RIGHT PANEL BUTTONS (hidden in fullscreen) ====================
|
||||
if (!isFullscreen) {
|
||||
// Set language and script context for proper syntax highlighting and autocomplete
|
||||
activeArea.setLanguage(script.getLanguage());
|
||||
activeArea.setScriptContext(ScriptContext.NPC);
|
||||
|
||||
addButton(new GuiNpcButton(102, guiLeft + 315, guiTop + 4, 50, 20, "gui.clear"));
|
||||
addButton(new GuiNpcButton(101, guiLeft + 366, guiTop + 4, 50, 20, "gui.paste"));
|
||||
addButton(new GuiNpcButton(100, guiLeft + 315, guiTop + 25, 50, 20, "gui.copy"));
|
||||
|
||||
Reference in new issue
Block a user