mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Changed List to Map
This commit is contained in:
1 parent
a1e7a7ee9f
commit
b23bf333d9
1 file changed
+2
-2
@@ -44,7 +44,7 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
public List<String> hookList = new ArrayList<String>();
|
||||
protected boolean loaded = false;
|
||||
|
||||
private List<GuiScriptTextArea> textAreas = new ArrayList<>();
|
||||
private Map<Integer, GuiScriptTextArea> textAreas = new HashMap<>();
|
||||
public GuiScriptInterface() {
|
||||
this.drawDefaultBackground = true;
|
||||
this.closeOnEsc = true;
|
||||
@@ -122,7 +122,7 @@ public class GuiScriptInterface extends GuiNPCInterface implements GuiYesNoCallb
|
||||
container == null ? "" : container.script);
|
||||
activeArea.setListener(this);
|
||||
this.closeOnEsc(activeArea::closeOnEsc);
|
||||
textAreas.add(idx, activeArea);
|
||||
textAreas.put(idx, activeArea);
|
||||
} else {
|
||||
// Reinitialize existing active area (position/size/text may change)
|
||||
activeArea.init(guiLeft + 1 + yoffset, guiTop + yoffset, xSize - 108 - yoffset,
|
||||
|
||||
Reference in new issue
Block a user