mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 15:45:10 +00:00
Imported temp place holders from syntax-highlighter-unified
This commit is contained in:
1 parent
6173e98998
commit
1df05406c8
2 files changed
+13
-3
No files matched your search
@@ -221,7 +221,7 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
// Set the scripting language for proper syntax highlighting
|
||||
// Use the container's language if available, otherwise fall back to handler's language
|
||||
String language = (container != null) ? container.getLanguage() : this.handler.getLanguage();
|
||||
// activeArea.setLanguage(language);
|
||||
activeArea.setLanguage(language);
|
||||
|
||||
// Set the script context for context-aware hook autocomplete
|
||||
activeArea.setScriptContext(getScriptContext());
|
||||
|
||||
@@ -448,6 +448,15 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
public boolean fullscreen() {
|
||||
return GuiScriptInterface.isFullscreen;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
if (this.container != null) {
|
||||
// this.container.setLanguage(language);
|
||||
if (this.enableCodeHighlighting) {
|
||||
this.container.formatCodeText();
|
||||
}
|
||||
}
|
||||
}
|
||||
// ==================== RENDERING ====================
|
||||
public void drawTextBox(int xMouse, int yMouse) {
|
||||
if (!visible)
|
||||
@@ -2168,7 +2177,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
*/
|
||||
public void setScriptContext(ScriptContext context) {
|
||||
if (this.container != null) {
|
||||
this.container.setScriptContext(context);
|
||||
// this.container.setScriptContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2178,7 +2187,8 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
* @return The script context (NPC, PLAYER, BLOCK, ITEM, etc.)
|
||||
*/
|
||||
public ScriptContext getScriptContext() {
|
||||
return this.container != null ? this.container.getScriptContext() : ScriptContext.GLOBAL;
|
||||
// return this.container != null ? this.container.getScriptContext() : ScriptContext.GLOBAL;
|
||||
return ScriptContext.GLOBAL;
|
||||
}
|
||||
|
||||
public void setListener(ITextChangeListener listener) {
|
||||
|
||||
Reference in new issue
Block a user