mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 04:09:57 +00:00
merge conflicts
This commit is contained in:
1 parent
0a33f7dd12
commit
21e05575ad
2 files changed
+13
-33
No files matched your search
@@ -318,11 +318,21 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||
// Check fullscreen button first when on script editor tab
|
||||
if (this.activeTab > 0 && fullscreenButton.mouseClicked(mouseX, mouseY, mouseButton)) {
|
||||
// Check if click is within autocomplete menu bounds and consume it if so
|
||||
GuiScriptTextArea activeArea = getActiveScriptArea();
|
||||
boolean isOverAutocomplete = activeArea != null
|
||||
&& activeArea.isPointOnAutocompleteMenu(mouseX, mouseY);
|
||||
if (isOverAutocomplete) {
|
||||
activeArea.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check fullscreen button first when on script editor tab
|
||||
// BUT only if autocomplete is not visible (don't let clicks pass through autocomplete menu)
|
||||
if (this.activeTab > 0 && !isOverAutocomplete
|
||||
&& fullscreenButton.mouseClicked(mouseX, mouseY, mouseButton)) {
|
||||
return;
|
||||
}
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
|
||||
|
||||
@@ -559,15 +559,7 @@ 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)
|
||||
@@ -2660,28 +2652,6 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
return this.container != null ? this.container.getScriptContext() : ScriptContext.GLOBAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the script context (NPC, PLAYER, BLOCK, ITEM, etc.).
|
||||
* This determines which hooks and event types are available for autocomplete.
|
||||
*
|
||||
* @param context The script context
|
||||
*/
|
||||
public void setScriptContext(ScriptContext context) {
|
||||
if (this.container != null) {
|
||||
// this.container.setScriptContext(context);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current script context.
|
||||
*
|
||||
* @return The script context (NPC, PLAYER, BLOCK, ITEM, etc.)
|
||||
*/
|
||||
public ScriptContext getScriptContext() {
|
||||
// return this.container != null ? this.container.getScriptContext() : ScriptContext.GLOBAL;
|
||||
return ScriptContext.GLOBAL;
|
||||
}
|
||||
|
||||
public void setListener(ITextChangeListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user