mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-25 06:24:27 +00:00
Force create the canvas if needed to prevent a NPE.
This commit is contained in:
1 parent
2de4ffd1ea
commit
a4694d4554
3 files changed
+12
No files matched your search
@@ -232,6 +232,9 @@ public class OverlayLoadedChunks implements IMwDataProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupTable(HashSet<TicketData> tickets){
|
||||
if (this.canvas == null)
|
||||
this.canvas = new LayoutCanvas();
|
||||
|
||||
LayoutBase layout = (LayoutBase)this.canvas.addWidget("Table", new LayoutBase(null));
|
||||
//layout.setGeometry(new WidgetGeometry(100.0,0.0,300.0,100.0,CType.RELXY, CType.REL_Y, WAlign.RIGHT, WAlign.TOP));
|
||||
layout.setGeometry(new WidgetGeometry(100.0,0.0,30.0,100.0,CType.RELXY, CType.RELXY, WAlign.RIGHT, WAlign.TOP));
|
||||
|
||||
@@ -258,6 +258,9 @@ public class OverlayMeanTime implements IMwDataProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupTable(ArrayList<TileEntityStats> entities){
|
||||
if (this.canvas == null)
|
||||
this.canvas = new LayoutCanvas();
|
||||
|
||||
LayoutBase layout = (LayoutBase)this.canvas.addWidget("Table", new LayoutBase(null));
|
||||
//layout.setGeometry(new WidgetGeometry(100.0,0.0,300.0,100.0,CType.RELXY, CType.REL_Y, WAlign.RIGHT, WAlign.TOP));
|
||||
layout.setGeometry(new WidgetGeometry(100.0,0.0,30.0,100.0,CType.RELXY, CType.RELXY, WAlign.RIGHT, WAlign.TOP));
|
||||
|
||||
@@ -178,6 +178,9 @@ public class OverlayEntityPerChunk implements IMwDataProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupChunkTable(){
|
||||
if (this.canvas == null)
|
||||
this.canvas = new LayoutCanvas();
|
||||
|
||||
if (this.canvas.hasWidget("Table"))
|
||||
this.canvas.delWidget("Table");
|
||||
|
||||
@@ -208,6 +211,9 @@ public class OverlayEntityPerChunk implements IMwDataProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupEntTable(){
|
||||
if (this.canvas == null)
|
||||
this.canvas = new LayoutCanvas();
|
||||
|
||||
if (this.canvas.hasWidget("Table"))
|
||||
this.canvas.delWidget("Table");
|
||||
|
||||
|
||||
Reference in new issue
Block a user