mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added Custom GUI Lines, with configurable thickness & color. Draws a line between one point defined by (x1,y1), and another defined by (x2,y2)
This commit is contained in:
1 parent
fcaafe4b26
commit
8b24dad211
7 files changed
+212
-10
No files matched your search
@@ -13,17 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.controllers.data.PlayerDataScript;
|
||||
import noppes.npcs.scripted.interfaces.*;
|
||||
import noppes.npcs.scripted.interfaces.ICustomGuiComponent;
|
||||
import noppes.npcs.scripted.interfaces.IPlayer;
|
||||
import noppes.npcs.scripted.interfaces.IButton;
|
||||
import noppes.npcs.scripted.interfaces.ICustomGui;
|
||||
import noppes.npcs.scripted.interfaces.ICustomGuiComponent;
|
||||
import noppes.npcs.scripted.interfaces.IItemSlot;
|
||||
import noppes.npcs.scripted.interfaces.ILabel;
|
||||
import noppes.npcs.scripted.interfaces.IScroll;
|
||||
import noppes.npcs.scripted.interfaces.ITextField;
|
||||
import noppes.npcs.scripted.interfaces.ITexturedRect;
|
||||
import noppes.npcs.scripted.interfaces.IItemStack;
|
||||
import noppes.npcs.scripted.entity.ScriptPlayer;
|
||||
import noppes.npcs.controllers.CustomGuiController;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
@@ -170,6 +161,18 @@ public class ScriptGui implements ICustomGui {
|
||||
return (IScroll)this.components.get(this.components.size() - 1);
|
||||
}
|
||||
|
||||
public ILine addLine(int id, int x1, int y1, int x2, int y2, int color, int thickness) {
|
||||
ScriptGuiLine line = new ScriptGuiLine(id, x1, y1, x2, y2, color, thickness);
|
||||
this.components.add(line);
|
||||
return (ILine) this.components.get(this.components.size() - 1);
|
||||
}
|
||||
|
||||
public ILine addLine(int id, int x1, int y1, int x2, int y2) {
|
||||
ScriptGuiLine line = new ScriptGuiLine(id, x1, y1, x2, y2);
|
||||
this.components.add(line);
|
||||
return (ILine) this.components.get(this.components.size() - 1);
|
||||
}
|
||||
|
||||
public void showPlayerInventory(int x, int y) {
|
||||
this.showPlayerInv = true;
|
||||
this.playerInvX = x;
|
||||
|
||||
Reference in new issue
Block a user