this.registerGlobalInputProcessor(new CursorTracer(app, this));
// this.setClearColor(new MTColor(230,230,230,255));
// this.setClearColor(new MTColor(30,30,30,255));
this.setClearColor(new MTColor(0,0,0,255));
//BACKGROUND GRADIENT
if (this.useBackgroundGradient){
Vertex[] vertices = new Vertex[]{
new Vertex(0, app.height/3f, 0, 0,0,0,255),
new Vertex(app.width, app.height/3, 0, 0,0,0,255),
new Vertex(app.width, app.height/1.7f,0, 170,170,140,255),
new Vertex(0, app.height/1.7f,0, 170,170,140,255),
new Vertex(0, app.height/3, 0, 0,0,0,255),
};
MTPolygon p = new MTPolygon(vertices, getMTApplication());
p.setName("upper gradient");
p.setNoStroke(true);
p.generateAndUseDisplayLists();
p.setPickable(false);
this.getCanvas().addChild(p);
Vertex[] vertices2 = new Vertex[]{
new Vertex(0, app.height/1.7f, 0, 170,170,140,255),
new Vertex(app.width, app.height/1.7f, 0, 170,170,140,255),
new Vertex(app.width, app.height, 0, 0,0,0,255),
new Vertex(0, app.height, 0, 0,0,0,255),
new Vertex(0, app.height/1.7f, 0, 170,170,140,255),
};
MTPolygon p2 = new MTPolygon(vertices2, getMTApplication());
p2.setNoStroke(true);
p2.generateAndUseDisplayLists();
p2.setPickable(false);
this.getCanvas().addChild(p2);
}
//BACKGROUND
preferredIconWidth = 256;
preferredIconHeight = 192;
gapBetweenIconAndReflection = 9;
displayHeightOfReflection = preferredIconHeight * 0.6f;
//CREATE LIST
listWidth = preferredIconHeight + displayHeightOfReflection + gapBetweenIconAndReflection;
// listHeight = app.width - 50;
listHeight = app.width;
list = new MTList(0,0, listWidth, listHeight, 40, mtApplication);
list.setFillColor(new MTColor(150,150,150,200));
list.setNoFill(true);
list.setNoStroke(true);
/*
//List ends fade images //Background gradient has to be set to false!