mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 14:35:12 +00:00
Made color and alpha components global among ScriptOverlay classes.
This commit is contained in:
1 parent
534f716991
commit
be61bd4e17
11 files changed
+71
-37
No files matched your search
@@ -9,7 +9,6 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
String label;
|
||||
int width;
|
||||
int height;
|
||||
int color;
|
||||
float scale;
|
||||
boolean shadow;
|
||||
|
||||
@@ -56,15 +55,6 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public IOverlayLabel setColor(int color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
public float getScale() {
|
||||
return this.scale;
|
||||
}
|
||||
@@ -91,7 +81,6 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
super.toNBT(nbt);
|
||||
nbt.setString("label", this.label);
|
||||
nbt.setIntArray("size", new int[]{this.width, this.height});
|
||||
nbt.setInteger("color", this.color);
|
||||
nbt.setFloat("scale", this.scale);
|
||||
nbt.setBoolean("shadow",this.shadow);
|
||||
return nbt;
|
||||
@@ -101,9 +90,8 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
super.fromNBT(nbt);
|
||||
this.setText(nbt.getString("label"));
|
||||
this.setSize(nbt.getIntArray("size")[0], nbt.getIntArray("size")[1]);
|
||||
this.setColor(nbt.getInteger("color"));
|
||||
this.setScale(nbt.getFloat("scale"));
|
||||
this.enableShadow(this.shadow);
|
||||
this.enableShadow(nbt.getBoolean("shadow"));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user