mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 14:35:12 +00:00
Added alpha and style options for overlay labels.
This commit is contained in:
1 parent
966ab4bf72
commit
e7a19264b2
2 files changed
+486
-6
No files matched your search
@@ -12,6 +12,12 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
float scale;
|
||||
boolean shadow;
|
||||
|
||||
boolean randomStyle = false;
|
||||
boolean boldStyle = false;
|
||||
boolean italicStyle = false;
|
||||
boolean underlineStyle = false;
|
||||
boolean strikethroughStyle = false;
|
||||
|
||||
public ScriptOverlayLabel() {
|
||||
this.color = 16777215;
|
||||
this.scale = 1.0F;
|
||||
@@ -72,6 +78,38 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
this.shadow = shadow;
|
||||
}
|
||||
|
||||
public void setRandomStyle(boolean randomStyle){
|
||||
this.randomStyle = randomStyle;
|
||||
}
|
||||
public void setUnderlineStyle(boolean underlineStyle){
|
||||
this.underlineStyle = underlineStyle;
|
||||
}
|
||||
public void setBoldStyle(boolean boldStyle){
|
||||
this.boldStyle = boldStyle;
|
||||
}
|
||||
public void setItalicStyle(boolean italicStyle){
|
||||
this.italicStyle = italicStyle;
|
||||
}
|
||||
public void setStrikethroughStyle(boolean strikethroughStyle){
|
||||
this.strikethroughStyle = strikethroughStyle;
|
||||
}
|
||||
|
||||
public boolean getRandomStyle(){
|
||||
return this.randomStyle;
|
||||
}
|
||||
public boolean getUnderlineStyle(){
|
||||
return this.underlineStyle;
|
||||
}
|
||||
public boolean getBoldStyle(){
|
||||
return this.boldStyle;
|
||||
}
|
||||
public boolean getItalicStyle(){
|
||||
return this.italicStyle;
|
||||
}
|
||||
public boolean getStrikethroughStyle(){
|
||||
return this.strikethroughStyle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 1;
|
||||
@@ -83,6 +121,12 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
nbt.setIntArray("size", new int[]{this.width, this.height});
|
||||
nbt.setFloat("scale", this.scale);
|
||||
nbt.setBoolean("shadow",this.shadow);
|
||||
|
||||
nbt.setBoolean("strikethrough",this.strikethroughStyle);
|
||||
nbt.setBoolean("bold",this.boldStyle);
|
||||
nbt.setBoolean("italic",this.italicStyle);
|
||||
nbt.setBoolean("random",this.randomStyle);
|
||||
nbt.setBoolean("underline",this.underlineStyle);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@@ -92,6 +136,12 @@ public class ScriptOverlayLabel extends ScriptOverlayComponent implements IOverl
|
||||
this.setSize(nbt.getIntArray("size")[0], nbt.getIntArray("size")[1]);
|
||||
this.setScale(nbt.getFloat("scale"));
|
||||
this.setShadow(nbt.getBoolean("shadow"));
|
||||
|
||||
this.setStrikethroughStyle(nbt.getBoolean("strikethrough"));
|
||||
this.setBoldStyle(nbt.getBoolean("bold"));
|
||||
this.setItalicStyle(nbt.getBoolean("italic"));
|
||||
this.setRandomStyle(nbt.getBoolean("random"));
|
||||
this.setUnderlineStyle(nbt.getBoolean("underline"));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user